From 518a14995966df040b6ca6c2d8edd99b1bb76780 Mon Sep 17 00:00:00 2001 From: Edward Cheng Date: Sat, 20 Jul 2024 12:56:11 +1000 Subject: [PATCH] update service ports adguard-home --- .../ingress-nginx/env/k3s-cluster/values.yaml | 12 ------ scripts/ingress-nginx/adguard-home.yaml | 38 +++++++++++++++++++ scripts/ingress-nginx/patch-ingress-nginx.sh | 6 +++ 3 files changed, 44 insertions(+), 12 deletions(-) create mode 100644 scripts/ingress-nginx/adguard-home.yaml create mode 100644 scripts/ingress-nginx/patch-ingress-nginx.sh diff --git a/infrastructures/ingress-nginx/env/k3s-cluster/values.yaml b/infrastructures/ingress-nginx/env/k3s-cluster/values.yaml index 488aa63..ba77428 100644 --- a/infrastructures/ingress-nginx/env/k3s-cluster/values.yaml +++ b/infrastructures/ingress-nginx/env/k3s-cluster/values.yaml @@ -39,18 +39,6 @@ controller: service: externalTrafficPolicy: Cluster ipFamilyPolicy: SingleStack - ports: |- - dns-tcp: 53 - dhcps-udp: 67 - dns-tls-tcp: 853 - dnscrypt-tcp: 5443 - https-pprof: 6060 - targetPorts: |- - dns-tcp: 53 - dhcps-udp: 67 - dns-tls-tcp: 853 - dnscrypt-tcp: 5443 - https-pprof: 6060 metrics: enabled: ${metrics_enabled:=false} diff --git a/scripts/ingress-nginx/adguard-home.yaml b/scripts/ingress-nginx/adguard-home.yaml new file mode 100644 index 0000000..4c9395e --- /dev/null +++ b/scripts/ingress-nginx/adguard-home.yaml @@ -0,0 +1,38 @@ +spec: + ports: + - name: dns-tcp + port: 53 + targetPort: 53 + protocol: TCP + - name: dns-udp + port: 53 + targetPort: 53 + protocol: UDP + - name: dhcps-udp + port: 67 + targetPort: 67 + protocol: UDP + - name: dhcpc-udp + port: 68 + targetPort: 68 + protocol: UDP + - name: dns-tls-tcp + port: 853 + targetPort: 853 + protocol: TCP + - name: dns-tls-udp + port: 853 + targetPort: 853 + protocol: UDP + - name: dnscrypt-tcp + port: 5443 + targetPort: 5443 + protocol: TCP + - name: dnscrypt-udp + port: 5443 + targetPort: 5443 + protocol: UDP + - name: https-pprof + port: 6060 + targetPort: 6060 + protocol: TCP \ No newline at end of file diff --git a/scripts/ingress-nginx/patch-ingress-nginx.sh b/scripts/ingress-nginx/patch-ingress-nginx.sh new file mode 100644 index 0000000..d90ccf8 --- /dev/null +++ b/scripts/ingress-nginx/patch-ingress-nginx.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -e + +serviceName=$1 + +kubectl patch service ingress-nginx-controller -n ingress-nginx --patch "$(cat $serviceName.yaml)" \ No newline at end of file