Skip to content

Commit 9b6adfd

Browse files
authored
Merge pull request #6596 from jabellard/operator-env
Add support for specifying env vars and extra args for the Karmada operator
2 parents 108073c + 5718bbd commit 9b6adfd

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

charts/karmada-operator/templates/karmada-operator-deployment.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@ spec:
4444
- /bin/karmada-operator
4545
- --leader-elect-resource-namespace={{ .Release.Namespace }}
4646
- --v=2
47+
{{- range .Values.operator.extraArgs }}
48+
- {{ . }}
49+
{{- end }}
50+
{{- with .Values.operator.env }}
51+
env:
52+
{{- toYaml . | nindent 10 }}
53+
{{- end }}
4754
{{- if .Values.operator.resources }}
4855
resources: {{- toYaml .Values.operator.resources | nindent 12 }}
4956
{{- end }}

charts/karmada-operator/values.yaml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,31 @@ operator:
5858
## - myRegistryKeySecretName
5959
##
6060
pullSecrets: []
61-
## @param.resources
61+
62+
## @param operator.env List of environment variables to inject
63+
##
64+
## - Each entry must be a valid Kubernetes EnvVar object.
65+
## - Supports both literal values and valueFrom references (ConfigMap, Secret, fieldRef, etc.).
66+
## - If omitted or set to an empty array (`[]`), no env stanza will be included.
67+
##
68+
## A sample stanza is shown below.
69+
##
70+
# env:
71+
# - name: http_proxy
72+
# value: "http://best-awesome-proxy.com:8080"
73+
# - name: https_proxy
74+
# value: "http://best-awesome-proxy.com:8080"
75+
# - name: no_proxy
76+
# value: "localhost,127.0.0.1,*.svc,*.cluster.local"
77+
78+
## @param operator.extraArgs List of extra arguments for the operator binary
79+
##
80+
## A sample stanza is shown below.
81+
##
82+
# extraArgs:
83+
# - --arg1=val1
84+
# - --arg2
85+
6286
resources: {}
6387
# If you do want to specify resources, uncomment the following
6488
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.

0 commit comments

Comments
 (0)