#-------------------------------------------------------------------------------
# @license
# Copyright SOAJS All Rights Reserved.
#
# Use of this source code is governed by an Apache license that can be
# found in the LICENSE file at the root of this repository
#-------------------------------------------------------------------------------

apiVersion: v1
kind: Service
metadata:
  name: "{{ .Values.settings.label }}-service"
  namespace: "{{ .Values.global.namespace }}"
  labels:
    service.image.ts: "{{ .Values.global.TS }}"
    soajs.catalog.id: "{{ .Values.settings.catalogId }}"
    soajs.catalog.v: "1"
    soajs.content: "true"
    soajs.env.code: "dashboard"
    soajs.resource.id: "{{ .Values.settings.resourceId }}"
    soajs.service.group: "{{ .Values.settings.item.group }}"
    soajs.service.label: "{{ .Values.settings.label }}"
    soajs.service.mode: "deployment"
    soajs.service.name: "{{ .Values.settings.item.name }}"
    soajs.service.subtype: "mongo"
    soajs.service.type: "cluster"
    soajs.service.version: "{{ .Values.settings.version }}"
spec:
  type: ClusterIP
  ports:
  - port: 27017
    targetPort: 27017
    protocol: TCP
    name: mongo
  selector:
    soajs.service.label: "{{ .Values.settings.label }}"