Skip to content

Commit

Permalink
ingress changes for kubernetes 1.22
Browse files Browse the repository at this point in the history
  • Loading branch information
wardviaene committed Dec 6, 2021
1 parent 497028f commit a712653
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 13 deletions.
45 changes: 32 additions & 13 deletions external-dns/external-dns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,44 @@ kind: ServiceAccount
metadata:
name: external-dns
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: external-dns
rules:
- apiGroups:
- ""
resources:
- services
- endpoints
- pods
- nodes
verbs:
- get
- list
- watch
- apiGroups:
- extensions
- "networking.k8s.io" # k8s 1.14+
resources:
- ingresses
verbs:
- get
- list
- watch
- apiGroups:
- networking.istio.io
resources:
- gateways
verbs:
- get
- list
- watch
- apiGroups: [""]
resources: ["services"]
resources: ["endpoints"]
verbs: ["get","watch","list"]
- apiGroups: [""]
resources: ["pods"]
verbs: ["get","watch","list"]
- apiGroups: ["extensions"]
resources: ["ingresses"]
verbs: ["get","watch","list"]
- apiGroups: [""]
resources: ["nodes"]
verbs: ["list"]
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: external-dns-viewer
Expand Down Expand Up @@ -52,7 +71,7 @@ spec:
serviceAccountName: external-dns
containers:
- name: external-dns
image: k8s.gcr.io/external-dns/external-dns:v0.9.0
image: k8s.gcr.io/external-dns/external-dns:v0.10.1
args:
- --source=service
- --source=ingress
Expand Down
18 changes: 18 additions & 0 deletions external-dns/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: helloworld-rules
annotations:
kubernetes.io/ingress.class: k8s.io/ingress-nginx
spec:
rules:
- host: helloworld-v1.kubernetes.newtech.academy
Expand All @@ -25,3 +27,19 @@ spec:
name: helloworld-v2
port:
number: 80
---
apiVersion: v1
kind: ConfigMap
metadata:
name: ingress-nginx-controller
data:
use-proxy-protocol: "true"
---
apiVersion: networking.k8s.io/v1
kind: IngressClass
metadata:
name: ingress-nginx
annotations:
ingressclass.kubernetes.io/is-default-class: "true"
spec:
controller: k8s.io/ingress-nginx
2 changes: 2 additions & 0 deletions ingress/ingress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: helloworld-rules
annotations:
kubernetes.io/ingress.class: k8s.io/ingress-nginx
spec:
rules:
- host: helloworld-v1.example.com
Expand Down
1 change: 1 addition & 0 deletions ingress/nginx-ingress-controller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ rules:
- "networking.k8s.io"
resources:
- ingresses
- ingressclasses
verbs:
- get
- list
Expand Down

0 comments on commit a712653

Please sign in to comment.