apiVersion: apps/v1
kind: Deployment
metadata:
  name: main-go
  labels:
    app: main-go
spec:
  selector:
    matchLabels:
      app: main-go
  replicas: 1
  template:
    metadata:
      labels:
        app: main-go
    spec:
      volumes:
      - name: nfs-pv-storage
        persistentVolumeClaim:
          claimName: nfs-pv-claim
      containers:
      - name: main-go
        image: main-go:latest
        imagePullPolicy: Never
        ports:
        - containerPort: 8000
        volumeMounts:
        - mountPath: "/mnt/counters"
          name: nfs-pv-storage
        env:  # Environment variables passed to the container
          - name: NUM_CHANNELS
            valueFrom:
              configMapKeyRef:
                name: test-pvc-go-configmap
                key: NUM_CHANNELS
