apiVersion: apps/v1
kind: Deployment
metadata:
  name: credstash-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      name: credstash-operator
  template:
    metadata:
      labels:
        name: credstash-operator
    spec:
      serviceAccountName: credstash-operator
      containers:
        - name: credstash-operator
          image: quay.io/ouzi/credstash-operator:latest
          command:
            - credstash-operator
          imagePullPolicy: Always
          envFrom:
            - secretRef:
                name: aws-credentials
          env:
#            - name: WATCH_NAMESPACE
#              valueFrom:
#                fieldRef:
#                  fieldPath: metadata.namespace
            - name: SERVICE_MONITOR_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "credstash-operator"
