# Hello Openshift Ingress Canary daemonset
# Specific values are set at runtime
kind: DaemonSet
apiVersion: apps/v1
# name and namespace are set at runtime.
spec:
  progressDeadlineSeconds: 600
  template:
    metadata:
      annotations:
        target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
    spec:
      priorityClassName: system-cluster-critical
      containers:
        - name: serve-healthcheck-canary
          # Image and command are set at runtime
          imagePullPolicy: IfNotPresent
          terminationMessagePolicy: FallbackToLogsOnError
          ports:
          - containerPort: 8080
            protocol: TCP
          - containerPort: 8888
            protocol: TCP
          resources:
            requests:
              cpu: 10m
              memory: 20Mi
      nodeSelector:
        kubernetes.io/os: linux
      tolerations:
        - effect: NoSchedule
          key: node-role.kubernetes.io/infra
          operator: Exists
  updateStrategy:
    type: RollingUpdate
    rollingUpdate:
      # Note: The daemon controller rounds the percentage up
      # (unlike the deployment controller, which rounds down).
      maxUnavailable: 10%
