diff --git a/charts/trino/README.md b/charts/trino/README.md index 0d1590ec..36416ce5 100644 --- a/charts/trino/README.md +++ b/charts/trino/README.md @@ -629,6 +629,7 @@ Fast distributed SQL query engine for big data analytics that helps you explore path: /secrets/sample.json subPath: sample.json ``` +* `coordinator.service` - object, default: `{}` * `worker.deployment.annotations` - object, default: `{}` * `worker.deployment.progressDeadlineSeconds` - int, default: `600` @@ -795,6 +796,7 @@ Fast distributed SQL query engine for big data analytics that helps you explore path: /secrets/sample.json subPath: sample.json ``` +* `worker.service` - object, default: `{}` * `kafka.mountPath` - string, default: `"/etc/trino/schemas"` * `kafka.tableDescriptions` - object, default: `{}` diff --git a/charts/trino/templates/service-coordinator.yaml b/charts/trino/templates/service-coordinator.yaml index cd9ab1a7..d7fc1383 100644 --- a/charts/trino/templates/service-coordinator.yaml +++ b/charts/trino/templates/service-coordinator.yaml @@ -1,3 +1,4 @@ +{{- $svc := .Values.coordinator.service | default .Values.service }} {{- $coordinatorJmx := merge .Values.jmx.coordinator (omit .Values.jmx "coordinator" "worker") -}} apiVersion: v1 kind: Service @@ -8,16 +9,16 @@ metadata: {{- include "trino.labels" . | nindent 4 }} app.kubernetes.io/component: coordinator annotations: - {{- toYaml .Values.service.annotations | nindent 4 }} + {{- toYaml $svc.annotations | nindent 4 }} spec: - type: {{ .Values.service.type }} + type: {{ $svc.type }} ports: - - port: {{ .Values.service.port }} + - port: {{ $svc.port }} targetPort: http protocol: TCP name: http - {{- if .Values.service.nodePort }} - nodePort: {{ .Values.service.nodePort }} + {{- if $svc.nodePort }} + nodePort: {{ $svc.nodePort }} {{- end }} {{- if .Values.server.config.https.enabled }} - port: {{ .Values.server.config.https.port }} diff --git a/charts/trino/templates/service-worker.yaml b/charts/trino/templates/service-worker.yaml index 733b27ed..c9884be8 100644 --- a/charts/trino/templates/service-worker.yaml +++ b/charts/trino/templates/service-worker.yaml @@ -1,3 +1,4 @@ +{{- $svc := .Values.worker.service | default .Values.service }} {{- $workerJmx := merge .Values.jmx.worker (omit .Values.jmx "coordinator" "worker") -}} apiVersion: v1 kind: Service @@ -8,11 +9,11 @@ metadata: {{- include "trino.labels" . | nindent 4 }} app.kubernetes.io/component: worker annotations: - {{- toYaml .Values.service.annotations | nindent 4 }} + {{- toYaml $svc.annotations | nindent 4 }} spec: clusterIP: None ports: - - port: {{ .Values.service.port }} + - port: {{ $svc.port }} targetPort: http protocol: TCP name: http diff --git a/charts/trino/values.yaml b/charts/trino/values.yaml index 9d9e102c..29248aaa 100644 --- a/charts/trino/values.yaml +++ b/charts/trino/values.yaml @@ -734,6 +734,15 @@ coordinator: # subPath: sample.json # ``` + service: {} + # annotations: {} + # type: ClusterIP + # port: 8080 + # # service.nodePort -- The port the service listens on the host, for the `NodePort` type. If not set, Kubernetes will + # # [allocate a port + # # automatically](https://kubernetes.io/docs/concepts/services-networking/service/#nodeport-custom-port). + # nodePort: "" + worker: deployment: annotations: {} @@ -961,6 +970,15 @@ worker: # subPath: sample.json # ``` + service: {} + # annotations: {} + # type: ClusterIP + # port: 8080 + # # service.nodePort -- The port the service listens on the host, for the `NodePort` type. If not set, Kubernetes will + # # [allocate a port + # # automatically](https://kubernetes.io/docs/concepts/services-networking/service/#nodeport-custom-port). + # nodePort: "" + kafka: mountPath: "/etc/trino/schemas" tableDescriptions: {} diff --git a/tests/trino/test-values.yaml b/tests/trino/test-values.yaml index 5c5b23b1..1d464a25 100644 --- a/tests/trino/test-values.yaml +++ b/tests/trino/test-values.yaml @@ -78,6 +78,10 @@ coordinator: rollingUpdate: maxSurge: 25% maxUnavailable: 50% + service: + annotations: + custom/name: coordinator + port: 8080 jvm: maxHeapSize: "8G"