From 32e6e73489760d8411f49ea61ef6554228e7d7a7 Mon Sep 17 00:00:00 2001 From: Anover000 Date: Thu, 29 Aug 2024 01:06:16 +0530 Subject: [PATCH 1/4] Make service type configurable. --- .../ph-ee-engine/connector-ams-mifos/templates/service.yaml | 5 ++++- helm/ph-ee-engine/connector-channel/templates/service.yaml | 5 ++++- helm/ph-ee-engine/connector-mojaloop/templates/service.yaml | 5 ++++- .../connector-ph-ee-bulk/templates/service.yaml | 5 ++++- helm/ph-ee-engine/operations-app/templates/service.yaml | 5 ++++- helm/ph-ee-engine/operations-web/templates/service.yaml | 4 ++++ helm/ph-ee-engine/vouchers/templates/service.yaml | 6 ++++-- 7 files changed, 28 insertions(+), 7 deletions(-) diff --git a/helm/ph-ee-engine/connector-ams-mifos/templates/service.yaml b/helm/ph-ee-engine/connector-ams-mifos/templates/service.yaml index 8dcc31d18..327f6e8da 100644 --- a/helm/ph-ee-engine/connector-ams-mifos/templates/service.yaml +++ b/helm/ph-ee-engine/connector-ams-mifos/templates/service.yaml @@ -11,6 +11,9 @@ spec: port: 80 protocol: TCP targetPort: 5000 + {{ - if eq .Values.service.type "NodePort" }} + nodePort: {{ .Values.service.nodePort.port}} + {{ - end }} - name: http port: 70 protocol: TCP @@ -18,5 +21,5 @@ spec: selector: app: ph-ee-connector-ams-mifos sessionAffinity: None - type: ClusterIP + type: {{ .Values.service.type | default "ClusterIP" }} {{- end }} \ No newline at end of file diff --git a/helm/ph-ee-engine/connector-channel/templates/service.yaml b/helm/ph-ee-engine/connector-channel/templates/service.yaml index 9b0b5dbe8..5db153731 100644 --- a/helm/ph-ee-engine/connector-channel/templates/service.yaml +++ b/helm/ph-ee-engine/connector-channel/templates/service.yaml @@ -15,6 +15,9 @@ spec: port: 8443 protocol: TCP targetPort: 8443 + {{ - if eq .Values.service.type "NodePort" }} + nodePort: {{ .Values.service.nodePort.port}} + {{ - end }} - name: http port: 82 protocol: TCP @@ -22,5 +25,5 @@ spec: selector: app: ph-ee-connector-channel sessionAffinity: None - type: ClusterIP + type: {{ .Values.service.type | default "ClusterIP" }} {{- end }} \ No newline at end of file diff --git a/helm/ph-ee-engine/connector-mojaloop/templates/service.yaml b/helm/ph-ee-engine/connector-mojaloop/templates/service.yaml index 6c010223d..164b7a9a4 100644 --- a/helm/ph-ee-engine/connector-mojaloop/templates/service.yaml +++ b/helm/ph-ee-engine/connector-mojaloop/templates/service.yaml @@ -15,8 +15,11 @@ spec: protocol: TCP port: 8080 # Port where Actuator endpoints are exposed targetPort: 8080 + {{ - if eq .Values.service.type "NodePort" }} + nodePort: {{ .Values.service.nodePort.port}} + {{ - end }} selector: app: ph-ee-connector-mojaloop-java sessionAffinity: None - type: ClusterIP + type: {{ .Values.service.type | default "ClusterIP" }} {{- end }} diff --git a/helm/ph-ee-engine/connector-ph-ee-bulk/templates/service.yaml b/helm/ph-ee-engine/connector-ph-ee-bulk/templates/service.yaml index f62c97b6a..57e012cf6 100644 --- a/helm/ph-ee-engine/connector-ph-ee-bulk/templates/service.yaml +++ b/helm/ph-ee-engine/connector-ph-ee-bulk/templates/service.yaml @@ -11,9 +11,12 @@ spec: port: 80 protocol: TCP targetPort: 8080 + {{ - if eq .Values.service.type "NodePort" }} + nodePort: {{ .Values.service.nodePort.port}} + {{ - end }} selector: app: ph-ee-connector sessionAffinity: None - type: ClusterIP + type: {{ .Values.service.type | default "ClusterIP" }} {{- end }} \ No newline at end of file diff --git a/helm/ph-ee-engine/operations-app/templates/service.yaml b/helm/ph-ee-engine/operations-app/templates/service.yaml index 60fcc7fb4..25173716a 100644 --- a/helm/ph-ee-engine/operations-app/templates/service.yaml +++ b/helm/ph-ee-engine/operations-app/templates/service.yaml @@ -11,8 +11,11 @@ spec: port: 80 protocol: TCP targetPort: 5000 + {{ - if eq .Values.service.type "NodePort" }} + nodePort: {{ .Values.service.nodePort.port}} + {{ - end }} selector: app: ph-ee-operations-app sessionAffinity: None - type: ClusterIP + type: {{ .Values.service.type | default "ClusterIP" }} {{- end }} \ No newline at end of file diff --git a/helm/ph-ee-engine/operations-web/templates/service.yaml b/helm/ph-ee-engine/operations-web/templates/service.yaml index cd012df14..48c98362d 100644 --- a/helm/ph-ee-engine/operations-web/templates/service.yaml +++ b/helm/ph-ee-engine/operations-web/templates/service.yaml @@ -10,4 +10,8 @@ spec: - protocol: TCP port: 4200 targetPort: 80 + {{ - if eq .Values.service.type "NodePort" }} + nodePort: {{ .Values.service.nodePort.port}} + {{ - end }} + type: {{ .Values.service.type | default "ClusterIP" }} {{- end }} \ No newline at end of file diff --git a/helm/ph-ee-engine/vouchers/templates/service.yaml b/helm/ph-ee-engine/vouchers/templates/service.yaml index 47ac4b6b6..6dd2ef444 100644 --- a/helm/ph-ee-engine/vouchers/templates/service.yaml +++ b/helm/ph-ee-engine/vouchers/templates/service.yaml @@ -11,9 +11,11 @@ spec: port: 80 protocol: TCP targetPort: 8080 - + {{ - if eq .Values.service.type "NodePort" }} + nodePort: {{ .Values.service.nodePort.port}} + {{ - end }} selector: app: ph-ee-vouchers sessionAffinity: None - type: ClusterIP + type: {{ .Values.service.type | default "ClusterIP" }} {{- end }} \ No newline at end of file From 2557c7f5e111b9b275b589caafcc5fe5f92b0628 Mon Sep 17 00:00:00 2001 From: Anover000 Date: Thu, 29 Aug 2024 01:17:58 +0530 Subject: [PATCH 2/4] Skip Voucher. --- helm/ph-ee-engine/vouchers/templates/service.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/helm/ph-ee-engine/vouchers/templates/service.yaml b/helm/ph-ee-engine/vouchers/templates/service.yaml index 6dd2ef444..47ac4b6b6 100644 --- a/helm/ph-ee-engine/vouchers/templates/service.yaml +++ b/helm/ph-ee-engine/vouchers/templates/service.yaml @@ -11,11 +11,9 @@ spec: port: 80 protocol: TCP targetPort: 8080 - {{ - if eq .Values.service.type "NodePort" }} - nodePort: {{ .Values.service.nodePort.port}} - {{ - end }} + selector: app: ph-ee-vouchers sessionAffinity: None - type: {{ .Values.service.type | default "ClusterIP" }} + type: ClusterIP {{- end }} \ No newline at end of file From 34a8e74d892b22d856ca45bedb37726280f57303 Mon Sep 17 00:00:00 2001 From: Anover000 Date: Thu, 29 Aug 2024 01:26:43 +0530 Subject: [PATCH 3/4] Fix parse error. --- .../ph-ee-engine/connector-ams-mifos/templates/service.yaml | 4 ++-- helm/ph-ee-engine/connector-channel/templates/service.yaml | 4 ++-- helm/ph-ee-engine/connector-mojaloop/templates/service.yaml | 4 ++-- .../connector-ph-ee-bulk/templates/service.yaml | 4 ++-- helm/ph-ee-engine/operations-app/templates/service.yaml | 4 ++-- helm/ph-ee-engine/operations-web/templates/service.yaml | 4 ++-- helm/ph-ee-engine/vouchers/templates/service.yaml | 6 ++++-- 7 files changed, 16 insertions(+), 14 deletions(-) diff --git a/helm/ph-ee-engine/connector-ams-mifos/templates/service.yaml b/helm/ph-ee-engine/connector-ams-mifos/templates/service.yaml index 327f6e8da..be79f5acd 100644 --- a/helm/ph-ee-engine/connector-ams-mifos/templates/service.yaml +++ b/helm/ph-ee-engine/connector-ams-mifos/templates/service.yaml @@ -11,9 +11,9 @@ spec: port: 80 protocol: TCP targetPort: 5000 - {{ - if eq .Values.service.type "NodePort" }} + {{- if eq .Values.service.type "NodePort" }} nodePort: {{ .Values.service.nodePort.port}} - {{ - end }} + {{- end }} - name: http port: 70 protocol: TCP diff --git a/helm/ph-ee-engine/connector-channel/templates/service.yaml b/helm/ph-ee-engine/connector-channel/templates/service.yaml index 5db153731..879692459 100644 --- a/helm/ph-ee-engine/connector-channel/templates/service.yaml +++ b/helm/ph-ee-engine/connector-channel/templates/service.yaml @@ -15,9 +15,9 @@ spec: port: 8443 protocol: TCP targetPort: 8443 - {{ - if eq .Values.service.type "NodePort" }} + {{- if eq .Values.service.type "NodePort" }} nodePort: {{ .Values.service.nodePort.port}} - {{ - end }} + {{- end }} - name: http port: 82 protocol: TCP diff --git a/helm/ph-ee-engine/connector-mojaloop/templates/service.yaml b/helm/ph-ee-engine/connector-mojaloop/templates/service.yaml index 164b7a9a4..7dde2491e 100644 --- a/helm/ph-ee-engine/connector-mojaloop/templates/service.yaml +++ b/helm/ph-ee-engine/connector-mojaloop/templates/service.yaml @@ -15,9 +15,9 @@ spec: protocol: TCP port: 8080 # Port where Actuator endpoints are exposed targetPort: 8080 - {{ - if eq .Values.service.type "NodePort" }} + {{- if eq .Values.service.type "NodePort" }} nodePort: {{ .Values.service.nodePort.port}} - {{ - end }} + {{- end }} selector: app: ph-ee-connector-mojaloop-java sessionAffinity: None diff --git a/helm/ph-ee-engine/connector-ph-ee-bulk/templates/service.yaml b/helm/ph-ee-engine/connector-ph-ee-bulk/templates/service.yaml index 57e012cf6..c4653f558 100644 --- a/helm/ph-ee-engine/connector-ph-ee-bulk/templates/service.yaml +++ b/helm/ph-ee-engine/connector-ph-ee-bulk/templates/service.yaml @@ -11,9 +11,9 @@ spec: port: 80 protocol: TCP targetPort: 8080 - {{ - if eq .Values.service.type "NodePort" }} + {{- if eq .Values.service.type "NodePort" }} nodePort: {{ .Values.service.nodePort.port}} - {{ - end }} + {{- end }} selector: app: ph-ee-connector diff --git a/helm/ph-ee-engine/operations-app/templates/service.yaml b/helm/ph-ee-engine/operations-app/templates/service.yaml index 25173716a..bb97defa5 100644 --- a/helm/ph-ee-engine/operations-app/templates/service.yaml +++ b/helm/ph-ee-engine/operations-app/templates/service.yaml @@ -11,9 +11,9 @@ spec: port: 80 protocol: TCP targetPort: 5000 - {{ - if eq .Values.service.type "NodePort" }} + {{- if eq .Values.service.type "NodePort" }} nodePort: {{ .Values.service.nodePort.port}} - {{ - end }} + {{- end }} selector: app: ph-ee-operations-app sessionAffinity: None diff --git a/helm/ph-ee-engine/operations-web/templates/service.yaml b/helm/ph-ee-engine/operations-web/templates/service.yaml index 48c98362d..999b58500 100644 --- a/helm/ph-ee-engine/operations-web/templates/service.yaml +++ b/helm/ph-ee-engine/operations-web/templates/service.yaml @@ -10,8 +10,8 @@ spec: - protocol: TCP port: 4200 targetPort: 80 - {{ - if eq .Values.service.type "NodePort" }} + {{- if eq .Values.service.type "NodePort" }} nodePort: {{ .Values.service.nodePort.port}} - {{ - end }} + {{- end }} type: {{ .Values.service.type | default "ClusterIP" }} {{- end }} \ No newline at end of file diff --git a/helm/ph-ee-engine/vouchers/templates/service.yaml b/helm/ph-ee-engine/vouchers/templates/service.yaml index 47ac4b6b6..534c2b178 100644 --- a/helm/ph-ee-engine/vouchers/templates/service.yaml +++ b/helm/ph-ee-engine/vouchers/templates/service.yaml @@ -11,9 +11,11 @@ spec: port: 80 protocol: TCP targetPort: 8080 - + {{- if eq .Values.service.type "NodePort" }} + nodePort: {{ .Values.service.nodePort.port}} + {{- end }} selector: app: ph-ee-vouchers sessionAffinity: None - type: ClusterIP + type: {{ .Values.service.type | default "ClusterIP" }} {{- end }} \ No newline at end of file From 52700224b63b08c32e15269a307a7c1abb9deee6 Mon Sep 17 00:00:00 2001 From: Anover000 Date: Thu, 29 Aug 2024 02:31:12 +0530 Subject: [PATCH 4/4] For bulk. --- helm/ph-ee-engine/connector-bulk/templates/service.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/helm/ph-ee-engine/connector-bulk/templates/service.yaml b/helm/ph-ee-engine/connector-bulk/templates/service.yaml index 657940af7..dda87f38f 100644 --- a/helm/ph-ee-engine/connector-bulk/templates/service.yaml +++ b/helm/ph-ee-engine/connector-bulk/templates/service.yaml @@ -15,8 +15,11 @@ spec: port: 8443 protocol: TCP targetPort: 8443 + {{- if eq .Values.service.type "NodePort" }} + nodePort: {{ .Values.service.nodePort.port}} + {{- end }} selector: app: ph-ee-connector-bulk sessionAffinity: None - type: ClusterIP + type: {{ .Values.service.type | default "ClusterIP" }} {{- end }}