diff --git a/charts/clickhouse/templates/chk.yaml b/charts/clickhouse/templates/chk.yaml index 2c7c149..83e23bd 100644 --- a/charts/clickhouse/templates/chk.yaml +++ b/charts/clickhouse/templates/chk.yaml @@ -28,6 +28,19 @@ spec: {{ $k }}: {{ $v }} {{- end }} {{- end }} + {{- $hasConfigFiles := not (empty .Values.keeper.configurationFiles) -}} + {{- if $hasConfigFiles }} + files: + {{- range $path, $content := .Values.keeper.configurationFiles }} + {{- if kindIs "string" $content }} + {{ $path }}: | + {{- $content | nindent 10 }} + {{- else }} + {{ $path }}: + {{- toYaml $content | nindent 10 }} + {{- end }} + {{- end }} + {{- end }} defaults: storageManagement: provisioner: Operator @@ -47,6 +60,13 @@ spec: - name: raft port: 9444 targetPort: 9444 + {{- if $.Values.keeper.extraPorts }} + {{- range $.Values.keeper.extraPorts }} + - name: {{ .name }} + port: {{ .containerPort }} + targetPort: {{ .containerPort }} + {{- end }} + {{- end }} {{- if not (empty $.Values.keeper.metricsPort) }} - name: metrics port: {{ $.Values.keeper.metricsPort }} diff --git a/charts/clickhouse/values.yaml b/charts/clickhouse/values.yaml index 31b29f1..a2bb851 100644 --- a/charts/clickhouse/values.yaml +++ b/charts/clickhouse/values.yaml @@ -190,7 +190,6 @@ clickhouse: # @ignore topologySpreadConstraints: [] - # -- Additional ports to expose in the ClickHouse container # Example: # extraPorts: @@ -297,6 +296,28 @@ keeper: # @ignore securityContext: {} + # -- Additional ports to expose in the ClickHouse container + # Example: + # extraPorts: + # - name: custom-port + # containerPort: 8080 + extraPorts: [] + + # -- Additional entries for spec.configuration.files. + # String values are rendered inline; map values (e.g. valueFrom) are passed as structured YAML. + # Example: + # configurationFiles: + # config.d/tls.xml: | + # + # 8443 + # + # tls.crt: + # valueFrom: + # secretKeyRef: + # name: my-tls-secret + # key: tls.crt + configurationFiles: {} + operator: # -- Whether to enable the Altinity Operator for ClickHouse. # Disable if you already have the Operator installed cluster-wide.