apiVersion: apps/v1
kind: Deployment
metadata:
  name: auth-deployment
  labels:
    run: auth
  namespace: default
spec:
  replicas: 2
  selector:
    matchLabels:
      run: auth
  template:
    metadata:
      labels:
        run: auth
    spec:
      containers:
        - name: auth
          image: pythoncontainer
          command: ["bash", "/opt/auth/runapi.sh"]
          imagePullPolicy: Never
          ports:
            - containerPort: 6868
              protocol: TCP
          envFrom:
            - configMapRef:
                name: environment-configmap
          volumeMounts:
            - name: opt-auth
              mountPath: /opt/auth
      volumes:
        - name: opt-auth
          hostPath:
            path: /opt/auth
