diff --git a/charts/trino/templates/tests/test-connection.yaml b/charts/trino/templates/tests/test-connection.yaml new file mode 100644 index 00000000..94a2655c --- /dev/null +++ b/charts/trino/templates/tests/test-connection.yaml @@ -0,0 +1,25 @@ +apiVersion: v1 +kind: Pod +metadata: + name: "{{ include "trino.fullname" . }}-test-connection" + labels: + app: {{ template "trino.name" . }} + chart: {{ template "trino.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + {{- if .Values.commonLabels }} + {{- tpl (toYaml .Values.commonLabels) . | nindent 4 }} + {{- end }} + annotations: + "helm.sh/hook": test-success +spec: + containers: + - name: cli + image: {{ include "trino.image" . }} + command: ['trino'] + args: + - trino://{{ include "trino.fullname" . }}:{{ .Values.service.port }} + - --debug + - --network-logging=BODY + - --execute=SELECT 1 + restartPolicy: Never