Merge "Make Policy PAP exposition configurable" into frankfurt
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>
Tue, 26 May 2020 06:53:10 +0000 (06:53 +0000)
committerGerrit Code Review <gerrit@onap.org>
Tue, 26 May 2020 06:53:10 +0000 (06:53 +0000)
kubernetes/policy/charts/pap/templates/service.yaml
kubernetes/policy/charts/pap/values.yaml

index a23352a..b6deb5c 100644 (file)
@@ -1,6 +1,7 @@
 #  ============LICENSE_START=======================================================
 #   Copyright (C) 2019 Nordix Foundation.
 #   Modifications Copyright (C) 2019 AT&T Intellectual Property.
+#   Modifications Copyright (C) 2020 Bell Canada.
 #  ================================================================================
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
@@ -28,10 +29,17 @@ metadata:
     release: {{ include "common.release" . }}
     heritage: {{ .Release.Service }}
 spec:
+  type: {{ .Values.service.type }}
   ports:
+    {{if eq .Values.service.type "NodePort" -}}
+    - port: {{ .Values.service.internalPort }}
+      nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.nodePort }}
+      name: {{ .Values.service.portName }}
+    {{- else -}}
     - port: {{ .Values.service.externalPort }}
       targetPort: {{ .Values.service.internalPort }}
       name: {{ .Values.service.portName }}
+    {{- end}}
   selector:
     app: {{ include "common.name" . }}
     release: {{ include "common.release" . }}
index 630b205..e5eef01 100644 (file)
@@ -1,6 +1,7 @@
 #  ============LICENSE_START=======================================================
 #   Copyright (C) 2019 Nordix Foundation.
 #   Modifications Copyright (C) 2019-2020 AT&T Intellectual Property.
+#   Modifications Copyright (C) 2020 Bell Canada.
 #  ================================================================================
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
@@ -21,6 +22,7 @@
 # Global configuration defaults.
 #################################################################
 global:
+  nodePortPrefixExt: 304
   persistence: {}
   envsubstImage: dibi/envsubst
 
@@ -105,6 +107,7 @@ service:
   portName: policy-pap
   internalPort: 6969
   externalPort: 6969
+  nodePort: 42
 
 ingress:
   enabled: false