apiVersion: apps/v1
kind: Deployment
metadata:
  name: hykufe-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      name: hykufe-operator
  template:
    metadata:
      labels:
        name: hykufe-operator
    spec:
      serviceAccountName: hykufe-operator
      dnsPolicy: ClusterFirst
      containers:
        - name: hykufe-operator
          # Replace this with the built image name
          image: yoowj7472/hykufe-operator
          command:
          - hykufe-operator
          imagePullPolicy: Always
          env:
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "hykufe-operator"
          envFrom:
            - secretRef:
                name: aws-credential-secret
          volumeMounts:
            - mountPath: /ec2-key
              name: key-volume

      volumes:
        - name: key-volume
          configMap:
            name: operator-key
            items:
              - key: private-key
                path: key.pem

