kind: Deployment
apiVersion: apps/v1
metadata:
  name: attachment-storage-service
  namespace: oih-dev-ns
  labels:
    app: attachment-storage-service
spec:
  replicas: 1
  selector:
    matchLabels:
      app: attachment-storage-service
  template:
    metadata:
      name: attachment-storage-service
      labels:
        app: attachment-storage-service
    spec:
      containers:
        - name: attachment-storage-service
          image: 'openintegrationhub/attachment-storage-service:latest'
          env:
            - name: REDIS_CONFIG
              valueFrom:
                secretKeyRef:
                  name: attachment-storage-service
                  key: REDIS_CONFIG
            - name: PORT
              value: '3002'
            - name: IAM_TOKEN
              valueFrom:
                secretKeyRef:
                  name: attachment-storage-service
                  key: IAM_TOKEN
            - name: LOG_LEVEL
              value: trace
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
          imagePullPolicy: IfNotPresent
          livenessProbe:
            httpGet:
              path: /healthcheck
              port: 3002
          readinessProbe:
            httpGet:
              path: /healthcheck
              port: 3002
          securityContext:
            privileged: false
      restartPolicy: Always
      terminationGracePeriodSeconds: 30
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 1
      maxSurge: 1
