This commit is contained in:
zeaslity
2024-10-30 16:30:51 +08:00
commit 437acbeb63
3363 changed files with 653948 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
{{- $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 }}
{{- if .modules }}
cmii.modules: {{ .modules }}
{{- end }}
cmii.app: {{ $applicationName }}
helm.sh/chart: {{ include "uavcloud-be-core.chart" $scope }}
app.kubernetes.io/managed-by: {{ $.Release.Service }}
{{- if $.Chart.AppVersion }}
app.kubernetes.io/version: {{ $.Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/app-version: {{ $.Values.global.image.tag | quote }}
spec:
type: {{ $.Values.global.appServiceType.backend }}
selector:
cmii.type: {{ $.Values.application.type }}
cmii.app: {{ $applicationName }}
ports:
- name: backend-tcp
port: 8080
protocol: TCP
targetPort: 8080
---
{{- end }}
{{- end }}