Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix keeper cmpd name in cluster #1160

Merged
merged 6 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ KubeBlocks add-ons.
| official-postgresql | postgres-14.7 | A Official PostgreSQL cluster definition Helm chart for Kubernetes | kizuna-lek |
| opengauss | opengauss-5.0.0 | A Helm chart for Kubernetes | 1aal |
| openldap | openldap-2.4.57 | The OpenLDAP Project is a collaborative effort to develop a robust, commercial-grade, fully featured, and open source LDAP suite of applications and development tools. This chart provides KubeBlocks' | kissycn |
| opensearch | opensearch-2.7.0 | Open source distributed and RESTful search engine. | iziang |
| opensearch | opensearch-2.7.0<br>opensearch-dashboard-2.7.0 | Open source distributed and RESTful search engine. | iziang |
| opentenbase | opentenbase-v2.5.0 | OpenTenBase is an enterprise-level distributed HTAP open source database. | ldming |
| oracle | oracle-19.3.0-ee | A Helm chart for Kubernetes | 1aal |
| orchestrator | orchestrator-3.2.6 | Orchestrator is a MySQL high availability and replication management tool, runs as a service and provides command line access, HTTP API and Web interface. | kubeJocker |
Expand Down
5 changes: 3 additions & 2 deletions addons-cluster/clickhouse/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,11 @@ Define clickhouse componentSpec with ComponentDefinition.
{{/*
Define clickhouse keeper componentSpec with ComponentDefinition.
*/}}
{{- define "ch-keeper-component" -}}
{{- define "clickhouse-keeper-component" -}}
- name: ch-keeper
componentDef: ch-keeper-24
componentDef: clickhouse-keeper-24
replicas: {{ .Values.keeper.replicaCount }}
disableExporter: {{ $.Values.keeper.disableExporter | default "false" }}
{{- with .Values.keeper.tolerations }}
tolerations: {{ .| toYaml | nindent 4 }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion addons-cluster/clickhouse/templates/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{{- end }}
componentSpecs:
{{- if eq .Values.mode "cluster" }}
{{- include "ch-keeper-component" . | nindent 4 }}
{{- include "clickhouse-keeper-component" . | nindent 4 }}
{{- end }}
{{- if eq (.Values.shardCount | int) 1 }}
{{- include "clickhouse-component" . | nindent 4 }}
Expand Down
1 change: 1 addition & 0 deletions addons-cluster/clickhouse/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ keeper:
memory: 2
storage: 10
tolerations: []
disableExporter: false

## Service configurations
service:
Expand Down
12 changes: 6 additions & 6 deletions addons/clickhouse/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ Define clickhouse24 component definition regex pattern
{{- end -}}

{{/*
Define ch-keeper24 component definition name
Define clickhouse-keeper24 component definition name
*/}}
{{- define "ch-keeper24.cmpdName" -}}
{{- define "clickhouse-keeper24.cmpdName" -}}
{{- if eq (len .Values.cmpdVersionPrefix.keeper24 ) 0 -}}
clickhouse-keeper-24-{{ .Chart.Version }}
{{- else -}}
Expand All @@ -87,9 +87,9 @@ clickhouse-keeper-24-{{ .Chart.Version }}
{{- end -}}

{{/*
Define ch-keeper24 component definition regex pattern
Define clickhouse-keeper24 component definition regex pattern
*/}}
{{- define "ch-keeper24.cmpdRegexpPattern" -}}
{{- define "clickhouse-keeper24.cmpdRegexpPattern" -}}
^clickhouse-keeper-24.*
{{- end -}}

Expand Down Expand Up @@ -122,9 +122,9 @@ clickhouse-24-user-configuration-tpl
{{- end -}}

{{/*
Define ch-keeper24 configuration tpl name
Define clickhouse-keeper24 configuration tpl name
*/}}
{{- define "ch-keeper24.configurationTplName" -}}
{{- define "clickhouse-keeper24.configurationTplName" -}}
clickhouse-keeper-24-configuration-tpl
{{- end -}}

Expand Down
2 changes: 1 addition & 1 deletion addons/clickhouse/templates/clusterdefinition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
- name: clickhouse
compDef: {{ include "clickhouse24.cmpdRegexpPattern" .}}
- name: ch-keeper
compDef: {{ include "ch-keeper24.cmpdRegexpPattern" .}}
compDef: {{ include "clickhouse-keeper24.cmpdRegexpPattern" .}}
orders:
provision:
- ch-keeper
Expand Down
6 changes: 3 additions & 3 deletions addons/clickhouse/templates/cmpd-ch-keeper.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps.kubeblocks.io/v1
kind: ComponentDefinition
metadata:
name: {{ include "ch-keeper24.cmpdName" . }}
name: {{ include "clickhouse-keeper24.cmpdName" . }}
labels:
{{- include "clickhouse.labels" . | nindent 4 }}
annotations:
Expand Down Expand Up @@ -108,8 +108,8 @@ spec:
scrapePath: /metrics
scrapePort: "8001"
configs:
- name: ch-keeper-tpl
templateRef: {{ include "ch-keeper24.configurationTplName" . }}
- name: clickhouse-keeper-tpl
templateRef: {{ include "clickhouse-keeper24.configurationTplName" . }}
volumeName: config
namespace: {{ .Release.Namespace }}
systemAccounts:
Expand Down
2 changes: 1 addition & 1 deletion addons/clickhouse/templates/cmpd-clickhouse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ spec:
- name: CH_KEEPER_POD_FQDN_LIST
valueFrom:
componentVarRef:
compDef: {{ include "ch-keeper24.cmpdRegexpPattern" . }}
compDef: {{ include "clickhouse-keeper24.cmpdRegexpPattern" . }}
optional: true
podFQDNs: Required
volumes:
Expand Down
2 changes: 1 addition & 1 deletion addons/clickhouse/templates/cmpv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
- releases:
- 24.8.3
compDefs:
- {{ include "ch-keeper24.cmpdRegexpPattern" . }}
- {{ include "clickhouse-keeper24.cmpdRegexpPattern" . }}
releases:
- name: 24.8.3
serviceVersion: 24.8.3
Expand Down
2 changes: 1 addition & 1 deletion addons/clickhouse/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ data:
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "ch-keeper24.configurationTplName" . }}
name: {{ include "clickhouse-keeper24.configurationTplName" . }}
labels:
{{- include "clickhouse.labels" . | nindent 4 }}
data:
Expand Down
2 changes: 1 addition & 1 deletion addons/clickhouse/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ commonAnnotations: {}
# If specified, the component definition will use it as prefix.
cmpdVersionPrefix:
clickhouse24: "clickhouse-24"
keeper24: "ch-keeper-24"
keeper24: "clickhouse-keeper-24"

