Files
CmiiDeploy/6-厦门移动-4.1.0/2-helm-chart/charts/frontend-app/templates/service.yaml
zeaslity 437acbeb63 add
2024-10-30 16:30:51 +08:00

35 lines
915 B
YAML

{{- if .Values.enabled }}
{{- $namespace := .Release.Namespace -}}
{{- $scope := $ -}}
{{- range .Values.application.manifest }}
{{- if .enabled -}}
{{- $applicationName := .name | trunc 63 }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ $applicationName }}
namespace: {{ $namespace }}
labels:
cmii.type: {{ $.Values.application.type }}
cmii.app: {{ $applicationName }}
helm.sh/chart: {{ include "frontend-app.chart" $scope }}
app.kubernetes.io/managed-by: {{ $.Release.Service }}
{{- if $.Values.global.image.tag }}
app.kubernetes.io/version: {{ $.Values.global.image.tag }}
{{- end }}
spec:
type: {{ $.Values.global.appServiceType.frontend }}
selector:
cmii.type: {{ $.Values.application.type }}
cmii.app: {{ $applicationName }}
ports:
- name: web-svc-port
port: 9528
protocol: TCP
targetPort: 9528
---
{{- end }}
{{- end }}
{{- end }}