forked from trinodb/charts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test-connection.yaml
46 lines (46 loc) · 1.38 KB
/
test-connection.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
apiVersion: v1
kind: Pod
metadata:
name: {{ include "trino.fullname" . }}-test-connection
labels:
{{- include "trino.labels" . | nindent 4 }}
app.kubernetes.io/component: test
test: connection
annotations:
"helm.sh/hook": test
spec:
containers:
- name: cli
image: {{ include "trino.image" . }}
command: ['trino']
args:
{{- if .Values.server.config.https.enabled }}
# port must match coordinator.additionalExposedPorts
- trino://{{ include "trino.fullname" . }}.{{ .Release.Namespace }}:8443?SSL=true&SSLVerification=FULL&SSLTrustStorePath=/etc/trino/certificates/tls.crt
{{- else }}
- trino://{{ include "trino.fullname" . }}:{{ .Values.service.port }}
{{- end }}
- --user=admin
{{- if eq .Values.server.config.authenticationType "PASSWORD" }}
- --password
{{- end }}
- --debug
- --execute=SELECT 1
- --no-progress
{{- if eq .Values.server.config.authenticationType "PASSWORD" }}
env:
- name: TRINO_PASSWORD
# must match test-values.yaml
value: admin123
{{- end }}
{{- if .Values.server.config.https.enabled }}
volumeMounts:
- name: certificates
readOnly: true
mountPath: "/etc/trino/certificates"
volumes:
- name: certificates
secret:
secretName: certificates
{{- end }}
restartPolicy: Never