diff --git a/charts/clickhouse/README.md b/charts/clickhouse/README.md index 9d8613b..def1c7b 100644 --- a/charts/clickhouse/README.md +++ b/charts/clickhouse/README.md @@ -181,6 +181,7 @@ EOSQL | clickhouse.keeper.host | string | `""` | Specify a keeper host. Should be left empty if `clickhouse-keeper.enabled` is `true`. Will override the defaults set from `clickhouse-keeper.enabled`. | | clickhouse.keeper.port | int | `2181` | Override the default keeper port | | clickhouse.lbService.enabled | bool | `false` | | +| clickhouse.lbService.externalTrafficPolicy | string | `""` | Set the external traffic policy for the LoadBalancer service, allowed values are `Cluster` (default) or `Local` (see [here](https://kubernetes.io/docs/reference/networking/virtual-ips/#traffic-policies) for more details). | | clickhouse.lbService.loadBalancerSourceRanges | list | `[]` | Specify source IP ranges to the LoadBalancer service. If supported by the platform, this will restrict traffic through the cloud-provider load-balancer to the specified client IPs. This is ignored if the cloud-provider does not support the feature. | | clickhouse.lbService.serviceAnnotations | object | `{}` | | | clickhouse.lbService.serviceLabels | object | `{}` | | diff --git a/charts/clickhouse/templates/chi.yaml b/charts/clickhouse/templates/chi.yaml index 790a742..ef4bb66 100644 --- a/charts/clickhouse/templates/chi.yaml +++ b/charts/clickhouse/templates/chi.yaml @@ -78,6 +78,9 @@ spec: {{- end }} spec: type: "LoadBalancer" + {{- with .Values.clickhouse.lbService.externalTrafficPolicy }} + externalTrafficPolicy: {{ . }} + {{- end }} {{- if .Values.clickhouse.lbService.loadBalancerSourceRanges }} loadBalancerSourceRanges: {{- toYaml .Values.clickhouse.lbService.loadBalancerSourceRanges | nindent 12 }} diff --git a/charts/clickhouse/values.schema.json b/charts/clickhouse/values.schema.json index f844013..ca611ed 100644 --- a/charts/clickhouse/values.schema.json +++ b/charts/clickhouse/values.schema.json @@ -230,6 +230,12 @@ "type": "boolean", "description": "Enable LoadBalancer service for ClickHouse." }, + "externalTrafficPolicy": { + "type": "string", + "description": "External traffic policy for the LoadBalancer service.", + "enum": ["", "Cluster", "Local"], + "default": "" + }, "loadBalancerSourceRanges": { "type": "array", "description": "Restricts traffic to specified client IPs.", diff --git a/charts/clickhouse/values.yaml b/charts/clickhouse/values.yaml index 0c9ce92..b33a1e2 100644 --- a/charts/clickhouse/values.yaml +++ b/charts/clickhouse/values.yaml @@ -148,6 +148,7 @@ clickhouse: lbService: enabled: false + externalTrafficPolicy: "" # -- Specify source IP ranges to the LoadBalancer service. # If supported by the platform, this will restrict traffic through the cloud-provider load-balancer # to the specified client IPs. This is ignored if the cloud-provider does not support the feature.