apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: webhook-bootstrap
spec:
  serviceName: gcp-cred-webhook
  selector:
    matchLabels:
      service: webhook-bootstrap
  template:
    metadata:
      labels:
        service: webhook-bootstrap
    spec:
      containers:
      - command:
        - sh
        - /var/webhook-config/create_ca.sh
        env:
        - name: NAMESPACE
          value: kubeflow
        image: gcr.io/kubeflow-images-public/ingress-setup:latest
        name: bootstrap
        volumeMounts:
        - mountPath: /var/webhook-config/
          name: webhook-config
      restartPolicy: Always
      serviceAccountName: webhook-bootstrap
      volumes:
      - configMap:
          name: webhook-bootstrap-config
        name: webhook-config
  # Workaround for https://github.com/kubernetes-sigs/kustomize/issues/677
  volumeClaimTemplates: []
