---
kind: Pod
apiVersion: v1
metadata:
  name: keepalived
  namespace: openshift-vsphere-infra
  creationTimestamp:
  deletionGracePeriodSeconds: 65
  labels:
    app: vsphere-infra-vrrp
spec:
  volumes:
  - name: resource-dir
    hostPath:
      path: "/etc/kubernetes/static-pod-resources/keepalived"
  - name: kubeconfig
    hostPath:
      path: "/etc/kubernetes/kubeconfig"
  - name: conf-dir
    empty-dir: {}
  - name: manifests
    hostPath:
      path: "/opt/openshift/manifests"
  initContainers:
  - name: render-config
    image: {{ .Images.BaremetalRuntimeCfgBootstrap }}
    command:
    - runtimecfg
    - render
    - "/etc/kubernetes/kubeconfig"
    - "--api-vip"
    - "{{ .ControllerConfig.Infra.Status.PlatformStatus.VSphere.APIServerInternalIP }}"
    - "--ingress-vip"
    - "{{ .ControllerConfig.Infra.Status.PlatformStatus.VSphere.IngressIP }}"
    - "/config"
    - "--out-dir"
    - "/etc/keepalived"
    - "--cluster-config"
    - "/opt/openshift/manifests/cluster-config.yaml"
    resources: {}
    volumeMounts:
    - name: resource-dir
      mountPath: "/config"
    - name: kubeconfig
      mountPath: "/etc/kubernetes/kubeconfig"
    - name: conf-dir
      mountPath: "/etc/keepalived"
    - name: manifests
      mountPath: "/opt/openshift/manifests"
    imagePullPolicy: IfNotPresent
  containers:
  - name: keepalived
    securityContext:
      privileged: true
    image: {{ .Images.KeepalivedBootstrap }}
    env:
      - name: NSS_SDB_USE_CACHE
        value: "no"
    command:
    - /usr/sbin/keepalived
    args:
    - "-f"
    - "/etc/keepalived/keepalived.conf"
    - "--dont-fork"
    - "--vrrp"
    - "--log-detail"
    - "--log-console"
    resources:
      requests:
        cpu: 100m
        memory: 200Mi
    volumeMounts:
    - name: conf-dir
      mountPath: "/etc/keepalived"
    terminationMessagePolicy: FallbackToLogsOnError
    imagePullPolicy: IfNotPresent
  hostNetwork: true
  tolerations:
  - operator: Exists
  priorityClassName: system-node-critical
status: {}
