Files
CmiiDeploy/1-outside-deploy/2-helm-chart/charts/all-middleware/charts/mongo/templates/svc.yaml
zeaslity 437acbeb63 add
2024-10-30 16:30:51 +08:00

25 lines
673 B
YAML

{{- if .Values.enabled }}
{{- $namespace := .Release.Namespace -}}
{{- $applicationName := .Values.appName -}}
---
apiVersion: v1
kind: Service
metadata:
name: {{ $applicationName }}
namespace: {{ $namespace }}
labels:
{{- include "uavcloud-middleware.mongo.labels.standard" . | nindent 4 }}
spec:
type: {{ .Values.global.middlewareService.type }}
selector:
{{- include "uavcloud-middleware.mongo.labels.matchLabels" . | nindent 4 }}
ports:
- port: 27017
name: server-27017
targetPort: 27017
{{- if eq .Values.global.middlewareService.type "NodePort" }}
nodePort: {{ .Values.nodePort.mongo }}
{{- end }}
---
{{- end }}