apiVersion: v1
kind: Pod
metadata:
  name: bootstrap-cluster-version-operator
  namespace: openshift-cluster-version
  labels:
    k8s-app: cluster-version-operator
spec:
  containers:
  - name: cluster-version-operator
    image: {{.ReleaseImage}}
    imagePullPolicy: Always
    args:
      - "start"
      - "--release-image={{.ReleaseImage}}"
      - "--enable-auto-update=false"
      - "--enable-default-cluster-version=false"
      - "--v=5"
      - "--kubeconfig=/etc/kubernetes/kubeconfig"
    securityContext:
      privileged: true
    terminationMessagePolicy: FallbackToLogsOnError
    volumeMounts:
      - mountPath: /etc/ssl/certs
        name: etc-ssl-certs
        readOnly: true
      - mountPath: /etc/kubernetes/kubeconfig
        name: kubeconfig
        readOnly: true
    env:
      - name: KUBERNETES_SERVICE_PORT # allows CVO to communicate with apiserver directly on same host.
        value: "6443"
      - name: KUBERNETES_SERVICE_HOST # allows CVO to communicate with apiserver directly on same host.
        value: "127.0.0.1"
      - name: NODE_NAME
        valueFrom:
          fieldRef:
            fieldPath: spec.nodeName
  hostNetwork: true
  terminationGracePeriodSeconds: 130
  volumes:
    - name: kubeconfig
      hostPath:
        path: /etc/kubernetes/kubeconfig
    - name: etc-ssl-certs
      hostPath:
        path: /etc/ssl/certs
