apiVersion: apps/v1
kind: Deployment
metadata:
  name: set-img
spec:
  replicas: 1
  selector:
    matchLabels:
      app: set-img
  template:
    metadata:
      labels:
        app: set-img
    spec:
      serviceAccountName: set-img
      containers:
      - env:
        - name: SOME_ENV
          value: SOME_VALUE
        name: img
        image: datewu/set-img:v0.1.4
        ports:
        - containerPort: 8080
          protocol: TCP
        resources:
          limits: 
            cpu: 50m
            memory: 50Mi
        volumeMounts:
          - name: pem
            mountPath: /opt/private_key_for_sign.pem
            subPath: private_key_for_sign.pem
            readOnly: true
      volumes:
        - name: pem
          secret:
            defaultMode: 420
            secretName: set-img
