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

32 lines
864 B
YAML

{{- $namespace := .Release.Namespace -}}
{{- $scope := $ -}}
{{- range $key, $enable := .Values.application.names }}
{{- if $enable -}}
{{- $applicationName := $key | trunc 63 }}
---
apiVersion: v1
kind: Pod
metadata:
name: "{{ $applicationName }}-test-connection"
namespace: {{ $namespace }}
labels:
type: {{ $.Values.application.type }}
app: {{ $applicationName }}
helm.sh/chart: {{ include "frontend-app.chart" $scope }}
app.kubernetes.io/managed-by: {{ $.Release.Service }}
{{- if $.Chart.AppVersion }}
app.kubernetes.io/version: {{ $.Chart.AppVersion | quote }}
{{- end }}
annotations:
"helm.sh/hook": test-success
spec:
containers:
- name: wget
image: busybox
command: ['wget']
args: ['{{ $applicationName }}:{{ $.Values.service.ports.port }}']
restartPolicy: Never
---
{{- end }}
{{- end }}