updating helm/docker files and database config files
[it/otf.git] / otf-helm / otf / charts / databases / mysqldb / templates / svc.yaml
1 apiVersion: v1
2 kind: Service
3 metadata:
4   name: {{ template "mysql.fullname" . }}
5   namespace: {{ .Release.Namespace }}
6   labels:
7     app: {{ template "mysql.fullname" . }}
8     chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
9     release: "{{ .Release.Name }}"
10     heritage: "{{ .Release.Service }}"
11   annotations:
12 {{- if .Values.service.annotations }}
13 {{ toYaml .Values.service.annotations | indent 4 }}
14 {{- end }}
15 {{- if and (.Values.metrics.enabled) (.Values.metrics.annotations) }}
16 {{ toYaml .Values.metrics.annotations | indent 4 }}
17 {{- end }}
18 spec:
19   type: {{ .Values.service.type }}
20   {{- if (and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerIP))) }}
21   loadBalancerIP: {{ .Values.service.loadBalancerIP }}
22   {{- end }}
23   ports:
24   - name: mysql
25     port: {{ .Values.service.port }}
26     targetPort: mysql
27     {{- if .Values.service.nodePort }}
28     nodePort: {{ .Values.service.nodePort }}
29     {{- end }}
30   {{- if .Values.metrics.enabled }}
31   - name: metrics
32     port: 9104
33     targetPort: metrics
34   {{- end }}
35   selector:
36     app: {{ template "mysql.fullname" . }}