Merge "Add Common Helm Chart "mariadb-galera""
[oom.git] / kubernetes / aai / charts / aai-cassandra / templates / service.yaml
1 apiVersion: v1
2 kind: Service
3 metadata:
4   name: {{ template "common.fullname" . }}
5   namespace: {{ include "common.namespace" . }}
6   labels:
7     app: {{ template "common.fullname" . }}
8     chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
9     release: "{{ .Release.Name }}"
10     heritage: "{{ .Release.Service }}"
11 spec:
12   clusterIP: None
13   type: {{ .Values.service.type }}
14   ports:
15   - name: cql
16     port: {{ default 9042 .Values.config.ports.cql }}
17     targetPort: {{ default 9042 .Values.config.ports.cql }}
18   - name: thrift
19     port: {{ default 9160 .Values.config.ports.thrift }}
20     targetPort: {{ default 9160 .Values.config.ports.thrift }}
21   {{- if .Values.config.ports.agent }}
22   - name: agent
23     port: {{ .Values.config.ports.agent }}
24     targetPort: {{ .Values.config.ports.agent }}
25   {{- end }}
26   selector:
27     app: {{ template "common.fullname" . }}