Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat(ingress-nginx): remove need for individual ingress annotations #8446

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ Alternative solutions to the first two of these problems would be to host a Kube

## 🌐 DNS

In my cluster there are two [ExternalDNS](https://github.com/kubernetes-sigs/external-dns) instances deployed. One is deployed with the [ExternalDNS webhook provider for UniFi](https://github.com/kashalls/external-dns-unifi-webhook) which syncs DNS records to my UniFi router. The other ExternalDNS instance syncs DNS records to Cloudflare only when the ingresses and services have an ingress class name of `external` and contain an ingress annotation `external-dns.alpha.kubernetes.io/target`. All local clients on my network use my UniFi router as the upstream DNS server.
In my cluster there are two instances of [ExternalDNS](https://github.com/kubernetes-sigs/external-dns) running. One for syncing private DNS records to my `UDM Pro Max` using [ExternalDNS webhook provider for UniFi](https://github.com/kashalls/external-dns-unifi-webhook), while another instance syncs public DNS to `Cloudflare`. This setup is managed by creating ingresses with two specific classes: `internal` for private DNS and `external` for public DNS. The `external-dns` instances then syncs the DNS records to their respective platforms accordingly.

---

Expand Down
2 changes: 0 additions & 2 deletions kubernetes/main/apps/database/emqx/cluster/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: emqx-dashboard
annotations:
external-dns.alpha.kubernetes.io/target: internal.devbu.io
spec:
ingressClassName: internal
rules:
Expand Down
2 changes: 0 additions & 2 deletions kubernetes/main/apps/default/atuin/app/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,6 @@ spec:
scrapeTimeout: 10s
ingress:
app:
annotations:
external-dns.alpha.kubernetes.io/target: internal.devbu.io
className: internal
hosts:
- host: sh.devbu.io
Expand Down
2 changes: 0 additions & 2 deletions kubernetes/main/apps/default/autobrr/app/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ spec:
port: *port
ingress:
app:
annotations:
external-dns.alpha.kubernetes.io/target: internal.devbu.io
className: internal
hosts:
- host: "{{ .Release.Name }}.devbu.io"
Expand Down
2 changes: 0 additions & 2 deletions kubernetes/main/apps/default/bazarr/app/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ spec:
port: *port
ingress:
app:
annotations:
external-dns.alpha.kubernetes.io/target: internal.devbu.io
className: internal
hosts:
- host: bazarr.devbu.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ spec:
port: *port
ingress:
app:
annotations:
external-dns.alpha.kubernetes.io/target: internal.devbu.io
className: internal
hosts:
- host: "{{ .Release.Name }}.devbu.io"
Expand Down
2 changes: 0 additions & 2 deletions kubernetes/main/apps/default/go2rtc/app/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ spec:
protocol: UDP
ingress:
app:
annotations:
external-dns.alpha.kubernetes.io/target: internal.devbu.io
className: internal
hosts:
- host: go2rtc.devbu.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ spec:
port: 12321
ingress:
app:
annotations:
external-dns.alpha.kubernetes.io/target: external.devbu.io
className: external
hosts:
- host: hass.devbu.io
Expand All @@ -96,8 +94,6 @@ spec:
identifier: app
port: http
code-server:
annotations:
external-dns.alpha.kubernetes.io/target: internal.devbu.io
className: internal
hosts:
- host: hass-code.devbu.io
Expand Down
2 changes: 0 additions & 2 deletions kubernetes/main/apps/default/miniflux/app/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ spec:
scrapeTimeout: 10s
ingress:
app:
annotations:
external-dns.alpha.kubernetes.io/target: internal.devbu.io
className: internal
hosts:
- host: "{{ .Release.Name }}.devbu.io"
Expand Down
2 changes: 0 additions & 2 deletions kubernetes/main/apps/default/overseerr/app/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ spec:
port: *port
ingress:
app:
annotations:
external-dns.alpha.kubernetes.io/target: external.devbu.io
className: external
hosts:
- host: requests.devbu.io
Expand Down
2 changes: 0 additions & 2 deletions kubernetes/main/apps/default/pinchflat/app/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ spec:
port: *port
ingress:
app:
annotations:
external-dns.alpha.kubernetes.io/target: internal.devbu.io
className: internal
hosts:
- host: "{{ .Release.Name }}.devbu.io"
Expand Down
1 change: 0 additions & 1 deletion kubernetes/main/apps/default/plex/app/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ spec:
ingress:
app:
annotations:
external-dns.alpha.kubernetes.io/target: external.devbu.io
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
className: external
hosts:
Expand Down
2 changes: 0 additions & 2 deletions kubernetes/main/apps/default/prowlarr/app/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ spec:
port: *port
ingress:
app:
annotations:
external-dns.alpha.kubernetes.io/target: internal.devbu.io
className: internal
hosts:
- host: "{{ .Release.Name }}.devbu.io"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ spec:
protocol: TCP
ingress:
app:
annotations:
external-dns.alpha.kubernetes.io/target: internal.devbu.io
className: internal
hosts:
- host: qb.devbu.io
Expand Down
2 changes: 0 additions & 2 deletions kubernetes/main/apps/default/radarr/app/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ spec:
port: *port
ingress:
app:
annotations:
external-dns.alpha.kubernetes.io/target: internal.devbu.io
className: internal
hosts:
- host: "{{ .Release.Name }}.devbu.io"
Expand Down
2 changes: 0 additions & 2 deletions kubernetes/main/apps/default/sabnzbd/app/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ spec:
port: *port
ingress:
app:
annotations:
external-dns.alpha.kubernetes.io/target: internal.devbu.io
className: internal
hosts:
- host: sab.devbu.io
Expand Down
2 changes: 0 additions & 2 deletions kubernetes/main/apps/default/slskd/app/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ spec:
scrapeTimeout: 10s
ingress:
app:
annotations:
external-dns.alpha.kubernetes.io/target: internal.devbu.io
className: internal
hosts:
- host: "{{ .Release.Name }}.devbu.io"
Expand Down
2 changes: 0 additions & 2 deletions kubernetes/main/apps/default/sonarr/app/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ spec:
port: *port
ingress:
app:
annotations:
external-dns.alpha.kubernetes.io/target: internal.devbu.io
className: internal
hosts:
- host: "{{ .Release.Name }}.devbu.io"
Expand Down
2 changes: 0 additions & 2 deletions kubernetes/main/apps/default/tautulli/app/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ spec:
port: *port
ingress:
app:
annotations:
external-dns.alpha.kubernetes.io/target: internal.devbu.io
className: internal
hosts:
- host: "{{ .Release.Name }}.devbu.io"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ spec:
port: *port
ingress:
app:
annotations:
external-dns.alpha.kubernetes.io/target: internal.devbu.io
className: internal
hosts:
- host: zigbee.devbu.io
Expand Down
2 changes: 0 additions & 2 deletions kubernetes/main/apps/default/zwave/app/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ spec:
port: 3000
ingress:
app:
annotations:
external-dns.alpha.kubernetes.io/target: internal.devbu.io
className: internal
hosts:
- host: "{{ .Release.Name }}.devbu.io"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: webhook-receiver
annotations:
external-dns.alpha.kubernetes.io/target: external.devbu.io
spec:
ingressClassName: external
rules:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,5 @@ spec:
rollOutPods: true
ingress:
enabled: true
annotations:
external-dns.alpha.kubernetes.io/target: internal.devbu.io
className: internal
hosts: ["hubble.devbu.io"]
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ spec:
scrapeTimeout: 10s
ingress:
app:
annotations:
external-dns.alpha.kubernetes.io/target: external.devbu.io
className: external
hosts:
- host: "{{ .Release.Name }}.devbu.io"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
replicaCount: 2
service:
annotations:
external-dns.alpha.kubernetes.io/hostname: external.devbu.io
external-dns.alpha.kubernetes.io/hostname: &hostname external.devbu.io
lbipam.cilium.io/ips: 192.168.42.126
ingressClassResource:
name: external
Expand Down Expand Up @@ -79,7 +79,10 @@ spec:
any: true
extraArgs:
default-ssl-certificate: network/devbu-io-tls
publish-status-address: *hostname
terminationGracePeriodSeconds: 120
publishService:
enabled: false
resources:
requests:
cpu: 100m
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
replicaCount: 2
service:
annotations:
external-dns.alpha.kubernetes.io/hostname: internal.devbu.io
external-dns.alpha.kubernetes.io/hostname: &hostname internal.devbu.io
lbipam.cilium.io/ips: 192.168.42.121
ingressClassResource:
name: internal
Expand Down Expand Up @@ -73,7 +73,10 @@ spec:
any: true
extraArgs:
default-ssl-certificate: network/devbu-io-tls
publish-status-address: *hostname
terminationGracePeriodSeconds: 120
publishService:
enabled: false
resources:
requests:
cpu: 100m
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ spec:
fullnameOverride: blackbox-exporter
ingress:
enabled: true
annotations:
external-dns.alpha.kubernetes.io/target: internal.devbu.io
className: internal
hosts:
- host: blackbox-exporter.devbu.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,6 @@ spec:
scrapeTimeout: 10s
ingress:
app:
annotations:
external-dns.alpha.kubernetes.io/target: external.devbu.io
className: external
hosts:
- host: status.devbu.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,6 @@ spec:
enabled: true
ingress:
enabled: true
annotations:
external-dns.alpha.kubernetes.io/target: internal.devbu.io
ingressClassName: internal
hosts: ["grafana.devbu.io"]
persistence:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ spec:
port: *healthPort
ingress:
app:
annotations:
external-dns.alpha.kubernetes.io/target: external.devbu.io
className: external
hosts:
- host: "{{ .Release.Name }}.devbu.io"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ spec:
alertmanager:
ingress:
enabled: true
annotations:
external-dns.alpha.kubernetes.io/target: internal.devbu.io
ingressClassName: internal
hosts: ["alertmanager.devbu.io"]
pathType: Prefix
Expand Down Expand Up @@ -71,8 +69,6 @@ spec:
prometheus:
ingress:
enabled: true
annotations:
external-dns.alpha.kubernetes.io/target: internal.devbu.io
ingressClassName: internal
hosts: ["prometheus.devbu.io"]
pathType: Prefix
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ spec:
createPrometheusRules: true
ingress:
dashboard:
annotations:
external-dns.alpha.kubernetes.io/target: internal.devbu.io
ingressClassName: internal
host:
name: rook.devbu.io
Expand Down Expand Up @@ -199,7 +197,6 @@ spec:
# ingress:
# enabled: true
# annotations:
# external-dns.alpha.kubernetes.io/target: internal.devbu.io
# nginx.ingress.kubernetes.io/proxy-body-size: "0"
# nginx.ingress.kubernetes.io/proxy-request-buffering: "off"
# ingressClassName: internal
Expand Down
Loading