apiVersion: batch/v1
kind: Job
metadata:
  labels:
    kustomize.component: iap-ingress
  name: ingress-bootstrap
  namespace: kubeflow
spec:
  template:
    metadata:
      labels:
        kustomize.component: iap-ingress
    spec:
      containers:
      - command:
        - /var/ingress-config/ingress_bootstrap.sh
        env:
        - name: NAMESPACE
          valueFrom:
            configMapKeyRef:
              key: istioNamespace
              name: parameters
        - name: TLS_SECRET_NAME
          valueFrom:
            configMapKeyRef:
              key: tlsSecretName
              name: parameters
        - name: TLS_HOST_NAME
          valueFrom:
            configMapKeyRef:
              key: hostname
              name: parameters
        - name: INGRESS_NAME
          valueFrom:
            configMapKeyRef:
              key: ingressName
              name: parameters
        image: gcr.io/kubeflow-images-public/ingress-setup:latest
        name: bootstrap
        volumeMounts:
        - mountPath: /var/ingress-config/
          name: ingress-config
      restartPolicy: OnFailure
      serviceAccountName: kf-admin
      volumes:
      - configMap:
          defaultMode: 493
          name: ingress-bootstrap-config
        name: ingress-config
