apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    a8r.io/repository: ssh://git@git.tr1ceracop.de:222/gitea_admin/k8s-and-chill.git
  labels:
    app: hcloud-csi-controller
    app.kubernetes.io/component: controller
    app.kubernetes.io/instance: hcloud-csi
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: hcloud-csi
    helm.sh/chart: hcloud-csi-2.12.0
  name: hcloud-csi-controller
  namespace: kube-system
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/component: controller
      app.kubernetes.io/instance: hcloud-csi
      app.kubernetes.io/name: hcloud-csi
  strategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        app.kubernetes.io/component: controller
        app.kubernetes.io/instance: hcloud-csi
        app.kubernetes.io/managed-by: Helm
        app.kubernetes.io/name: hcloud-csi
        helm.sh/chart: hcloud-csi-2.12.0
    spec:
      affinity:
        nodeAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            - preference:
                matchExpressions:
                  - key: instance.hetzner.cloud/provided-by
                    operator: In
                    values:
                      - cloud
              weight: 1
      containers:
        - args:
            - --default-fstype=ext4
          image: registry.k8s.io/sig-storage/csi-attacher:v4.8.0
          imagePullPolicy: IfNotPresent
          name: csi-attacher
          resources:
            limits: {}
            requests: {}
          volumeMounts:
            - mountPath: /run/csi
              name: socket-dir
        - image: registry.k8s.io/sig-storage/csi-resizer:v1.12.0
          imagePullPolicy: IfNotPresent
          name: csi-resizer
          resources:
            limits: {}
            requests: {}
          volumeMounts:
            - mountPath: /run/csi
              name: socket-dir
        - args:
            - --feature-gates=Topology=true
            - --default-fstype=ext4
          image: registry.k8s.io/sig-storage/csi-provisioner:v5.2.0
          imagePullPolicy: IfNotPresent
          name: csi-provisioner
          resources:
            limits: {}
            requests: {}
          volumeMounts:
            - mountPath: /run/csi
              name: socket-dir
        - image: registry.k8s.io/sig-storage/livenessprobe:v2.15.0
          imagePullPolicy: IfNotPresent
          name: liveness-probe
          resources:
            limits: {}
            requests: {}
          volumeMounts:
            - mountPath: /run/csi
              name: socket-dir
        - command:
            - /bin/hcloud-csi-driver-controller
          env:
            - name: CSI_ENDPOINT
              value: unix:///run/csi/socket
            - name: ENABLE_METRICS
              value: "false"
            - name: KUBE_NODE_NAME
              valueFrom:
                fieldRef:
                  apiVersion: v1
                  fieldPath: spec.nodeName
            - name: HCLOUD_TOKEN
              valueFrom:
                secretKeyRef:
                  key: token
                  name: hcloud
          image: docker.io/hetznercloud/hcloud-csi-driver:v2.12.0
          imagePullPolicy: IfNotPresent
          livenessProbe:
            failureThreshold: 5
            httpGet:
              path: /healthz
              port: healthz
            initialDelaySeconds: 10
            periodSeconds: 2
            successThreshold: 1
            timeoutSeconds: 3
          name: hcloud-csi-driver
          ports:
            - containerPort: 9808
              name: healthz
              protocol: TCP
          resources:
            limits: {}
            requests: {}
          volumeMounts:
            - mountPath: /run/csi
              name: socket-dir
      initContainers: null
      securityContext:
        fsGroup: 1001
      serviceAccountName: hcloud-csi-controller
      volumes:
        - emptyDir: {}
          name: socket-dir
