apiVersion: apps/v1
kind: Deployment
metadata:
  name: auto-reply-urls
spec:
  replicas: 1
  selector:
    matchLabels:
      name: auto-reply-urls
  template:
    metadata:
      labels:
        name: auto-reply-urls
    spec:
      serviceAccountName: auto-reply-urls
      containers:
        - name: auto-reply-urls
          image: hmctspublic.azurecr.io/timj/auto-reply-urls:10
          command:
          - auto-reply-urls
          imagePullPolicy: Always
          env:
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "auto-reply-urls"
            - name: AZURE_CLIENT_ID
              valueFrom:
                secretKeyRef:
                  name: auto-reply-urls-creds
                  key: azure_client_id
            - name: AZURE_CLIENT_SECRET
              valueFrom:
                secretKeyRef:
                  name: auto-reply-urls-creds
                  key: azure_client_secret
            - name: AZURE_TENANT_ID
              valueFrom:
                secretKeyRef:
                  name: auto-reply-urls-creds
                  key: azure_tenant_id
            - name: OBJECT_ID
              valueFrom:
                secretKeyRef:
                  name: auto-reply-urls-creds
                  key: object_id
