summaryrefslogtreecommitdiff
path: root/roles/kubernetes/addons/ingress-nginx/templates/kustomization.daemonset-with-hostnetwork.yml.j2
blob: bb421735ff428efca3b84fd0dc3fde518df44958 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
  - upstream.yml

patches:
  - target:
      kind: Deployment
      namespace: ingress-nginx
      name: ingress-nginx-controller
    patch: |-
      - op: replace
        path: /kind
        value: DaemonSet
      - op: replace
        path: /spec/template/spec/hostNetwork
        value: true
      - op: replace
        path: /spec/template/spec/dnsPolicy
        value: ClusterFirstWithHostNet
      - op: replace
        path: /spec/template/spec/nodeSelector
        value:
          {{ kubernetes_ingress_nginx_node_selector | to_nice_yaml(indent=2) | indent(10) }}
    options:
      allowKindChange: true
  - patch: |-
      apiVersion: v1
      kind: Service
      metadata:
        name: ingress-nginx-controller
        namespace: ingress-nginx
      $patch: delete