# Create the actual deployment
apiVersion: apps/v1
kind: Deployment
metadata:
  name: flytepropeller
  namespace: flyte
  labels:
    app: flytepropeller
spec:
  selector:
    matchLabels:
      app: flytepropeller
  template:
    metadata:
      labels:
        app: flytepropeller
        app.kubernetes.io/name: flytepropeller
        app.kubernetes.io/version: 0.7.1
      annotations:
        prometheus.io/scrape: "true"
        prometheus.io/port: "10254"
        prometheus.io/path: "/metrics"
    spec:
      serviceAccountName: flytepropeller
      volumes:
        - name: config-volume
          configMap:
            name: flyte-propeller-config
        - name: auth
          secret:
            secretName: flyte-propeller-auth
      containers:
        - name: flytepropeller
          image: flytepropeller:v0.7.1
          command:
            - flytepropeller
          args:
            - --config
            - /etc/flyte/config/*.yaml
          env:
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
          imagePullPolicy: IfNotPresent
          ports:
            - containerPort: 10254
          volumeMounts:
            - name: config-volume
              mountPath: /etc/flyte/config
            - name: auth
              mountPath: /etc/secrets/
