apiVersion: apps/v1
kind: Deployment
metadata:
  name: gatewayservice-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      name: gatewayservice-operator
  template:
    metadata:
      labels:
        name: gatewayservice-operator
    spec:
      serviceAccountName: gatewayservice-operator
      containers:
        - name: gatewayservice-operator
          # Replace this with the built image name
          image: xunholy/k8s-operator:latest
          command:
            - gatewayservice-operator
          imagePullPolicy: Always
          env:
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: 'gatewayservice-operator'
            - name: DOMAIN
              valueFrom:
                configMapKeyRef:
                  name: gatewayservice-config
                  key: DOMAIN
