5259bb84934edb485f6ed163cdd10ed03b11df82
[it/dep.git] / smo-install / oran_oom / a1controller / templates / service.yaml
1 ################################################################################
2 #   Copyright (c) 2020 Nordix Foundation.                                      #
3 #                                                                              #
4 #   Licensed under the Apache License, Version 2.0 (the "License");            #
5 #   you may not use this file except in compliance with the License.           #
6 #   You may obtain a copy of the License at                                    #
7 #                                                                              #
8 #       http://www.apache.org/licenses/LICENSE-2.0                             #
9 #                                                                              #
10 #   Unless required by applicable law or agreed to in writing, software        #
11 #   distributed under the License is distributed on an "AS IS" BASIS,          #
12 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
13 #   See the License for the specific language governing permissions and        #
14 #   limitations under the License.                                             #
15 ################################################################################
16
17 kind: Service
18 apiVersion: v1
19 metadata:
20   name: {{ include "common.name.a1controller" . }}
21   namespace: {{ include "common.namespace.nonrtric" . }}
22   labels:
23     app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1controller" . }}
24     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
25     release: {{ .Release.Name }}
26     heritage: {{ .Release.Service }}
27 spec:
28   type: ClusterIP
29   ports:
30     {{if eq .Values.a1controller.service.allowHttp true -}}
31     - name: {{ index .Values.a1controller.service.httpName }}
32       port: {{ .Values.a1controller.service.internalPort1 }}
33       targetPort: {{ .Values.a1controller.service.targetPort1 }}
34       protocol: TCP
35     {{- end }}
36     - name: {{ index .Values.a1controller.service.httpsName }}
37       port: {{ .Values.a1controller.service.internalPort2 }}
38       targetPort: {{ .Values.a1controller.service.targetPort2 }}
39       protocol: TCP
40   selector:
41     app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1controller" . }}
42     release: {{ .Release.Name }}
43 ---
44 apiVersion: v1
45 kind: Service
46 metadata:
47   name: dbhost
48   namespace: {{ include "common.namespace.nonrtric" . }}
49 spec:
50   ports:
51     - port: 3306
52       targetPort: 3306
53   selector:
54     app: db
55 ---
56 apiVersion: v1
57 kind: Service
58 metadata:
59   name: sdnctldb01
60   namespace: {{ include "common.namespace.nonrtric" . }}
61 spec:
62   ports:
63     - port: 3306
64       targetPort: 3306
65   selector:
66     app: db