Skip to content

Commit

Permalink
feat(tabix): allow setting ingress annotations for dealing with cors (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
alexef authored Mar 3, 2021
1 parent 2c26969 commit b11361f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions clickhouse/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` |
Expand Down
8 changes: 6 additions & 2 deletions clickhouse/templates/ingress-clickhouse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions clickhouse/templates/ingress-tabix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -19,7 +19,7 @@ spec:
servicePort: http
{{- if .Values.tabix.ingress.tls.enabled }}
tls:
hosts:
- hosts:
{{- range .Values.tabix.ingress.tls.hosts }}
- {{ . | quote }}
{{- end }}
Expand Down

0 comments on commit b11361f

Please sign in to comment.