image:
registry: docker.io
Expand Down
2 changes: 1 addition & 1 deletion examples/clickhouse/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ spec:
requests:
storage: 20Gi
- name: ch-keeper
componentDef: ch-keeper-24
componentDef: clickhouse-keeper-24
serviceAccountName: kb-clickhouse-cluster
replicas: 1
systemAccounts:
Expand Down
2 changes: 1 addition & 1 deletion examples/clickhouse/restart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ spec:
restart:
# Specifies the name of the Component.
# - clickhouse
# - ch-keeper
# - clickhouse-keeper
- componentName: clickhouse
2 changes: 1 addition & 1 deletion examples/clickhouse/verticalscale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
# Lists VerticalScaling objects, each specifying a component and its desired compute resources for vertical scaling.
verticalScaling:
# - clickhouse
# - ch-keeper
# - clickhouse-keeper
- componentName: clickhouse
# VerticalScaling refers to the process of adjusting the compute resources (e.g., CPU, memory) allocated to a Component. It defines the parameters required for the operation.
requests:
Expand Down
2 changes: 1 addition & 1 deletion examples/clickhouse/volumeexpand.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
volumeExpansion:
# Specifies the name of the Component.
# - clickhouse
# - ch-keeper
# - clickhouse-keeper
- componentName: clickhouse
# volumeClaimTemplates specifies the storage size and volumeClaimTemplate name.
volumeClaimTemplates:
Expand Down
Loading