summaryrefslogtreecommitdiffstats
path: root/kubernetes/common/cassandra/templates/service.yaml
diff options
context:
space:
mode:
authorBorislav Glozman <Borislav.Glozman@amdocs.com>2020-02-06 08:46:04 +0000
committerGerrit Code Review <gerrit@onap.org>2020-02-06 08:46:04 +0000
commit39180c61bcbd8785c84a1f9fd8ff30a6dc594e5d (patch)
tree15c50f40e87bfd2a4546e8b3f42184384a45fb6f /kubernetes/common/cassandra/templates/service.yaml
parent0ccdd6c9f20793ae46d0b39650d314e01ddec908 (diff)
parent60c7480788eee721c42e824ae22115073705c9c5 (diff)
Merge "[COMMON] Create templates for services and PV"
Diffstat (limited to 'kubernetes/common/cassandra/templates/service.yaml')
-rw-r--r--kubernetes/common/cassandra/templates/service.yaml36
1 files changed, 1 insertions, 35 deletions
diff --git a/kubernetes/common/cassandra/templates/service.yaml b/kubernetes/common/cassandra/templates/service.yaml
index 6cbddbea40..0b91076f82 100644
--- a/kubernetes/common/cassandra/templates/service.yaml
+++ b/kubernetes/common/cassandra/templates/service.yaml
@@ -12,38 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-apiVersion: v1
-kind: Service
-metadata:
- name: {{ include "common.servicename" . }}
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
- annotations:
- service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
-spec:
- type: {{ .Values.service.type }}
- publishNotReadyAddresses: true
- ports:
- {{if eq .Values.service.type "NodePort" -}}
- {{- $global := . }}
- {{- range $index, $ports := .Values.service.ports }}
- - port: {{ $ports.port }}
- targetPort: {{ $ports.port }}
- nodePort: {{ $global.Values.global.nodePortPrefix | default $global.Values.nodePortPrefix }}{{ $ports.nodePort }}
- name: {{ $ports.name }}
- {{- end }}
-{{- else -}}
- {{- range $index, $ports := .Values.service.ports }}
- - port: {{ $ports.port }}
- targetPort: {{ $ports.port }}
- name: {{ $ports.name }}
- {{- end }}
-{{- end}}
- selector:
- app: {{ include "common.name" . }}
- release: {{ include "common.release" . }}
- clusterIP: None
+{{ include "common.headlessService" . }}