X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ric-aux%2F80-Auxiliary-Functions%2Fhelm%2Fmc-stack%2Fcharts%2Felasticsearch%2Ftemplates%2Fingress.yaml;fp=ric-platform%2F50-RIC-Platform%2Fhelm%2Fdbaas%2Ftemplates%2Fservice.yaml;h=47d0b7265b9b57710d86aa48a1525805dbf22ced;hb=refs%2Fchanges%2F34%2F1234%2F9;hp=af290b79dbd3f761852a4be7bb06803d8b2a87de;hpb=2df61c2fcf64b32ecf7f064ef9cbbe6b54a15bc0;p=it%2Fdep.git diff --git a/ric-platform/50-RIC-Platform/helm/dbaas/templates/service.yaml b/ric-aux/80-Auxiliary-Functions/helm/mc-stack/charts/elasticsearch/templates/ingress.yaml old mode 100644 new mode 100755 similarity index 59% rename from ric-platform/50-RIC-Platform/helm/dbaas/templates/service.yaml rename to ric-aux/80-Auxiliary-Functions/helm/mc-stack/charts/elasticsearch/templates/ingress.yaml index af290b79..47d0b726 --- a/ric-platform/50-RIC-Platform/helm/dbaas/templates/service.yaml +++ b/ric-aux/80-Auxiliary-Functions/helm/mc-stack/charts/elasticsearch/templates/ingress.yaml @@ -1,6 +1,5 @@ ################################################################################ # Copyright (c) 2019 AT&T Intellectual Property. # -# Copyright (c) 2019 Nokia. # # # # Licensed under the Apache License, Version 2.0 (the "License"); # # you may not use this file except in compliance with the License. # @@ -15,22 +14,41 @@ # limitations under the License. # ################################################################################ -apiVersion: v1 -kind: Service +{{- if .Values.ingress.enabled -}} +{{- $fullName := include "uname" . -}} +{{- $servicePort := .Values.httpPort -}} +{{- $ingressPath := .Values.ingress.path -}} +apiVersion: extensions/v1beta1 +kind: Ingress metadata: - name: {{ include "common.servicename.dbaas.tcp" . }} - namespace: {{ include "common.namespace.platform" . }} + name: {{ $fullName }} labels: - app: {{ include "common.namespace.platform" . }}-{{ include "common.name.dbaas" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + app: {{ .Chart.Name }} release: {{ .Release.Name }} - heritage: {{ .Release.Service }} + heritage: {{ .Release.Service }} +{{- with .Values.ingress.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} spec: - selector: - app: {{ include "common.namespace.platform" . }}-{{ include "common.name.dbaas" . }} - release: {{ .Release.Name }} - ports: - - port: {{ include "common.serviceport.dbaas.tcp" . }} - targetPort: "sql" - protocol: "TCP" - name: "sql" +{{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} +{{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ . }} + http: + paths: + - path: {{ $ingressPath }} + backend: + serviceName: {{ $fullName }} + servicePort: {{ $servicePort }} + {{- end }} +{{- end }}