From c912c7fce1697728be34dee73c54de176bc39de9 Mon Sep 17 00:00:00 2001 From: Edward Cheng Date: Wed, 12 Jun 2024 02:50:05 +1000 Subject: [PATCH 1/3] Revert "fixing errors" This reverts commit ef0929dfbc6c47ba31e28817e03db4777026ee50. --- .../infrastructure/ingress-nginx/ingress-nginx.yaml | 4 ++-- .../ingress-nginx/patches/patches-deployment-ports.yaml | 6 ++++++ .../ingress-nginx/patches/patches-service-ports.yaml | 8 ++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 kubernetes/infrastructure/ingress-nginx/patches/patches-deployment-ports.yaml create mode 100644 kubernetes/infrastructure/ingress-nginx/patches/patches-service-ports.yaml diff --git a/kubernetes/infrastructure/ingress-nginx/ingress-nginx.yaml b/kubernetes/infrastructure/ingress-nginx/ingress-nginx.yaml index 8aa9696..fc16180 100644 --- a/kubernetes/infrastructure/ingress-nginx/ingress-nginx.yaml +++ b/kubernetes/infrastructure/ingress-nginx/ingress-nginx.yaml @@ -24,8 +24,8 @@ spec: name: ingress-nginx-controller patch: | - op: add - path: "/spec/ports/-" - value: + path: "/spec/ports/-" #resouirce we want to change + value: #value we want to use for patching name: capacitor-tcp-9000 nodePort: 31555 port: 9000 diff --git a/kubernetes/infrastructure/ingress-nginx/patches/patches-deployment-ports.yaml b/kubernetes/infrastructure/ingress-nginx/patches/patches-deployment-ports.yaml new file mode 100644 index 0000000..27bfc8e --- /dev/null +++ b/kubernetes/infrastructure/ingress-nginx/patches/patches-deployment-ports.yaml @@ -0,0 +1,6 @@ +- op: add #action + path: "/spec/template/spec/containers/[0]/ports/-" #resouirce we want to change + value: #value we want to use for patching + containerPort: 9000 + name: capacitor + protocol: TCP \ No newline at end of file diff --git a/kubernetes/infrastructure/ingress-nginx/patches/patches-service-ports.yaml b/kubernetes/infrastructure/ingress-nginx/patches/patches-service-ports.yaml new file mode 100644 index 0000000..f59f866 --- /dev/null +++ b/kubernetes/infrastructure/ingress-nginx/patches/patches-service-ports.yaml @@ -0,0 +1,8 @@ +- op: add #action + path: "/spec/ports/-" #resouirce we want to change + value: #value we want to use for patching + name: capacitor-tcp-9000 + nodePort: 31555 + port: 9000 + protocol: TCP + targetPort: 9000 \ No newline at end of file From 45005be6d94df2bbae08df69f68059a4b501e0b8 Mon Sep 17 00:00:00 2001 From: Edward Cheng Date: Wed, 12 Jun 2024 03:07:06 +1000 Subject: [PATCH 2/3] using HelmRelease postrenderer patch --- .../ingress-nginx/ingress-nginx.yaml | 48 ++++++++++--------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/kubernetes/infrastructure/ingress-nginx/ingress-nginx.yaml b/kubernetes/infrastructure/ingress-nginx/ingress-nginx.yaml index fc16180..7e316d1 100644 --- a/kubernetes/infrastructure/ingress-nginx/ingress-nginx.yaml +++ b/kubernetes/infrastructure/ingress-nginx/ingress-nginx.yaml @@ -18,26 +18,28 @@ spec: substituteFrom: - kind: ConfigMap name: ingress-nginx-values - patches: - - target: - kind: Service - name: ingress-nginx-controller - patch: | - - op: add - path: "/spec/ports/-" #resouirce we want to change - value: #value we want to use for patching - name: capacitor-tcp-9000 - nodePort: 31555 - port: 9000 - protocol: TCP - targetPort: 9000 - - target: - kind: Deployment - name: ingress-nginx-controller - patch: | - - op: add - path: "/spec/template/spec/containers/[0]/ports/-" - value: - containerPort: 9000 - name: capacitor - protocol: TCP + postRenderers: + - kustomze: + patches: + - target: + kind: Service + name: ingress-nginx-controller + patch: | + - op: add + path: "/spec/ports/-" #resouirce we want to change + value: #value we want to use for patching + name: capacitor-tcp-9000 + nodePort: 31555 + port: 9000 + protocol: TCP + targetPort: 9000 + - target: + kind: Deployment + name: ingress-nginx-controller + patch: | + - op: add + path: "/spec/template/spec/containers/[0]/ports/-" + value: + containerPort: 9000 + name: capacitor + protocol: TCP From fda0c9b45b1de7f4a64196c0e5815324e6fda959 Mon Sep 17 00:00:00 2001 From: Edward Cheng Date: Wed, 12 Jun 2024 03:07:30 +1000 Subject: [PATCH 3/3] remove unneeded files --- .../ingress-nginx/patches/patches-deployment-ports.yaml | 6 ------ .../ingress-nginx/patches/patches-service-ports.yaml | 8 -------- 2 files changed, 14 deletions(-) delete mode 100644 kubernetes/infrastructure/ingress-nginx/patches/patches-deployment-ports.yaml delete mode 100644 kubernetes/infrastructure/ingress-nginx/patches/patches-service-ports.yaml diff --git a/kubernetes/infrastructure/ingress-nginx/patches/patches-deployment-ports.yaml b/kubernetes/infrastructure/ingress-nginx/patches/patches-deployment-ports.yaml deleted file mode 100644 index 27bfc8e..0000000 --- a/kubernetes/infrastructure/ingress-nginx/patches/patches-deployment-ports.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- op: add #action - path: "/spec/template/spec/containers/[0]/ports/-" #resouirce we want to change - value: #value we want to use for patching - containerPort: 9000 - name: capacitor - protocol: TCP \ No newline at end of file diff --git a/kubernetes/infrastructure/ingress-nginx/patches/patches-service-ports.yaml b/kubernetes/infrastructure/ingress-nginx/patches/patches-service-ports.yaml deleted file mode 100644 index f59f866..0000000 --- a/kubernetes/infrastructure/ingress-nginx/patches/patches-service-ports.yaml +++ /dev/null @@ -1,8 +0,0 @@ -- op: add #action - path: "/spec/ports/-" #resouirce we want to change - value: #value we want to use for patching - name: capacitor-tcp-9000 - nodePort: 31555 - port: 9000 - protocol: TCP - targetPort: 9000 \ No newline at end of file