support extra env in manager DaemonSet

Now is possible to add extra environment variables in the manager DaemonSet.
This allows for example to support corporate proxy when downloading images
with ImagePullJob setting the HTTP_PROXY, HTTPS_PROXY, NO_PROXY env vars.

Signed-off-by: Marco Geri <m.geri1974@gmail.com>
This commit is contained in:
Marco Geri 2022-12-02 10:10:09 +01:00
parent eac28d38bc
commit 09e01806a2
No known key found for this signature in database
GPG Key ID: 347F5E4D806A0ED7
4 changed files with 17 additions and 0 deletions

View File

@ -21,3 +21,4 @@ sources:
annotations:
artifacthub.io/changes: |
- "[Changed]: https://github.com/openkruise/kruise/blob/master/CHANGELOG.md"
- "[Changed]: Support extra environment variables in the manager DaemonSet"

View File

@ -23,6 +23,7 @@ The following table lists the configurable parameters of the kruise chart and th
| `manager.nodeAffinity` | Node affinity policy for kruise-manager pod | `{}` |
| `manager.nodeSelector` | Node labels for kruise-manager pod | `{}` |
| `manager.tolerations` | Tolerations for kruise-manager pod | `[]` |
| `daemon.extraEnvs` | Extra environment variables that will be pass onto pods | `[]` |
| `daemon.log.level` | Log level that kruise-daemon printed | `4` |
| `daemon.port` | Port of metrics and healthz that kruise-daemon served | `10221` |
| `daemon.pprofAddr` | Address of pprof served | `localhost:10222` |

View File

@ -197,6 +197,9 @@ spec:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
{{- if .Values.daemon.extraEnvs }}
{{- toYaml .Values.daemon.extraEnvs | nindent 8 }}
{{- end }}
livenessProbe:
failureThreshold: 3
httpGet:

View File

@ -72,5 +72,17 @@ daemon:
cpu: "0"
memory: "0"
# Extra environment variables that will be pass onto pods.
# For example, when the daemon is used behind a http proxy, you can set the proxy environment variables here.
# This will be appended to the current 'env:' key. You can use any of the kubernetes env
# syntax here.
extraEnvs: []
# - name: HTTP_PROXY
# value: http://my-proxy:8080/
# - name: HTTPS_PROXY
# value: http://my-proxy:8080/
# - name: NO_PROXY
# value: localhost,0.0.0.0,127.0.0.1,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,.svc,.cluster.local
serviceAccount:
annotations: {}