apiVersion: apps/v1
kind: Deployment
metadata:
  name: encrypted-secrets
  namespace: ethereum-2
  labels:
    app.kubernetes.io/name: encrypted-secrets
    app.kubernetes.io/version: v0.1.0-alpha.5
spec:
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app.kubernetes.io/name: encrypted-secrets
  template:
    metadata:
      labels:
        app.kubernetes.io/name: encrypted-secrets
        app.kubernetes.io/version: v0.1.0-alpha.5
    spec:
      serviceAccountName: encrypted-secrets
      containers:
      - name: encrypted-secrets
        image: quay.io/linki/encrypted-secrets:v0.1.0-alpha.5
        args:
        - --zap-devel
        env:
        - name: WATCH_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        - name: OPERATOR_NAME
          value: encrypted-secrets
        ports:
        - name: metrics
          containerPort: 8383
        readinessProbe:
          httpGet:
            path: /metrics
            port: metrics
          failureThreshold: 5
          initialDelaySeconds: 5
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 10
        livenessProbe:
          httpGet:
            path: /metrics
            port: metrics
          failureThreshold: 5
          initialDelaySeconds: 5
          periodSeconds: 60
          successThreshold: 1
          timeoutSeconds: 30
        resources:
          requests:
            cpu: 10m
            memory: 16Mi
          limits:
            cpu: 20m
            memory: 32Mi
        securityContext:
          runAsNonRoot: true
          runAsUser: 65534
          readOnlyRootFilesystem: true
          capabilities:
            drop: ["ALL"]
