diff options
author | Fiachra Corcoran <fiachra.corcoran@est.tech> | 2023-03-31 19:42:13 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2023-03-31 19:42:13 +0000 |
commit | 1d93334b79aee33512fdf1dd1e3f7b17974c6d20 (patch) | |
tree | 79aec033ec706c0386539f1fc893049d3fdcfee9 /kubernetes/aai/templates/service.yaml | |
parent | 6deab46892efca8727efab7a590760683b75d06e (diff) | |
parent | 5846a6e2d0faa43d5abf23d79bd556508bb87d2d (diff) |
Merge "[AAI] Update Service definitions to support Ingress case"
Diffstat (limited to 'kubernetes/aai/templates/service.yaml')
-rw-r--r-- | kubernetes/aai/templates/service.yaml | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/kubernetes/aai/templates/service.yaml b/kubernetes/aai/templates/service.yaml index a8c3c3957e..5bb5c8bf28 100644 --- a/kubernetes/aai/templates/service.yaml +++ b/kubernetes/aai/templates/service.yaml @@ -26,16 +26,17 @@ metadata: heritage: {{ .Release.Service }} spec: ports: - - name: {{ .Values.service.portName }}{{ if (include "common.needTLS" .) }}s{{ end }} - port: {{ (eq "true" (include "common.needTLS" .)) | ternary .Values.service.externalPort .Values.service.externalPlainPort }} - targetPort: {{ (eq "true" (include "common.needTLS" .)) | ternary .Values.service.internalPort .Values.service.internalPlainPort }} + - name: {{ .Values.service.portName }} + port: {{ .Values.service.externalPort }} + targetPort: {{ .Values.service.internalPort }} {{- if eq .Values.service.type "NodePort" }} + {{ if not (include "common.ingressEnabled" .) }} nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} + {{ end }} {{- end }} - type: {{ .Values.service.type }} + type: {{ if (include "common.ingressEnabled" .) }}ClusterIP{{ else }}{{ .Values.service.type }}{{ end }} selector: app: {{ include "common.name" . }} - clusterIP: {{ .Values.service.aaiServiceClusterIp }} sessionAffinity: {{ .Values.service.sessionAffinity }} --- apiVersion: v1 @@ -51,8 +52,8 @@ metadata: spec: ports: - name: {{ .Values.service.portName }} - port: {{ .Values.service.externalPlainPort }} - targetPort: {{ .Values.service.internalPlainPort }} + port: {{ .Values.service.externalPort }} + targetPort: {{ .Values.service.internalPort }} type: ClusterIP selector: app: {{ include "common.name" . }} |