License addition in all yamls
[oom.git] / kubernetes / sdnc / templates / all-services.yaml
1 # Copyright © 2017 Amdocs, Bell Canada
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #       http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 #{{ if not .Values.disableSdncSdncDbhost }}
16 apiVersion: v1
17 kind: Service
18 metadata:
19   name: dbhost
20   namespace: "{{ .Values.nsPrefix }}"
21   labels:
22     app: sdnc-dbhost
23 spec:
24   ports:
25     - port: 3306
26   selector:
27     app: sdnc-dbhost
28   clusterIP: None
29 ---
30 # Client service for connecting to any MySQL instance for reads.
31 # Only master: sdnc-dbhost-0 accepts the write request.
32 apiVersion: v1
33 kind: Service
34 metadata:
35   name: dbhost-read
36   namespace: "{{ .Values.nsPrefix }}"
37   labels:
38     app: sdnc-dbhost
39 spec:
40   ports:
41   - name: sdnc-dbhost
42     port: 3306
43   selector:
44     app: sdnc-dbhost
45 ---
46 apiVersion: v1
47 kind: Service
48 metadata:
49   name: sdnctldb01
50   namespace: "{{ .Values.nsPrefix }}"
51   labels:
52     app: sdnc-dbhost
53 spec:
54   ports:
55     - port: 3306
56   selector:
57     app: sdnc-dbhost
58   clusterIP: None
59 ---
60 apiVersion: v1
61 kind: Service
62 metadata:
63   name: sdnctldb02
64   namespace: "{{ .Values.nsPrefix }}"
65   labels:
66     app: sdnc-dbhost
67 spec:
68   ports:
69     - port: 3306
70   selector:
71     app: sdnc-dbhost
72   clusterIP: None
73 #{{ end }}
74 #{{ if not .Values.disableSdncSdnc }}
75 ---
76 apiVersion: v1
77 kind: Service
78 metadata:
79   name: sdnc-dgbuilder
80   namespace: "{{ .Values.nsPrefix }}"
81   labels:
82     app: sdnc-dgbuilder
83 spec:
84   ports:
85   - name: "sdnc-dgbuilder-port"
86     port: 3000
87     targetPort: 3100
88     nodePort: {{ .Values.nodePortPrefix }}03
89   type: NodePort
90   selector:
91     app: sdnc-dgbuilder
92 ---
93 apiVersion: v1
94 kind: Service
95 metadata:
96   name: sdnhost
97   namespace: "{{ .Values.nsPrefix }}"
98   labels:
99     app: sdnc
100   annotations:
101     msb.onap.org/service-info: '[
102       {
103           "serviceName": "sdnc",
104           "version": "v1",
105           "url": "/",
106           "protocol": "REST",
107           "port": "8282",
108           "visualRange":"1",
109           "path": "/"
110       }
111       ]'
112 spec:
113   ports:
114   - name: "sdnc-port-8181"
115     port: 8282
116     targetPort: 8181
117     nodePort: {{ .Values.nodePortPrefix }}02
118   - name: "sdnc-port-8101"
119     port: 8201
120     targetPort: 8101
121     nodePort: {{ .Values.nodePortPrefix }}08
122   - name: "sdnc-jolokia-port-8080"
123     port: 8280
124     targetPort: 8080
125     nodePort: {{ .Values.nodePortPrefix }}46
126   type: NodePort
127   selector:
128     app: sdnc
129 ---
130 kind: Service
131 apiVersion: v1
132 metadata:
133   name: nfs-provisioner
134   namespace: "{{ .Values.nsPrefix }}"
135   labels:
136     app: nfs-provisioner
137 spec:
138   ports:
139     - name: nfs
140       port: 2049
141     - name: mountd
142       port: 20048
143     - name: rpcbind
144       port: 111
145     - name: rpcbind-udp
146       port: 111
147       protocol: UDP
148   selector:
149     app: nfs-provisioner
150 #{{ end }}
151 #{{ if not .Values.disableSdncSdncPortal }}
152 ---
153 apiVersion: v1
154 kind: Service
155 metadata:
156   name: sdnc-portal
157   namespace: "{{ .Values.nsPrefix }}"
158   labels:
159     app: sdnc-portal
160   annotations:
161     msb.onap.org/service-info: '[
162       {
163           "serviceName": "sdnc-portal",
164           "version": "v1",
165           "url": "/",
166           "protocol": "UI",
167           "port": "8843",
168           "visualRange":"0|1"
169       }
170       ]'
171 spec:
172   ports:
173   - name: "sdnc-portal-port"
174     port: 8843
175     nodePort: {{ .Values.nodePortPrefix }}01
176   type: NodePort
177   selector:
178     app: sdnc-portal
179 #{{ end }}
180 #{{ if .Values.enableODLCluster }}
181 ---
182 apiVersion: v1
183 kind: Service
184 metadata:
185   name: sdnhost-cluster
186   namespace: "{{ .Values.nsPrefix }}"
187   labels:
188     app: sdnc
189   annotations:
190     service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
191 spec:
192   ports:
193    - name: "sdnc-cluster-port"
194      port: 2550
195   clusterIP: None
196   selector:
197     app: sdnc
198   sessionAffinity: None
199   type: ClusterIP
200 #{{ end }}