apiVersion: apps/v1
kind: DaemonSet
metadata:
  namespace: openshift-apiserver
  name: apiserver
  labels:
    app: openshift-apiserver
    apiserver: "true"
spec:
  updateStrategy:
    type: RollingUpdate
  selector:
    matchLabels:
      app: openshift-apiserver
      apiserver: "true"
  template:
    metadata:
      name: openshift-apiserver
      labels:
        app: openshift-apiserver
        apiserver: "true"
    spec:
      serviceAccountName: openshift-apiserver-sa
      containers:
      - name: apiserver
        image: ${IMAGE}
        imagePullPolicy: IfNotPresent
        command: ["hypershift", "openshift-apiserver"]
        args:
        - "--config=/var/run/configmaps/config/config.yaml"
        ports:
        - containerPort: 8443
        volumeMounts:
        - mountPath: /var/run/configmaps/config
          name: config
        - mountPath: /var/run/configmaps/client-ca
          name: client-ca
        - mountPath: /var/run/configmaps/etcd-serving-ca
          name: etcd-serving-ca
        - mountPath: /var/run/secrets/etcd-client
          name: etcd-client
        - mountPath: /var/run/secrets/serving-cert
          name: serving-cert
        livenessProbe:
          initialDelaySeconds: 30
          httpGet:
            scheme: HTTPS
            port: 8443
            path: healthz
        readinessProbe:
          httpGet:
            scheme: HTTPS
            port: 8443
            path: healthz
      volumes:
      - name: config
        configMap:
          name: deployment-apiserver-config
      - name: client-ca
        configMap:
          name: client-ca
      - name: etcd-serving-ca
        configMap:
          name: etcd-serving-ca
      - name: etcd-client
        secret:
          secretName: etcd-client
      - name: serving-cert
        secret:
          secretName: serving-cert
      nodeSelector:
        node-role.kubernetes.io/master: ""
      tolerations:
      - operator: Exists
