apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    a8r.io/repository: ssh://git@git.tr1ceracop.de:222/gitea_admin/k8s-and-chill.git
  labels:
    app.kubernetes.io/instance: ocis
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: ocis
    app.kubernetes.io/version: 7.1.4
    helm.sh/chart: ocis-0.7.0
  name: thumbnails
  namespace: ocis
spec:
  replicas: 1
  selector:
    matchLabels:
      app: thumbnails
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: thumbnails
        app.kubernetes.io/instance: ocis
        app.kubernetes.io/managed-by: Helm
        app.kubernetes.io/name: ocis
        app.kubernetes.io/version: 7.1.4
        helm.sh/chart: ocis-0.7.0
    spec:
      containers:
        - args:
            - thumbnails
            - server
          command:
            - ocis
          env:
            - name: MICRO_REGISTRY
              value: nats-js-kv
            - name: MICRO_REGISTRY_ADDRESS
              value: nats:9233
            - name: OCIS_CORS_ALLOW_ORIGINS
              value: https://drive.tr1ceracop.de
            - name: THUMBNAILS_LOG_COLOR
              value: "false"
            - name: THUMBNAILS_LOG_LEVEL
              value: info
            - name: THUMBNAILS_LOG_PRETTY
              value: "false"
            - name: THUMBNAILS_TRACING_ENABLED
              value: "false"
            - name: THUMBNAILS_TRACING_TYPE
              value: jaeger
            - name: THUMBNAILS_TRACING_ENDPOINT
              value: null
            - name: THUMBNAILS_TRACING_COLLECTOR
              value: null
            - name: THUMBNAILS_DEBUG_PPROF
              value: "false"
            - name: THUMBNAILS_GRPC_ADDR
              value: 0.0.0.0:9185
            - name: THUMBNAILS_HTTP_ADDR
              value: 0.0.0.0:9186
            - name: THUMBNAILS_DEBUG_ADDR
              value: 0.0.0.0:9189
            - name: THUMBNAILS_DATA_ENDPOINT
              value: http://thumbnails:9186/thumbnails/data
            - name: THUMBNAILS_MAX_CONCURRENT_REQUESTS
              value: "0"
            - name: THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE
              value: 50MB
            - name: THUMBNAILS_MAX_INPUT_WIDTH
              value: "7680"
            - name: THUMBNAILS_MAX_INPUT_HEIGHT
              value: "7680"
            - name: THUMBNAILS_WEBDAVSOURCE_INSECURE
              value: "false"
            - name: THUMBNAILS_CS3SOURCE_INSECURE
              value: "false"
            - name: THUMBNAILS_TRANSFER_TOKEN
              valueFrom:
                secretKeyRef:
                  key: thumbnails-transfer-secret
                  name: ocis-thumbnails-transfer-secret
          image: owncloud/ocis:7.1.4
          imagePullPolicy: IfNotPresent
          livenessProbe:
            failureThreshold: 3
            httpGet:
              path: /healthz
              port: metrics-debug
            initialDelaySeconds: 60
            periodSeconds: 20
            timeoutSeconds: 10
          name: thumbnails
          ports:
            - containerPort: 9185
              name: grpc
            - containerPort: 9186
              name: http
            - containerPort: 9189
              name: metrics-debug
          resources:
            requests:
              cpu: 10m
              memory: 96Mi
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop:
                - ALL
            readOnlyRootFilesystem: true
            runAsGroup: 1000
            runAsNonRoot: true
            runAsUser: 1000
          volumeMounts:
            - mountPath: /var/lib/ocis
              name: thumbnails-data
      nodeSelector: {}
      securityContext:
        fsGroup: 1000
        fsGroupChangePolicy: OnRootMismatch
        seccompProfile:
          type: RuntimeDefault
      volumes:
        - name: thumbnails-data
          persistentVolumeClaim:
            claimName: thumbnails-data
