apiVersion: apps/v1
kind: Deployment
metadata:
  name: api
  labels:
    app: api
spec:
  replicas: 3
  selector:
    matchLabels:
      app: api
  template:
    metadata:
      labels:
        app: api
    spec:
      terminationGracePeriodSeconds: 3
      restartPolicy: Always
      containers:
      - name: api
        image: core-harbor.entigo.io/demo/example-api:latest
        imagePullPolicy: IfNotPresent
        envFrom:
        - configMapRef:
            name: api
        - secretRef:
            name: api
        env:
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        ports:
        - containerPort: 3001
