8000 Merge pull request #7319 from cert-manager-bot/cherry-pick-7317-to-re… · cert-manager/cert-manager@f98340d · GitHub
[go: up one dir, main page]

Skip to content

Commit f98340d

Browse files
Merge pull request #7319 from cert-manager-bot/cherry-pick-7317-to-release-1.16
[release-1.16] Allow extra environment variables to be added to cainjector, webhook and startupapicheck
2 parents e381fb0 + 78dd1bf commit f98340d

File tree

6 files changed

+117
-4
lines changed

6 files changed

+117
-4
lines changed

deploy/charts/cert-manager/README.template.md

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,14 @@ extraArgs:
435435
> []
436436
> ```
437437
438-
Additional environment variables to pass to cert-manager controller binary.
438+
Additional environment variables to pass to cert-manager controller binary.
439+
For example:
440+
441+
```yaml
442+
extraEnv:
443+
- name: SOME_VAR
444+
value: 'some value'
445+
```
439446
#### **resources** ~ `object`
440447
> Default value:
441448
> ```yaml
@@ -1002,6 +1009,20 @@ Configure spec.namespaceSelector for mutating webhooks.
10021009
> ```
10031010
10041011
Additional command line flags to pass to cert-manager webhook binary. To see all available flags run `docker run quay.io/jetstack/cert-manager-webhook:<version> --help`.
1012+
#### **webhook.extraEnv** ~ `array`
1013+
> Default value:
1014+
> ```yaml
1015+
> []
1016+
> ```
1017+
1018+
Additional environment variables to pass to cert-manager webhook binary.
1019+
For example:
1020+
1021+
```yaml
1022+
extraEnv:
1023+
- name: SOME_VAR
1024+
value: 'some value'
1025+
```
10051026
#### **webhook.featureGates** ~ `string`
10061027
> Default value:
10071028
> ```yaml
@@ -1432,6 +1453,20 @@ Optional additional annotations to add to the cainjector metrics Service.
14321453
> ```
14331454
14341455
Additional command line flags to pass to cert-manager cainjector binary. To see all available flags run `docker run quay.io/jetstack/cert-manager-cainjector:<version> --help`.
1456+
#### **cainjector.extraEnv** ~ `array`
1457+
> Default value:
1458+
> ```yaml
1459+
> []
1460+
> ```
1461+
1462+
Additional environment variables to pass to cert-manager cainjector binary.
1463+
For example:
1464+
1465+
```yaml
1466+
extraEnv:
1467+
- name: SOME_VAR
1468+
value: 'some value'
1469+
```
14351470
#### **cainjector.featureGates** ~ `string`
14361471
> Default value:
14371472
> ```yaml
@@ -1717,6 +1752,20 @@ Additional command line flags to pass to startupapicheck binary. To see all avai
17171752
17181753
Verbose logging is enabled by default so that if startupapicheck fails, you can know what exactly caused the failure. Verbose logs include details of the webhook URL, IP address and TCP connect errors for example.
17191754
1755+
#### **startupapicheck.extraEnv** ~ `array`
1756+
> Default value:
1757+
> ```yaml
1758+
> []
1759+
> ```
1760+
1761+
Additional environment variables to pass to cert-manager startupapicheck binary.
1762+
For example:
1763+
1764+
```yaml
1765+
extraEnv:
1766+
- name: SOME_VAR
1767+
value: 'some value'
1768+
```
17201769
#### **startupapicheck.resources** ~ `object`
17211770
> Default value:
17221771
> ```yaml

deploy/charts/cert-manager/templates/cainjector-deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ spec:
109109
valueFrom:
110110
fieldRef:
111111 fieldPath: metadata.namespace
112+
{{- with .Values.cainjector.extraEnv }}
113+
{{- toYaml . | nindent 10 }}
114+
{{- end }}
112115
{{- with .Values.cainjector.containerSecurityContext }}
113116
securityContext:
114117
{{- toYaml . | nindent 12 }}

deploy/charts/cert-manager/templates/startupapicheck-job.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@ spec:
6060
securityContext:
6161
{{- toYaml . | nindent 12 }}
6262
{{- end }}
63+
env:
64+
- name: POD_NAMESPACE
65+
valueFrom:
66+
fieldRef:
67+
fieldPath: metadata.namespace
68+
{{- with .Values.startupapicheck.extraEnv }}
69+
{{- toYaml . | nindent 10 }}
70+
{{- end }}
6371
{{- with .Values.startupapicheck.resources }}
6472
resources:
6573
{{- toYaml . | nindent 12 }}

deploy/charts/cert-manager/templates/webhook-deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@ spec:
165165
valueFrom:
166166
fieldRef:
167167
fieldPath: metadata.namespace
168+
{{- with .Values.webhook.extraEnv }}
169+
{{- toYaml . | nindent 10 }}
170+
{{- end }}
168171
{{- with .Values.webhook.resources }}
169172
resources:
170173
{{- toYaml . | nindent 12 }}

deploy/charts/cert-manager/values.schema.json

Lines changed: 28 additions & 1 deletion
6DAE
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,9 @@
268268
"extraArgs": {
269269
"$ref": "#/$defs/helm-values.cainjector.extraArgs"
270270
},
271+
"extraEnv": {
272+
"$ref": "#/$defs/helm-values.cainjector.extraEnv"
273+
},
271274
"featureGates": {
272275
"$ref": "#/$defs/helm-values.cainjector.featureGates"
273276
},
@@ -369,6 +372,12 @@
369372
"items": {},
370373
"type": "array"
371374
},
375+
"helm-values.cainjector.extraEnv": {
376+
"default": [],
377+
"description": "Additional environment variables to pass to cert-manager cainjector binary.\nFor example:\nextraEnv:\n- name: SOME_VAR\n value: 'some value'",
378+
"items": {},
379+
"type": "array"
380+
},
372381
"helm-values.cainjector.featureGates": {
373382
"default": "",
374383
"description": "Comma separated list of feature gates that should be enabled on the cainjector pod.",
@@ -649,7 +658,7 @@
649658
},
650659
"helm-values.extraEnv": {
651660
"default": [],
652-
"description": "Additional environment variables to pass to cert-manager controller binary.",
661+
"description": "Additional environment variables to pass to cert-manager controller binary.\nFor example:\nextraEnv:\n- name: SOME_VAR\n value: 'some value'",
653662
"items": {},
654663
"type": "array"
655664
},
@@ -1276,6 +1285,9 @@
12761285
"extraArgs": {
12771286
"$ref": "#/$defs/helm-values.startupapicheck.extraArgs"
12781287
},
1288+
"extraEnv": {
1289+
"$ref": "#/$defs/helm-values.startupapicheck.extraEnv"
1290+
},
12791291
"image": {
12801292
"$ref": "#/$defs/helm-values.startupapicheck.image"
12811293
},
@@ -1363,6 +1375,12 @@
13631375
"items": {},
13641376
"type": "array"
13651377
},
1378+
"helm-values.startupapicheck.extraEnv": {
1379+
"default": [],
1380+
"description": "Additional environment variables to pass to cert-manager startupapicheck binary.\nFor example:\nextraEnv:\n- name: SOME_VAR\n value: 'some value'",
1381+
"items": {},
1382+
"type": "array"
1383+
},
13661384
"helm-values.startupapicheck.image": {
13671385
"additionalProperties": false,
13681386
"properties": {
@@ -1588,6 +1606,9 @@
15881606
"extraArgs": {
15891607
"$ref": "#/$defs/helm-values.webhook.extraArgs"
15901608
},
1609+
"extraEnv": {
1610+
"$ref": "#/$defs/helm-values.webhook.extraEnv"
1611+
},
15911612
"featureGates": {
15921613
"$ref": "#/$defs/helm-values.webhook.featureGates"
15931614
},
@@ -1729,6 +1750,12 @@
17291750
"items": {},
17301751
"type": "array"
17311752
},
1753+
"helm-values.webhook.extraEnv": {
1754+
"default": [],
1755+
"description": "Additional environment variables to pass to cert-manager webhook binary.\nFor example:\nextraEnv:\n- name: SOME_VAR\n value: 'some value'",
1756+
"items": {},
1757+
"type": "array"
1758+
},
17321759
"helm-values.webhook.featureGates": {
17331760
"default": "",
17341761
"description": "Comma separated list of feature gates that should be enabled on the webhook pod.",

deploy/charts/cert-manager/values.yaml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,9 +284,11 @@ approveSignerNames:
284284
extraArgs: []
285285

286286
# Additional environment variables to pass to cert-manager controller binary.
287+
# For example:
288+
# extraEnv:
289+
# - name: SOME_VAR
290+
# value: 'some value'
287291
extraEnv: []
288-
# - name: SOME_VAR
289-
# value: 'some value'
290292

291293
# Resources to provide to the cert-manager controller pod.
292294
#
@@ -752,6 +754,13 @@ webhook:
752754
# Path to a file containing a WebhookConfiguration object used to configure the webhook.
753755
# - --config=<path-to-config-file>
754756

757+
# Additional environment variables to pass to cert-manager webhook binary.
758+
# For example:
759+
# extraEnv:
760+
# - name: SOME_VAR
761+
# value: 'some value'
762+
extraEnv: []
763+
755764
# Comma separated list of feature gates that should be enabled on the
756765
# webhook pod.
757766
featureGates: ""
@@ -1079,6 +1088,13 @@ cainjector:
10791088
# Enable profiling for cainjector.
10801089
# - --enable-profiling=true
10811090

1091+
# Additional environment variables to pass to cert-manager cainjector binary.
1092+
# For example:
1093+
# extraEnv:
1094+
# - name: SOME_VAR
1095+
# value: 'some value'
1096+
extraEnv: []
1097+
10821098
# Comma separated list of feature gates that should be enabled on the
10831099
# cainjector pod.
10841100
featureGates: ""
@@ -1285,6 +1301,13 @@ startupapicheck:
12851301
extraArgs:
12861302
- -v
12871303

1304+
# Additional environment variables to pass to cert-manager startupapicheck binary.
1305+
# For example:
1306+
# extraEnv:
1307+
# - name: SOME_VAR
1308+
# value: 'some value'
1309+
extraEnv: []
1310+
12881311
# Resources to provide to the cert-manager controller pod.
12891312
#
12901313
# For example:

0 commit comments

Comments
 (0)
0