From b11361f2fe6b27504d2f0fda4a12bc5ade780b05 Mon Sep 17 00:00:00 2001 From: Alex Eftimie Date: Wed, 3 Mar 2021 16:51:16 +0100 Subject: [PATCH] feat(tabix): allow setting ingress annotations for dealing with cors (#321) --- clickhouse/README.md | 1 + clickhouse/templates/ingress-clickhouse.yaml | 8 ++++++-- clickhouse/templates/ingress-tabix.yaml | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/clickhouse/README.md b/clickhouse/README.md index 8b51876e8..33c44a3b6 100755 --- a/clickhouse/README.md +++ b/clickhouse/README.md @@ -82,6 +82,7 @@ The following tables lists the configurable parameters of the Clickhouse chart a | `clickhouse.ingress.tls.enabled` | Enable ingress tls | `false` | | `clickhouse.ingress.tls.hosts` | Ingress tls hosts | `[]` | | `clickhouse.ingress.tls.secretName` | Ingress tls `secretName` | `` | +| `clickhouse.ingress.annotations` | Ingress Annotations | `{}` | | `clickhouse.configmap.enabled` | If Configmap's enabled is `true`, Custom `config.xml`, `metrica.xml` and `users.xml` | `true` | | `clickhouse.configmap.max_connections` | The maximum number of inbound connections | `4096` | | `clickhouse.configmap.keep_alive_timeout` | The number of seconds that ClickHouse waits for incoming requests before closing the connection | `3` | diff --git a/clickhouse/templates/ingress-clickhouse.yaml b/clickhouse/templates/ingress-clickhouse.yaml index c7b7ee87b..9359efcc2 100755 --- a/clickhouse/templates/ingress-clickhouse.yaml +++ b/clickhouse/templates/ingress-clickhouse.yaml @@ -7,6 +7,10 @@ metadata: app.kubernetes.io/name: {{ include "clickhouse.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} + annotations: + {{- range $key, $value := .Values.clickhouse.ingress.annotations }} + {{ $key }}: {{ $value | quote }} + {{- end }} spec: rules: - host: {{ .Values.clickhouse.ingress.host }} @@ -15,10 +19,10 @@ spec: - path: {{ .Values.clickhouse.ingress.path }} backend: serviceName: {{ include "clickhouse.fullname" . }} - servicePort: http + servicePort: http-port {{- if .Values.clickhouse.ingress.tls.enabled }} tls: - hosts: + - hosts: {{- range .Values.clickhouse.ingress.tls.hosts }} - {{ . | quote }} {{- end }} diff --git a/clickhouse/templates/ingress-tabix.yaml b/clickhouse/templates/ingress-tabix.yaml index 8ee7bd77f..d4cc0f571 100755 --- a/clickhouse/templates/ingress-tabix.yaml +++ b/clickhouse/templates/ingress-tabix.yaml @@ -10,7 +10,7 @@ metadata: app.kubernetes.io/managed-by: {{ .Release.Service }} spec: rules: - host: {{ .Values.tabix.ingress.host }} + - host: {{ .Values.tabix.ingress.host }} http: paths: - path: {{ .Values.tabix.ingress.path }} @@ -19,7 +19,7 @@ spec: servicePort: http {{- if .Values.tabix.ingress.tls.enabled }} tls: - hosts: + - hosts: {{- range .Values.tabix.ingress.tls.hosts }} - {{ . | quote }} {{- end }}