apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: gke-node-termination-notifier
  namespace: kube-system
  labels:
    app.kubernetes.io/name: gke-node-termination-notifier
    app.kubernetes.io/instance: gke-node-termination-notifier
spec:
  selector:
    matchLabels:
      app.kubernetes.io/name: gke-node-termination-notifier
      app.kubernetes.io/instance: gke-node-termination-notifier
  template:
    metadata:
      labels:
        app.kubernetes.io/name: gke-node-termination-notifier
        app.kubernetes.io/instance: gke-node-termination-notifier
    spec:
      hostNetwork: true
      containers:
        - name: gke-node-termination-notifier
          image: "ghcr.io/gumigumi4f/gke-node-termination-notifier:master"
          env:
            - name: SLACK_WEBHOOK_URL
              value: ""
          resources:
            limits:
              cpu: 200m
              memory: 48Mi
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                - key: cloud.google.com/gke-accelerator
                  operator: Exists
              - matchExpressions:
                - key: cloud.google.com/gke-preemptible
                  operator: Exists
      tolerations:
        - effect: NoSchedule
          operator: Exists
        - effect: NoExecute
          operator: Exists
