apiVersion: apps/v1
kind: Deployment
metadata:
  name: deployment
spec:
  template:
    spec:
      containers:
      - command:
        - /manager 
        - -userid-header 
        - $(USERID_HEADER) 
        - -userid-prefix 
        - $(USERID_PREFIX) 
        - -workload-identity 
        - $(WORKLOAD_IDENTITY)
        args: []
        name: manager
        env:
        - name: USERID_HEADER
          valueFrom:
            configMapKeyRef:
              name: kubeflow-config
              key: userid-header
        - name: USERID_PREFIX
          valueFrom:
            configMapKeyRef:
              name: kubeflow-config
              key: userid-prefix
        - name: WORKLOAD_IDENTITY
          valueFrom:
            configMapKeyRef:
              name: profiles-config
              key: gcp-sa
      - command:
        - /access-management 
        - -cluster-admin 
        - $(CLUSTER_ADMIN) 
        - -userid-prefix 
        - $(USERID_PREFIX)
        - -userid-header
        - $(USERID_HEADER)
        args: []
        name: kfam
        env:
        - name: USERID_HEADER
          valueFrom:
            configMapKeyRef:
              name: kubeflow-config
              key: userid-header
        - name: USERID_PREFIX
          valueFrom:
            configMapKeyRef:
              name: kubeflow-config
              key: userid-prefix
        - name: CLUSTER_ADMIN
          valueFrom:
            configMapKeyRef:
              name: profiles-config
              key: admin
