Files
cyrgim 1677c64f5b feat(helm): add extraEnv support to manager container
Allow injecting arbitrary environment variables (e.g. HTTP_PROXY,
HTTPS_PROXY, NO_PROXY) into the operator's manager container via
controllerManager.manager.extraEnv in values.yaml.
2026-02-17 09:35:20 +01:00

69 lines
2.6 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "secrets-operator.fullname" . }}-controller-manager
labels:
control-plane: controller-manager
{{- include "secrets-operator.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.controllerManager.replicas }}
selector:
matchLabels:
control-plane: controller-manager
{{- include "secrets-operator.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
control-plane: controller-manager
{{- include "secrets-operator.selectorLabels" . | nindent 8 }}
annotations:
kubectl.kubernetes.io/default-container: manager
spec:
containers:
- args:
{{- toYaml .Values.controllerManager.manager.args | nindent 8 }}
{{- $namespaces := (include "secrets-operator.scopedNamespaces" . | fromJson).list }}
{{- if and $namespaces .Values.scopedRBAC }}
- --namespaces={{ join "," $namespaces }}
{{- if eq (include "secrets-operator.usingDeprecatedScopedNamespace" .) "true" }}
- --deprecated-scoped-namespace-warning
{{- end }}
{{- end }}
command:
- /manager
env:
- name: KUBERNETES_CLUSTER_DOMAIN
value: {{ quote .Values.kubernetesClusterDomain }}
{{- with .Values.controllerManager.manager.extraEnv }}
{{- toYaml . | nindent 8 }}
{{- end }}
image: {{ .Values.controllerManager.manager.image.repository }}:{{ .Values.controllerManager.manager.image.tag
| default .Chart.AppVersion }}
livenessProbe:
httpGet:
path: /healthz
port: 8081
initialDelaySeconds: 15
periodSeconds: 20
name: manager
readinessProbe:
httpGet:
path: /readyz
port: 8081
initialDelaySeconds: 5
periodSeconds: 10
resources: {{- toYaml .Values.controllerManager.manager.resources | nindent 10
}}
securityContext: {{- toYaml .Values.controllerManager.manager.containerSecurityContext
| nindent 10 }}
securityContext: {{- toYaml .Values.controllerManager.podSecurityContext | nindent
8 }}
serviceAccountName: {{ include "secrets-operator.serviceAccountName" . }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
terminationGracePeriodSeconds: 10
nodeSelector: {{ toYaml .Values.controllerManager.nodeSelector | nindent 8 }}
tolerations: {{ toYaml .Values.controllerManager.tolerations | nindent 8 }}