apiVersion: apps/v1 kind: Deployment metadata: name: gingress-controller namespace: {{ .Values.gingress.namespace | default "gingress-system" }} labels: app: gingress spec: replicas: {{ .Values.gingress.replicaCount | default 2 }} selector: matchLabels: app: gingress template: metadata: labels: app: gingress spec: serviceAccountName: gingress-controller containers: - name: gingress image: "{{ .Values.imageRegistry }}/{{ .Values.gingress.repository }}:{{ .Values.imageTag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.gingress.imagePullPolicy | default "IfNotPresent" }} {{- with .Values.securityContext }} securityContext: {{- toYaml . | nindent 12 }} {{- end }} args: - "--ingress-class=gingress" - "--bind-http=0.0.0.0:{{ .Values.gingress.httpPort | default 80 }}" - "--bind-https=0.0.0.0:{{ .Values.gingress.httpsPort | default 443 }}" - "--metrics-bind=0.0.0.0:8080" ports: - name: http containerPort: {{ .Values.gingress.httpPort | default 80 }} protocol: TCP - name: https containerPort: {{ .Values.gingress.httpsPort | default 443 }} protocol: TCP - name: metrics containerPort: 8080 protocol: TCP env: - name: RUST_LOG value: {{ .Values.gingress.logLevel | default "info" | quote }} livenessProbe: httpGet: path: /healthz port: 8080 initialDelaySeconds: 10 periodSeconds: 10 readinessProbe: httpGet: path: /readyz port: 8080 initialDelaySeconds: 5 periodSeconds: 5 {{- with .Values.gingress.resources }} resources: {{- toYaml . | nindent 12 }} {{- end }} affinity: podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: - weight: 100 podAffinityTerm: labelSelector: matchLabels: app: gingress topologyKey: kubernetes.io/hostname