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,31 @@
{{- $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 }}