summaryrefslogtreecommitdiff
path: root/roles/kubernetes/addons/ingress-nginx/templates
diff options
context:
space:
mode:
Diffstat (limited to 'roles/kubernetes/addons/ingress-nginx/templates')
-rw-r--r--roles/kubernetes/addons/ingress-nginx/templates/kustomization.daemonset-with-hostnetwork.yml.j234
-rw-r--r--roles/kubernetes/addons/ingress-nginx/templates/kustomization.deployment-with-nodeport.yml.j216
2 files changed, 50 insertions, 0 deletions
diff --git a/roles/kubernetes/addons/ingress-nginx/templates/kustomization.daemonset-with-hostnetwork.yml.j2 b/roles/kubernetes/addons/ingress-nginx/templates/kustomization.daemonset-with-hostnetwork.yml.j2
new file mode 100644
index 00000000..bb421735
--- /dev/null
+++ b/roles/kubernetes/addons/ingress-nginx/templates/kustomization.daemonset-with-hostnetwork.yml.j2
@@ -0,0 +1,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
diff --git a/roles/kubernetes/addons/ingress-nginx/templates/kustomization.deployment-with-nodeport.yml.j2 b/roles/kubernetes/addons/ingress-nginx/templates/kustomization.deployment-with-nodeport.yml.j2
new file mode 100644
index 00000000..f2b5591d
--- /dev/null
+++ b/roles/kubernetes/addons/ingress-nginx/templates/kustomization.deployment-with-nodeport.yml.j2
@@ -0,0 +1,16 @@
+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: /spec/template/spec/nodeSelector
+ value:
+ {{ kubernetes_ingress_nginx_node_selector | to_nice_yaml(indent=2) | indent(10) }}