apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    kompose.cmd: kompose convert -c -f latest.yml --namespace "{{ .Values.NAMESPACE }}"
    kompose.version: 1.34.0 (cbf2835db)
  labels:
    io.kompose.service: nextcloud-aio-redis
  name: nextcloud-aio-redis
  namespace: "{{ .Values.NAMESPACE }}"
spec:
  replicas: 1
  selector:
    matchLabels:
      io.kompose.service: nextcloud-aio-redis
  strategy:
    type: Recreate
  template:
    metadata:
      annotations:
        kompose.cmd: kompose convert -c -f latest.yml --namespace "{{ .Values.NAMESPACE }}"
        kompose.version: 1.34.0 (cbf2835db)
      labels:
        io.kompose.service: nextcloud-aio-redis
    spec:
      initContainers:
        - name: init-volumes
          image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG }}alpine"
          command:
            - chmod
            - "777"
            - /nextcloud-aio-redis
          volumeMounts:
            - name: nextcloud-aio-redis
              mountPath: /nextcloud-aio-redis
      containers:
        - env:
            - name: REDIS_HOST_PASSWORD
              value: "{{ .Values.REDIS_PASSWORD }}"
            - name: TZ
              value: "{{ .Values.TIMEZONE }}"
          image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.NEXTCLOUD_IMAGE_ORG }}/aio-redis:20240914_063340"
          name: nextcloud-aio-redis
          ports:
            - containerPort: 6379
              protocol: TCP
          securityContext:
            capabilities:
              drop:
                - NET_RAW
          volumeMounts:
            - mountPath: /data
              name: nextcloud-aio-redis
      volumes:
        - name: nextcloud-aio-redis
          persistentVolumeClaim:
            claimName: nextcloud-aio-redis
