Skip to content

Commit 770b2dd

Browse files
committed
WKTUI-337 adding missing service account helm chart arg
1 parent e20faa8 commit 770b2dd

File tree

4 files changed

+25
-0
lines changed

4 files changed

+25
-0
lines changed

webui/src/js/utils/cmd-script-adapter.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,12 @@ define(['utils/script-adapter-base'],
177177
}
178178

179179
const variableRef = this.getVariableReference(variableName);
180+
const serviceAccountLines = [
181+
`IF "${helmChartValues.serviceAccount}" NEQ "" (`,
182+
`${this.indent(1)}SET "${variableName}=${variableRef} --set serviceAccount=${helmChartValues.serviceAccount}"`,
183+
')'
184+
];
185+
180186
const strategyLines = [
181187
`IF "${helmChartValues.domainNamespaceSelectionStrategy}" EQU "LabelSelector" (`,
182188
`${this.indent(1)}SET "${variableName}=${variableRef} --set domainNamespaceLabelSelector=${helmChartValues.domainNamespaceLabelSelector}"`,
@@ -255,6 +261,8 @@ define(['utils/script-adapter-base'],
255261
this._lines.push(
256262
...strategyLines,
257263
'',
264+
...serviceAccountLines,
265+
'',
258266
...pullSecretsLines,
259267
'',
260268
...roleBindingLines,

webui/src/js/utils/operator-script-generator.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ define(['models/wkt-project', 'utils/script-generator-base', 'utils/helm-helper'
207207

208208
_gatherHelmChartArgs() {
209209
return {
210+
serviceAccount: this.adapter.getVariableReference('WKO_SERVICE_ACCOUNT'),
210211
domainNamespaceSelectionStrategy: this.adapter.getVariableReference('WKO_DOMAIN_NAMESPACE_SELECTION_STRATEGY'),
211212
domainNamespaceLabelSelector: this.adapter.getVariableReference('WKO_DOMAIN_NAMESPACE_LABEL_SELECTOR'),
212213
domainNamespaces: this.adapter.getVariableReference('WKO_DOMAIN_NAMESPACES'),

webui/src/js/utils/powershell-script-adapter.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,12 @@ define(['utils/script-adapter-base'],
131131
}
132132

133133
const variableRef = this.getVariableReference(variableName);
134+
const serviceAccountLines = [
135+
`if ("${helmChartValues.serviceAccount}" -ne "") {`,
136+
`${this.indent(1)}${variableName}="${variableRef} --set serviceAccount=${helmChartValues.serviceAccount}"`,
137+
'}'
138+
];
139+
134140
const strategyLines = [
135141
`if ("${helmChartValues.domainNamespaceSelectionStrategy}" -eq "LabelSelector") {`,
136142
`${this.indent(1)}$${variableName}="${variableRef} --set domainNamespaceLabelSelector=${helmChartValues.domainNamespaceLabelSelector}"`,
@@ -203,6 +209,8 @@ define(['utils/script-adapter-base'],
203209
this._lines.push(
204210
...strategyLines,
205211
'',
212+
...serviceAccountLines,
213+
'',
206214
...pullSecretsLines,
207215
'',
208216
...roleBindingLines,

webui/src/js/utils/sh-script-adapter.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,12 @@ define(['utils/script-adapter-base'],
134134
}
135135

136136
const variableRef = this.getVariableReference(variableName);
137+
const serviceAccountLines = [
138+
`if [ "${helmChartValues.serviceAccount}" != "" ]; then`,
139+
`${this.indent(1)}${variableName}="${variableRef} --set serviceAccount=${helmChartValues.serviceAccount}"`,
140+
'fi'
141+
];
142+
137143
const strategyLines = [
138144
`if [ "${helmChartValues.domainNamespaceSelectionStrategy}" = "LabelSelector" ]; then`,
139145
`${this.indent(1)}${variableName}="${variableRef} --set domainNamespaceLabelSelector=${helmChartValues.domainNamespaceLabelSelector}"`,
@@ -206,6 +212,8 @@ define(['utils/script-adapter-base'],
206212
this._lines.push(
207213
...strategyLines,
208214
'',
215+
...serviceAccountLines,
216+
'',
209217
...pullSecretsLines,
210218
'',
211219
...roleBindingLines,

0 commit comments

Comments
 (0)