-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathingress.yml
42 lines (40 loc) · 1.22 KB
/
ingress.yml
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
35
36
37
38
39
40
41
42
---
- name: Configure Ingress
hosts: controllers[0]
vars:
version: 4.2.5
environment:
KUBECONFIG: "/home/{{ ansible_user }}/.kube/config"
tasks:
- name: Create namespace for nginx ingress
kubernetes.core.k8s:
kind: Namespace
name: ingress-nginx
state: present
- name: Add helm repo for nginx ingress
kubernetes.core.helm_repository:
name: ingress-nginx
state: present
repo_url: https://kubernetes.github.io/ingress-nginx
- name: Helm install nginx ingress controller
kubernetes.core.helm:
name: ingress-nginx
namespace: ingress-nginx
chart_ref: ingress-nginx/ingress-nginx
chart_version: "{{ version }}"
values:
controller:
hostNetwork: true
hostPort:
enabled: true
ingressClassResource:
default: true
kind: "DaemonSet"
service:
type: "ClusterIP"
watchIngressWithoutClass: true
- name: "Fix for issue https://github.com/kubernetes/ingress-nginx/issues/5401"
kubernetes.core.k8s:
name: ingress-nginx-admission
kind: ValidatingWebhookConfiguration
state: absent