Files
charts/bitnami/clickhouse-operator/templates/service.yaml
Juan Ariza Toledano 4c1954526f [bitnami/clickhouse-operator] feat: new chart (#32816)
* [bitnami/clickhouse-operator] feat: new chart

Signed-off-by: juan131 <juan.ariza@broadcom.com>

* Update CHANGELOG.md

Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>

* Update README.md with readme-generator-for-helm

Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>

* chore: add VIB skeleton

Signed-off-by: juan131 <juan.ariza@broadcom.com>

* feat: add parameters to customize config.d and users.d

Signed-off-by: juan131 <juan.ariza@broadcom.com>

* Update README.md with readme-generator-for-helm

Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>

* docs: document missing README sections

Signed-off-by: juan131 <juan.ariza@broadcom.com>

* Update CHANGELOG.md

Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>

* feat: vib runtime parameters

Signed-off-by: juan131 <juan.ariza@broadcom.com>

* bugfix: simplify keeper installation

Signed-off-by: juan131 <juan.ariza@broadcom.com>

* feat: vib with security context

Signed-off-by: juan131 <juan.ariza@broadcom.com>

* Update CHANGELOG.md

Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>

* doc: update example in README

Signed-off-by: juan131 <juan.ariza@broadcom.com>

* ci: use BITNAMI_DEBUG, helpful if deployment fails

Signed-off-by: juan131 <juan.ariza@broadcom.com>

* feat: add suggestions from code review

Signed-off-by: juan131 <juan.ariza@broadcom.com>

* ci: fix expected data permissions

Signed-off-by: juan131 <juan.ariza@broadcom.com>

* bugfix: typos

Signed-off-by: juan131 <juan.ariza@broadcom.com>

---------

Signed-off-by: juan131 <juan.ariza@broadcom.com>
Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>
Co-authored-by: Bitnami Bot <bitnami.bot@broadcom.com>
2025-04-08 14:46:36 +00:00

48 lines
2.3 KiB
YAML

{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.metrics.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ template "common.names.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: clickhouse-operator
app.kubernetes.io/component: operator
{{- if or .Values.service.annotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.service.annotations .Values.commonAnnotations ) "context" . ) }}
{{- $defaultMetricsAnnotations := dict "prometheus.io/scrape" "true" "prometheus.io/port" .Values.service.ports.metricsExporter "prometheus.io/path" "/metrics" }}
{{- $annotations = include "common.tplvalues.merge" (dict "values" (list $annotations $defaultMetricsAnnotations) "context" .) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- if .Values.service.clusterIP }}
clusterIP: {{ .Values.service.clusterIP }}
{{- end }}
ports:
- name: http-metrics
port: {{ .Values.service.ports.metrics }}
{{- if not (eq .Values.service.ports.metrics .Values.containerPorts.metrics) }}
targetPort: {{ .Values.containerPorts.metrics }}
{{- end }}
protocol: TCP
nodePort: null
- name: http-metrics-exporter
port: {{ .Values.service.ports.metricsExporter }}
{{- if not (eq .Values.service.ports.metricsExporter .Values.metrics.containerPorts.metrics) }}
targetPort: {{ .Values.service.ports.metricsExporter }}
{{- end }}
protocol: TCP
nodePort: null
{{- if .Values.service.extraPorts }}
{{- include "common.tplvalues.render" (dict "value" .Values.service.extraPorts "context" $) | nindent 4 }}
{{- end }}
{{- $podLabels := include "common.tplvalues.merge" (dict "values" (list .Values.podLabels .Values.commonLabels) "context" .) | fromYaml }}
selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: clickhouse-operator
app.kubernetes.io/component: operator
{{- end }}