From 39581fb9707b4eb849198b78841ef4b75f5b050d Mon Sep 17 00:00:00 2001 From: Edward Cheng Date: Mon, 22 Jul 2024 21:29:22 +1000 Subject: [PATCH] change ways to expose port for rlpa --- apps/rlpa-server/base/service.yaml | 4 ++-- resources/ingress-nginx-configmap/base/configmap.yaml | 1 + scripts/ingress-nginx/patch-ingress-nginx.sh | 4 +++- scripts/ingress-nginx/rlpa.yaml | 6 ++++++ 4 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 scripts/ingress-nginx/rlpa.yaml diff --git a/apps/rlpa-server/base/service.yaml b/apps/rlpa-server/base/service.yaml index 84d2798..24c8819 100644 --- a/apps/rlpa-server/base/service.yaml +++ b/apps/rlpa-server/base/service.yaml @@ -8,10 +8,10 @@ metadata: spec: selector: app.kubernetes.io/name: rlpa - type: LoadBalancer + type: ClusterIP internalTrafficPolicy: Cluster ports: - protocol: TCP port: 1888 targetPort: 1888 - name: api + name: rlpa-tcp diff --git a/resources/ingress-nginx-configmap/base/configmap.yaml b/resources/ingress-nginx-configmap/base/configmap.yaml index 2094a13..ee8cdf0 100644 --- a/resources/ingress-nginx-configmap/base/configmap.yaml +++ b/resources/ingress-nginx-configmap/base/configmap.yaml @@ -6,6 +6,7 @@ metadata: data: "53": "adguard-home/adguard-home:53" "853": "adguard-home/adguard-home:853" + "1888": "rlpa/rlpa-server:1888" "5443": "adguard-home/adguard-home:5443" "6060": "adguard-home/adguard-home:6060" --- diff --git a/scripts/ingress-nginx/patch-ingress-nginx.sh b/scripts/ingress-nginx/patch-ingress-nginx.sh index 44782c2..adfcfdc 100644 --- a/scripts/ingress-nginx/patch-ingress-nginx.sh +++ b/scripts/ingress-nginx/patch-ingress-nginx.sh @@ -1,4 +1,6 @@ #!/bin/bash set -e -kubectl patch service ingress-nginx-controller -n argocd --patch-file ports.yaml \ No newline at end of file +fileName=$1 + +kubectl patch service ingress-nginx-controller -n argocd --patch-file $fileName.yaml \ No newline at end of file diff --git a/scripts/ingress-nginx/rlpa.yaml b/scripts/ingress-nginx/rlpa.yaml new file mode 100644 index 0000000..1f551a6 --- /dev/null +++ b/scripts/ingress-nginx/rlpa.yaml @@ -0,0 +1,6 @@ +spec: + ports: + - name: rlpa-tcp + port: 1888 + targetPort: 1888 + protocol: TCP \ No newline at end of file