apiVersion: v1
kind: Pod
metadata:
  name: candy-service
spec:
  securityContext:
    fsGroup: 2000
  serviceAccountName: candy-svc
  containers:
    - name: candy-service
      image: linuxacademycontent/candy-service:1
      volumeMounts:
        - name: config-volume
          mountPath: /etc/candy-service
      env:
        - name: DB_PASSWORD
          valueFrom:
            secretKeyRef:
              name: db-password
              key: password
      resources:
        requests:
          cpu: "250m"
          memory: "64Mi"
        limits:
          cpu: "500m"
          memory: "128Mi"
  volumes:
    - name: config-volume
      configMap:
        name: candy-service-config
