From bc12506dcfc8088d138c59e5a17cb7093f5cd1e7 Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Thu, 15 Feb 2024 00:07:12 +0000 Subject: [PATCH] Allow setting service annotations Enables the user to add annotations for the service resource so it can be integrated with load balancers and other operators. Signed-off-by: Robert Sturla --- charts/trino/README.md | 1 + charts/trino/templates/service.yaml | 2 ++ charts/trino/values.yaml | 1 + test-values.yaml | 4 ++++ 4 files changed, 8 insertions(+) diff --git a/charts/trino/README.md b/charts/trino/README.md index f5652c9e..434b68fd 100644 --- a/charts/trino/README.md +++ b/charts/trino/README.md @@ -295,6 +295,7 @@ Fast distributed SQL query engine for big data analytics that helps you explore A list of the Linux kernel capabilities that are dropped from every container. Valid values are listed at https://man7.org/linux/man-pages/man7/capabilities.7.html Ensure to remove the "CAP_" prefix which the kernel attaches to the names of permissions. * `shareProcessNamespace.coordinator` - bool, default: `false` * `shareProcessNamespace.worker` - bool, default: `false` +* `service.annotations` - object, default: `{}` * `service.type` - string, default: `"ClusterIP"` * `service.port` - int, default: `8080` * `auth` - object, default: `{}` diff --git a/charts/trino/templates/service.yaml b/charts/trino/templates/service.yaml index 3d614901..e0592d9d 100644 --- a/charts/trino/templates/service.yaml +++ b/charts/trino/templates/service.yaml @@ -11,6 +11,8 @@ metadata: {{- if .Values.commonLabels }} {{- tpl (toYaml .Values.commonLabels) . | nindent 4 }} {{- end }} + annotations: + {{- toYaml .Values.service.annotations | nindent 4 }} spec: type: {{ .Values.service.type }} ports: diff --git a/charts/trino/values.yaml b/charts/trino/values.yaml index 0e578703..518c3bba 100644 --- a/charts/trino/values.yaml +++ b/charts/trino/values.yaml @@ -332,6 +332,7 @@ shareProcessNamespace: worker: false service: + annotations: {} type: ClusterIP port: 8080 diff --git a/test-values.yaml b/test-values.yaml index ef03fb6e..ab40d8e8 100644 --- a/test-values.yaml +++ b/test-values.yaml @@ -18,6 +18,10 @@ additionalConfigProperties: - http-server.authentication.allow-insecure-over-http=true - http-server.process-forwarded=true +service: + annotations: + custom/name: value + auth: # created using htpasswd -B -C 10 password.db admin # every password is admin123