apiVersion: apps/v1
kind: Deployment
metadata:
  name: deployment
spec:
  template:
    metadata:
      labels:
        sidecar.istio.io/inject: "true"
    spec:
      containers:
      - command:
        - /access-management
        - "-cluster-admin"
        - $(ADMIN)
        - "-userid-header"
        - $(USERID_HEADER)
        - "-userid-prefix"
        - $(USERID_PREFIX)
        envFrom:
          - configMapRef:
              name: config
        image: ghcr.io/kubeflow/kubeflow/kfam
        imagePullPolicy: IfNotPresent
        name: kfam
        livenessProbe:
          httpGet:
            path: /metrics
            port: 8081
          initialDelaySeconds: 30
          periodSeconds: 30
        ports:
        - containerPort: 8081
          name: kfam-http
          protocol: TCP
        securityContext:
          allowPrivilegeEscalation: false
          seccompProfile:
            type: RuntimeDefault
          runAsNonRoot: true
          capabilities:
            drop:
            - ALL
      serviceAccountName: controller-service-account
