# DaemonSet with default values
# Cluster Ingress specific values are applied at runtime.
kind: DaemonSet
apiVersion: apps/v1
metadata:
  # Name is set at runtime.
  namespace: openshift-ingress
  labels:
    app: router
spec:
  selector:
    matchLabels:
      app: router
  template:
    metadata:
      labels:
        app: router
    spec:
      serviceAccountName: router
      nodeSelector:
        "node-role.kubernetes.io/worker": ""
      containers:
        - name: router
          image: "docker.io/openshift/origin-haproxy-router:v3.11.0"
          imagePullPolicy: IfNotPresent
          ports:
          - name: http
            containerPort: 80
            protocol: TCP
          - name: https
            containerPort: 443
            protocol: TCP
          - name: stats
            containerPort: 1936
            protocol: TCP
          # Merged at runtime.
          env:
          - name: STATS_PORT
            value: "1936"
          - name: ROUTER_SERVICE_NAMESPACE
            value: openshift-ingress
          livenessProbe:
            initialDelaySeconds: 10
            httpGet:
              path: /healthz
              port: 1936
          readinessProbe:
            initialDelaySeconds: 10
            httpGet:
              path: /healthz
              port: 1936
