aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes
diff options
context:
space:
mode:
authorBruno Sakoto <bruno.sakoto@bell.ca>2020-05-20 07:25:41 -0400
committerBruno Sakoto <bruno.sakoto@bell.ca>2020-05-20 15:20:40 -0400
commit425d5be006c212b3c02fb79405282e6148250eb2 (patch)
tree37a358f10eaff537ce46df3241875965356d75fc /kubernetes
parent314a1876c9c1141d10505842ad17b60a71046bc5 (diff)
Make Policy PAP exposition configurable
Policy PAP endpoint exposition is made configurable using helm override values when deploying. Available options for service type are: * Cluster IP (default value) * Node Port (by overriding policy.pap.service.type value with NodePort) Issue-ID: POLICY-2514 Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca> Change-Id: Ifc3ac09aeb9e8836c0ef15a8b5b60bd8e31dca03
Diffstat (limited to 'kubernetes')
-rw-r--r--kubernetes/policy/charts/pap/templates/service.yaml8
-rw-r--r--kubernetes/policy/charts/pap/values.yaml3
2 files changed, 11 insertions, 0 deletions
diff --git a/kubernetes/policy/charts/pap/templates/service.yaml b/kubernetes/policy/charts/pap/templates/service.yaml
index a23352a17e..b6deb5c75e 100644
--- a/kubernetes/policy/charts/pap/templates/service.yaml
+++ b/kubernetes/policy/charts/pap/templates/service.yaml
@@ -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" . }}
diff --git a/kubernetes/policy/charts/pap/values.yaml b/kubernetes/policy/charts/pap/values.yaml
index 630b2055fa..e5eef01e54 100644
--- a/kubernetes/policy/charts/pap/values.yaml
+++ b/kubernetes/policy/charts/pap/values.yaml
@@ -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