diff --git a/chart/inlets-operator/templates/deployment.yaml b/chart/inlets-operator/templates/deployment.yaml index 489247b7..d1dd4f48 100644 --- a/chart/inlets-operator/templates/deployment.yaml +++ b/chart/inlets-operator/templates/deployment.yaml @@ -58,6 +58,13 @@ spec: env: - name: client_image value: "{{.Values.clientImage}}" + {{- if and .Values.proLicenseSecret.name .Values.proLicenseSecret.key }} + - name: LICENSE + valueFrom: + secretKeyRef: + name: {{ .Values.proLicenseSecret.name }} + key: {{ .Values.proLicenseSecret.key }} + {{- end }} volumeMounts: - mountPath: /var/secrets/inlets/ name: inlets-access-key diff --git a/chart/inlets-operator/values.yaml b/chart/inlets-operator/values.yaml index 001bb79a..e1d40dcb 100644 --- a/chart/inlets-operator/values.yaml +++ b/chart/inlets-operator/values.yaml @@ -35,6 +35,10 @@ vpcId: "" subnetId: "" # Only provide LoadBalancers for Services annotated with "dev.inlets.manage=true" +proLicenseSecret: + name: "" + key: "" + annotatedOnly: false image: "ghcr.io/inlets/inlets-operator:0.14.1" diff --git a/main.go b/main.go index b10cc368..86d8479d 100644 --- a/main.go +++ b/main.go @@ -76,6 +76,10 @@ func main() { log.Printf("Client image: %s\n", infra.GetInletsClientImage()) + if len(infra.ProConfig.License) == 0 { + infra.ProConfig.License = os.Getenv("LICENSE") + } + if _, err := infra.ProConfig.GetLicenseKey(); err != nil { fmt.Fprintf(os.Stderr, "%s\n", err.Error()) os.Exit(1)