diff --git a/charts/collectorset-controller/Chart.yaml b/charts/collectorset-controller/Chart.yaml index b938898..ea95d04 100644 --- a/charts/collectorset-controller/Chart.yaml +++ b/charts/collectorset-controller/Chart.yaml @@ -6,9 +6,9 @@ maintainers: - email: argus@logicmonitor.com name: LogicMonitor name: collectorset-controller -version: 9.3.0 +version: 10.0.0 home: https://logicmonitor.github.io/helm-charts -appVersion: v11.2.0 +appVersion: v12.0.0 dependencies: - name: lmutil repository: https://logicmonitor.github.io/helm-charts diff --git a/charts/collectorset-controller/templates/_helpers.tpl b/charts/collectorset-controller/templates/_helpers.tpl index bdb8c9a..7cc7a91 100644 --- a/charts/collectorset-controller/templates/_helpers.tpl +++ b/charts/collectorset-controller/templates/_helpers.tpl @@ -86,6 +86,15 @@ Argus proxy details or not, for this we're using Lookup function in helm. secretKeyRef: name: {{ include "lmutil.secret-name" . }} key: account +- name: COMPANY_DOMAIN +{{- if and .Values.global.userDefinedSecret (or (not (hasKey $secretData "companyDomain")) (eq (get $secretData "companyDomain") "")) }} + value: "logicmonitor.com" +{{- else }} + valueFrom: + secretKeyRef: + name: {{ include "lmutil.secret-name" . }} + key: companyDomain +{{- end}} {{- if $secretData.etcdDiscoveryToken }} - name: ETCD_DISCOVERY_TOKEN valueFrom: diff --git a/charts/collectorset-controller/templates/secret.yaml b/charts/collectorset-controller/templates/secret.yaml index 02a7ac4..15fa74c 100644 --- a/charts/collectorset-controller/templates/secret.yaml +++ b/charts/collectorset-controller/templates/secret.yaml @@ -15,6 +15,7 @@ data: accessID: {{ if .Values.accessID }} {{ .Values.accessID | b64enc }} {{ else }} {{ required "A valid .Values.accessID or .Values.global.accessID entry is required!" .Values.global.accessID | b64enc }} {{ end }} accessKey: {{ if .Values.accessKey }} {{ .Values.accessKey | b64enc }} {{ else }} {{ required "A valid .Values.accessKey or .Values.global.accessKey entry is required!" .Values.global.accessKey | b64enc }} {{ end }} account: {{ if .Values.account }} {{ .Values.account | b64enc }} {{ else }} {{ required "A valid .Values.account or .Values.global.account entry is required!" .Values.global.account | b64enc }} {{ end }} + companyDomain: {{ if not (empty .Values.global.companyDomain) }}{{ .Values.global.companyDomain | b64enc }}{{ else }}{{ "logicmonitor.com" | b64enc }}{{ end }} etcdDiscoveryToken: {{ default "" .Values.etcdDiscoveryToken | b64enc | quote }} {{- if .Values.proxy.user }} proxyUser: {{ default "" .Values.proxy.user | b64enc }} diff --git a/charts/collectorset-controller/values.schema.json b/charts/collectorset-controller/values.schema.json index 0a295e5..110a618 100644 --- a/charts/collectorset-controller/values.schema.json +++ b/charts/collectorset-controller/values.schema.json @@ -43,6 +43,7 @@ "accessID": "", "accessKey": "", "account": "", + "companyDomain": "", "collectorsetServiceNameSuffix": "", "userDefinedSecret": "", "proxy": { @@ -103,6 +104,18 @@ "" ] }, + "companyDomain": { + "$comment": "tf:optional", + "$id": "#/properties/companyDomain", + "type": "string", + "title": "The domain schema", + "description": "The Logicmonitor account domain", + "examples": [ + "logicmonitor.com", + "qa-lmgov.us", + "lmgov.us" + ] + }, "log": { "$id": "#/properties/log", "$comment": "tf:optional", @@ -635,6 +648,13 @@ "type": "string", "default": "", "description": "User can provide LM credentials in a Secret instead of plain text. The secret should contain 'accessID', 'accessKey', 'account' along with optional params e.g. 'etcdDiscoveryToken', proxy credentials" + }, + "companyDomain" : { + "$comment" : "tf:optional", + "$id" : "#/properties/global/properties/companyDomain", + "type" : "string", + "default": "", + "description" : "The Logicmonitor account domain" } } }, diff --git a/charts/collectorset-controller/values.yaml b/charts/collectorset-controller/values.yaml index 175e5dc..7c6169d 100644 --- a/charts/collectorset-controller/values.yaml +++ b/charts/collectorset-controller/values.yaml @@ -71,6 +71,7 @@ global: repository: "" pullPolicy: Always userDefinedSecret: "" + companyDomain: "" imagePullSecrets: [] podSecurityContext: {}