github.com/ironcore-dev/gardener-extension-provider-ironcore@v0.3.2-0.20240314231816-8336447fb9a0/charts/gardener-extension-provider-ironcore/templates/deployment.yaml (about)

     1  apiVersion: apps/v1
     2  kind: Deployment
     3  metadata:
     4    name: {{ include "name" . }}
     5    namespace: {{ .Release.Namespace }}
     6  {{-  if .Values.ignoreResources }}
     7    annotations:
     8      resources.gardener.cloud/ignore: "true"
     9  {{- end }}
    10    labels:
    11  {{ include "labels" . | indent 4 }}
    12  spec:
    13    revisionHistoryLimit: 0
    14    replicas: {{ .Values.replicaCount }}
    15    selector:
    16      matchLabels:
    17  {{ include "labels" . | indent 6 }}
    18    strategy:
    19      rollingUpdate:
    20        maxUnavailable: {{ .Values.maxUnavailable }}
    21        maxSurge: {{ .Values.maxSurge }}
    22    template:
    23      metadata:
    24        annotations:
    25          {{- if .Values.imageVectorOverwrite }}
    26          checksum/configmap-ironcore-imagevector-overwrite: {{ include (print $.Template.BasePath "/configmap-imagevector-overwrite.yaml") . | sha256sum }}
    27          {{- end }}
    28          checksum/configmap-{{ include "name" . }}-config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
    29          {{- if and .Values.metrics.enableScraping }}
    30          prometheus.io/scrape: "true"
    31          prometheus.io/name: "{{ .Release.Name }}"
    32          # default metrics endpoint in controller-runtime
    33          prometheus.io/port: "{{ .Values.metricsPort }}"
    34          {{- end }}
    35        labels:
    36          networking.gardener.cloud/to-runtime-apiserver: allowed
    37          networking.gardener.cloud/to-dns: allowed
    38          networking.gardener.cloud/to-public-networks: allowed
    39          networking.gardener.cloud/to-private-networks: allowed
    40          networking.resources.gardener.cloud/to-all-shoots-kube-apiserver-tcp-443: allowed
    41  {{ include "labels" . | indent 8 }}
    42      spec:
    43        priorityClassName: gardener-system-900
    44        serviceAccountName: {{ include "name" . }}
    45        containers:
    46        - name: {{ include "name" . }}
    47          image: {{ include "image" . }}
    48          imagePullPolicy: {{ .Values.image.pullPolicy }}
    49          command:
    50          - /gardener-extension-provider-ironcore
    51          - --backupbucket-max-concurrent-reconciles={{ .Values.controllers.backupbucket.concurrentSyncs }}
    52          - --backupentry-max-concurrent-reconciles={{ .Values.controllers.backupentry.concurrentSyncs }}
    53          - --config-file=/etc/{{ include "name" . }}/config/config.yaml
    54          - --controlplane-max-concurrent-reconciles={{ .Values.controllers.controlplane.concurrentSyncs }}
    55          - --healthcheck-max-concurrent-reconciles={{ .Values.controllers.healthcheck.concurrentSyncs }}
    56          - --heartbeat-namespace={{ .Release.Namespace }}
    57          - --heartbeat-renew-interval-seconds={{ .Values.controllers.heartbeat.renewIntervalSeconds }}
    58          - --infrastructure-max-concurrent-reconciles={{ .Values.controllers.infrastructure.concurrentSyncs }}
    59          - --bastion-max-concurrent-reconciles={{ .Values.controllers.bastion.concurrentSyncs }}
    60          - --ignore-operation-annotation={{ .Values.controllers.ignoreOperationAnnotation }}
    61          - --worker-max-concurrent-reconciles={{ .Values.controllers.worker.concurrentSyncs }}
    62          - --webhook-config-namespace={{ .Release.Namespace }}
    63          - --webhook-config-service-port={{ .Values.webhookConfig.servicePort }}
    64          - --webhook-config-server-port={{ .Values.webhookConfig.serverPort }}
    65          - --disable-controllers={{ .Values.disableControllers | join "," }}
    66          - --disable-webhooks={{ .Values.disableWebhooks | join "," }}
    67          {{- if .Values.metricsPort }}
    68          - --metrics-bind-address=:{{ .Values.metricsPort }}
    69          {{- end }}
    70          - --health-bind-address=:{{ .Values.healthPort }}
    71          - --gardener-version={{ .Values.gardener.version }}
    72          env:
    73          - name: LEADER_ELECTION_NAMESPACE
    74            valueFrom:
    75              fieldRef:
    76                fieldPath: metadata.namespace
    77          {{- if .Values.imageVectorOverwrite }}
    78          - name: IMAGEVECTOR_OVERWRITE
    79            value: /charts_overwrite/images_overwrite.yaml
    80          {{- end }}
    81          livenessProbe:
    82            httpGet:
    83              path: /healthz
    84              port: {{ .Values.healthPort }}
    85              scheme: HTTP
    86            initialDelaySeconds: 10
    87          readinessProbe:
    88            httpGet:
    89              path: /readyz
    90              port: {{ .Values.healthPort }}
    91              scheme: HTTP
    92            initialDelaySeconds: 5
    93          ports:
    94          - name: webhook-server
    95            containerPort: {{ .Values.webhookConfig.serverPort }}
    96            protocol: TCP
    97  {{- if .Values.resources }}
    98          resources:
    99  {{ toYaml .Values.resources | nindent 10 }}
   100  {{- end }}
   101          volumeMounts:
   102          - name: config
   103            mountPath: /etc/{{ include "name" . }}/config
   104          {{- if .Values.imageVectorOverwrite }}
   105          - name: imagevector-overwrite
   106            mountPath: /charts_overwrite/
   107            readOnly: true
   108          {{- end }}
   109        affinity:
   110          podAntiAffinity:
   111            requiredDuringSchedulingIgnoredDuringExecution:
   112            - labelSelector:
   113                matchExpressions:
   114                - key: {{ include "labels.app.key" . }}
   115                  operator: In
   116                  values:
   117                  - {{ include "labels.app.value" . }}
   118              topologyKey: "kubernetes.io/hostname"
   119        volumes:
   120        - name: config
   121          configMap:
   122            name: {{ include "name" . }}-configmap
   123            defaultMode: 420
   124        {{- if .Values.imageVectorOverwrite }}
   125        - name: imagevector-overwrite
   126          configMap:
   127            name: {{ include "name" . }}-imagevector-overwrite
   128            defaultMode: 420
   129        {{- end }}