From ceb62777cf56bc3c2fafe2830ccc55cc07976602 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Wa=C5=9B?= Date: Sun, 12 May 2024 11:42:13 +0200 Subject: [PATCH] Add a simple connectivity test --- .../templates/tests/test-connection.yaml | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 charts/trino/templates/tests/test-connection.yaml 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