summaryrefslogtreecommitdiffstats
path: root/kubernetes/dmaap/components/message-router/templates/service.yaml
diff options
context:
space:
mode:
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>2020-03-06 08:58:23 +0100
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>2020-03-06 09:05:15 +0100
commitbe7288889ab975fd7df625eb24463994a2684828 (patch)
tree57ac582da5e10773fb7b55624b6e3b1a85bb96f5 /kubernetes/dmaap/components/message-router/templates/service.yaml
parent88b2f92e51dc29461e0ebe443a24b9e5d99b11be (diff)
[DMaaP MR] Use HTTPS only for external traffic
Use the new template features to create two services for DMaaP Message Router: * One of ClusterIP type with HTTP AND HTTPS port, with the same name as before. * Another of NodePort type with HTTPS only port, with a new name (this one should be used only for external traffic) I've also replaced `tabs` iby spaces in two resources files so it's easier to read the configmap. Issue-ID: DMAAP-1400 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com> Change-Id: I394e0b5327ffe2605f0c4c8b134e49553b06232c
Diffstat (limited to 'kubernetes/dmaap/components/message-router/templates/service.yaml')
-rw-r--r--kubernetes/dmaap/components/message-router/templates/service.yaml41
1 files changed, 1 insertions, 40 deletions
diff --git a/kubernetes/dmaap/components/message-router/templates/service.yaml b/kubernetes/dmaap/components/message-router/templates/service.yaml
index 16fae2a704..2b0b44e246 100644
--- a/kubernetes/dmaap/components/message-router/templates/service.yaml
+++ b/kubernetes/dmaap/components/message-router/templates/service.yaml
@@ -13,43 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-apiVersion: v1
-kind: Service
-metadata:
- name: {{ include "common.servicename" . }}
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
- annotations:
- msb.onap.org/service-info: '[
- {
- "serviceName": "{{ include "common.servicename" . }}",
- "version": "v1",
- "url": "/",
- "protocol": "REST",
- "port": "{{.Values.service.internalPort}}",
- "visualRange":"1"
- }
- ]'
-
-spec:
- type: {{ .Values.service.type }}
- ports:
- {{if eq .Values.service.type "NodePort" -}}
- - port: {{ .Values.service.externalPort }}
- nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
- name: {{ .Values.service.portName }}-{{ .Values.service.externalPort }}
- - port: {{ .Values.service.externalPort2 }}
- nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }}
- name: {{ .Values.service.portName }}-{{ .Values.service.externalPort2 }}
- {{- else -}}
- - port: {{ .Values.service.externalPort }}
- targetPort: {{ .Values.service.internalPort }}
- name: {{ .Values.service.portName }}
- {{- end}}
- selector:
- app: {{ include "common.name" . }}
- release: {{ include "common.release" . }}
+{{ include "common.service" . }}