-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pass through all service spec values.
Support healthchecks for gateway configurations without http enabled. Add tests for https and NodePort service with both https and http exposed. Co-authored-by: Jan Waś <[email protected]>
- Loading branch information
1 parent
706f94c
commit 5d7c71c
Showing
11 changed files
with
180 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
.idea/* | ||
tests/trino/cert.key | ||
tests/trino/cert.crt | ||
*/*/cert.key | ||
*/*/cert.crt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,28 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ include "trino-gateway.fullname" . }} | ||
name: trino-gateway | ||
labels: | ||
{{- include "trino-gateway.labels" . | nindent 4 }} | ||
{{- with .Values.service.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
type: {{ .Values.service.type }} | ||
ports: | ||
- port: {{ index .Values "config" "serverConfig" "http-server.http.port" }} | ||
protocol: TCP | ||
name: request | ||
selector: | ||
{{- include "trino-gateway.selectorLabels" . | nindent 4 }} | ||
{{- $gatewayPort := "" }} | ||
{{- if index .Values "config" "serverConfig" "http-server.http.enabled" }} | ||
{{- $gatewayPort = index .Values "config" "serverConfig" "http-server.http.port" }} | ||
{{- end }} | ||
{{- if index .Values "config" "serverConfig" "http-server.https.enabled" }} | ||
{{- $gatewayPort = index .Values "config" "serverConfig" "http-server.https.port" }} | ||
{{- end }} | ||
{{- if empty $gatewayPort }} | ||
{{- fail "Error: No port defined in serverConfig!" $gatewayPort }} | ||
{{- end}} | ||
{{- $portDefault := dict "port" $gatewayPort "targetPort" $gatewayPort }} | ||
{{- $portValues := .Values.service.ports | default list | first | default $portDefault}} | ||
{{- $_0 := set $portValues "port" $gatewayPort}} | ||
{{- $_1 := set $portValues "targetPort" $gatewayPort}} | ||
{{- $ports := list $portValues }} | ||
{{- $additionalPorts := .Values.service.ports | default list | rest }} | ||
{{- $allPorts := concat $ports $additionalPorts}} | ||
{{- $spec := .Values.service }} | ||
{{- $_2 := set $spec "ports" $allPorts }} | ||
{{- $selectorLabels := include "trino-gateway.selectorLabels" . | fromYaml }} | ||
{{- $_3 := set $spec "selector" $selectorLabels }} | ||
spec: {{ $spec | toYaml | nindent 2}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
command: | ||
- "/bin/sh" | ||
- "-c" | ||
- | | ||
cat /etc/certificates/tls.crt /etc/certificates/tls.key > /etc/scratch/tls.pem && \ | ||
java -XX:MinRAMPercentage=80.0 -XX:MaxRAMPercentage=80.0 -jar /usr/lib/trino/gateway-ha-jar-with-dependencies.jar /etc/gateway/config.yaml | ||
config: | ||
serverConfig: | ||
http-server.http.enabled: false | ||
http-server.https.enabled: true | ||
http-server.https.port: 8443 | ||
http-server.https.keystore.path: /etc/scratch/tls.pem | ||
|
||
volumes: | ||
- name: certificates | ||
secret: | ||
secretName: certificates | ||
- name: scratch | ||
emptyDir: | ||
sizeLimit: 10Mi | ||
|
||
volumeMounts: | ||
- name: certificates | ||
mountPath: /etc/certificates | ||
readOnly: true | ||
- name: scratch | ||
mountPath: /etc/scratch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
config: | ||
serverConfig: | ||
http-server.http.enabled: true | ||
http-server.http.port: 8080 | ||
http-server.https.enabled: true | ||
http-server.https.port: 8443 | ||
http-server.https.keystore.path: /etc/scratch/tls.pem | ||
|
||
service: | ||
type: NodePort | ||
ports: | ||
- protocol: TCP | ||
name: request | ||
nodePort: 30443 | ||
- protocol: TCP | ||
name: gateway-http | ||
nodePort: 30080 | ||
port: 8080 | ||
targetPort: 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters