Skip to content

Commit 3318a07

Browse files
feat(csc): handle generic domain for govcloud (#426)
* feat(csc): handle generic domain for govcloud * feat(csc): added companyDomain examples * feat(csc): added check for empty companyDomain
1 parent 41b0a50 commit 3318a07

File tree

5 files changed

+33
-2
lines changed

5 files changed

+33
-2
lines changed

charts/collectorset-controller/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ maintainers:
66
77
name: LogicMonitor
88
name: collectorset-controller
9-
version: 9.3.0-rt01
9+
version: 10.0.0-rc01
1010
home: https://logicmonitor.github.io/helm-charts-qa
11-
appVersion: v11.2.0-rt01
11+
appVersion: v12.0.0-rc01
1212
dependencies:
1313
- name: lmutil
1414
repository: https://logicmonitor.github.io/helm-charts-qa

charts/collectorset-controller/templates/_helpers.tpl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,15 @@ Argus proxy details or not, for this we're using Lookup function in helm.
8686
secretKeyRef:
8787
name: {{ include "lmutil.secret-name" . }}
8888
key: account
89+
- name: COMPANY_DOMAIN
90+
{{- if and .Values.global.userDefinedSecret (or (not (hasKey $secretData "companyDomain")) (eq (get $secretData "companyDomain") "")) }}
91+
value: "logicmonitor.com"
92+
{{- else }}
93+
valueFrom:
94+
secretKeyRef:
95+
name: {{ include "lmutil.secret-name" . }}
96+
key: companyDomain
97+
{{- end}}
8998
{{- if $secretData.etcdDiscoveryToken }}
9099
- name: ETCD_DISCOVERY_TOKEN
91100
valueFrom:

charts/collectorset-controller/templates/secret.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ data:
1515
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 }}
1616
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 }}
1717
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 }}
18+
companyDomain: {{ if not (empty .Values.global.companyDomain) }}{{ .Values.global.companyDomain | b64enc }}{{ else }}{{ "logicmonitor.com" | b64enc }}{{ end }}
1819
etcdDiscoveryToken: {{ default "" .Values.etcdDiscoveryToken | b64enc | quote }}
1920
{{- if .Values.proxy.user }}
2021
proxyUser: {{ default "" .Values.proxy.user | b64enc }}

charts/collectorset-controller/values.schema.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"accessID": "",
4444
"accessKey": "",
4545
"account": "",
46+
"companyDomain": "",
4647
"collectorsetServiceNameSuffix": "",
4748
"userDefinedSecret": "",
4849
"proxy": {
@@ -103,6 +104,18 @@
103104
""
104105
]
105106
},
107+
"companyDomain": {
108+
"$comment": "tf:optional",
109+
"$id": "#/properties/companyDomain",
110+
"type": "string",
111+
"title": "The domain schema",
112+
"description": "The Logicmonitor account domain",
113+
"examples": [
114+
"logicmonitor.com",
115+
"qa-lmgov.us",
116+
"lmgov.us"
117+
]
118+
},
106119
"log": {
107120
"$id": "#/properties/log",
108121
"$comment": "tf:optional",
@@ -635,6 +648,13 @@
635648
"type": "string",
636649
"default": "",
637650
"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"
651+
},
652+
"companyDomain" : {
653+
"$comment" : "tf:optional",
654+
"$id" : "#/properties/global/properties/companyDomain",
655+
"type" : "string",
656+
"default": "",
657+
"description" : "The Logicmonitor account domain"
638658
}
639659
}
640660
},

charts/collectorset-controller/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ global:
7171
repository: ""
7272
pullPolicy: Always
7373
userDefinedSecret: ""
74+
companyDomain: ""
7475
imagePullSecrets: []
7576

7677
podSecurityContext: {}

0 commit comments

Comments
 (0)