[CONSUL] Add limits to consul chart.
[oom.git] / kubernetes / pomba / charts / pomba-networkdiscovery / templates / service.yaml
1 # Copyright © 2018 Amdocs\r
2 #\r
3 # Licensed under the Apache License, Version 2.0 (the "License");\r
4 # you may not use this file except in compliance with the License.\r
5 # You may obtain a copy of the License at\r
6 #\r
7 #       http://www.apache.org/licenses/LICENSE-2.0\r
8 #\r
9 # Unless required by applicable law or agreed to in writing, software\r
10 # distributed under the License is distributed on an "AS IS" BASIS,\r
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
12 # See the License for the specific language governing permissions and\r
13 # limitations under the License.\r
14 \r
15 apiVersion: v1\r
16 kind: Service\r
17 metadata:\r
18   name: {{ include "common.servicename" . }}\r
19   namespace: {{ include "common.namespace" . }}\r
20   labels:\r
21     app: {{ include "common.name" . }}\r
22     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}\r
23     release: {{ include "common.release" . }}\r
24     heritage: {{ .Release.Service }}\r
25 spec:\r
26   type: {{ .Values.service.type }}\r
27   ports:\r
28     {{if eq .Values.service.type "NodePort" -}}\r
29     - port: {{ .Values.service.externalPort }}\r
30       targetPort: {{ .Values.service.internalPort }}\r
31       nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}\r
32       name: {{ .Values.service.portName | default "http" }}\r
33     {{- else -}}\r
34     - port: {{ .Values.service.externalPort }}\r
35       targetPort: {{ .Values.service.internalPort }}\r
36       name: {{ .Values.service.portName | default "http" }}\r
37     {{- end}}\r
38   selector:\r
39     app: {{ include "common.name" . }}\r
40     release: {{ include "common.release" . }}\r