Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Commit

Permalink
Merge pull request #23 from yanboer/main
Browse files Browse the repository at this point in the history
[add] add v2.1.2 version(exporter from operator pod to clickhouse pod)
  • Loading branch information
zlianzhuang authored Oct 20, 2022
2 parents 0bb5b4d + cd9e826 commit c8f2131
Show file tree
Hide file tree
Showing 9 changed files with 270 additions and 47 deletions.
2 changes: 1 addition & 1 deletion clickhouse-cluster/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ apiVersion: v2
appVersion: "21.1"
name: clickhouse-cluster
type: application
version: v2.1.1
version: v2.1.2
description: Helm Chart for deploying a sharded and replicated ClickHouse cluster on Kubernetes
home: https://github.com/radondb/radondb-clickhouse-kubernetes
icon: https://xenondb.pek3b.qingstor.com/icons/radondb.svg
Expand Down
2 changes: 2 additions & 0 deletions clickhouse-cluster/templates/clickhouse_cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ spec:
dataVolumeClaimTemplate: data
serviceTemplate: chi-svc-template

metricsExporter: "true"

templates:
serviceTemplates:
- name: chi-svc-template
Expand Down
2 changes: 1 addition & 1 deletion clickhouse-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: "v2.1"
name: clickhouse-operator
type: application
version: v2.1.1
version: v2.1.2
description: Helm chart for deploying ClickHouse Operator on Kubernetes
home: https://github.com/radondb/radondb-clickhouse-kubernetes

Expand Down
118 changes: 101 additions & 17 deletions clickhouse-operator/templates/clickhouse-operator-install-v1beta1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,41 @@ spec:
- "disabled"
- "Enabled"
- "enabled"
# Need to be StringBool
metricsExporter:
type: string
description: "Monitoring related, allows adding prometheus exporter containers to each pod"
enum:
# List StringBoolXXX constants from model
- ""
- "0"
- "1"
- "False"
- "false"
- "True"
- "true"
- "No"
- "no"
- "Yes"
- "yes"
- "Off"
- "off"
- "On"
- "on"
- "Disable"
- "disable"
- "Enable"
- "enable"
- "Disabled"
- "disabled"
- "Enabled"
- "enabled"
imagePrefix:
type: string
description: "custom image prefix which will add to the front of the image used by the clickhouse cluster"
namespaceOverride:
type: string
description: "custom namespace which will add to the front of the image used by the clickhouse cluster"
namespaceDomainPattern:
type: string
description: "custom domain suffix which will add to end of `Service` or `Pod` name, use it when you use custom cluster domain in your Kubernetes cluster"
Expand Down Expand Up @@ -1425,6 +1460,41 @@ spec:
- "disabled"
- "Enabled"
- "enabled"
# Need to be StringBool
metricsExporter:
type: string
description: "Monitoring related, allows adding prometheus exporter containers to each pod"
enum:
# List StringBoolXXX constants from model
- ""
- "0"
- "1"
- "False"
- "false"
- "True"
- "true"
- "No"
- "no"
- "Yes"
- "yes"
- "Off"
- "off"
- "On"
- "on"
- "Disable"
- "disable"
- "Enable"
- "enable"
- "Disabled"
- "disabled"
- "Enabled"
- "enabled"
imagePrefix:
type: string
description: "custom image prefix which will add to the front of the image used by the clickhouse cluster"
namespaceOverride:
type: string
description: "custom namespace which will add to the front of the image used by the clickhouse cluster"
namespaceDomainPattern:
type: string
description: "custom domain suffix which will add to end of `Service` or `Pod` name, use it when you use custom cluster domain in your Kubernetes cluster"
Expand Down Expand Up @@ -2696,6 +2766,24 @@ spec:
- "LabelClusterScopeCycleSize"
- "LabelClusterScopeCycleIndex"
- "LabelClusterScopeCycleOffset"
defaultClickHouseLogContainerImage:
type: string
description: "ClickHouse log container image, default `busybox`"
defaultClickHouseLogContainerImagePullPolicy:
type: string
description: "ClickHouse log container image pull policy, default `IfNotPresent`"
defaultMetricsExporterContainerImage:
type: string
description: "ClickHouse metrics exporter container image, default `radondb/chronus-metrics-operator:dmp`"
defaultMetricsExporterContainerImagePullPolicy:
type: string
description: "ClickHouse metrics exporter container image pull policy, default `IfNotPresent`"
imagePrefix:
type: string
description: "custom image prefix which will add to the front of the image used by the clickhouse cluster, if the parameter is also defined in CHI, CHI has higher priority"
namespaceOverride:
type: string
description: "custom namespace which will add to the front of the image used by the clickhouse cluster"
---
# Possible Template Parameters:
#
Expand Down Expand Up @@ -2885,6 +2973,10 @@ data:
# - test
# - info
# - onemore
{{- if .Values.watchAllNamespaces }}
watchNamespaces:
- ^[a-z]([-a-z0-9]*[a-z0-9])?$
{{- end }}
################################################
##
Expand Down Expand Up @@ -3027,6 +3119,14 @@ data:
# LabelClusterScopeCycleIndex
# LabelClusterScopeCycleOffset
appendScopeLabels: "no"
defaultClickHouseLogContainerImage: "busybox"
defaultClickHouseLogContainerImagePullPolicy: "IfNotPresent"
defaultMetricsExporterContainerImage: {{ .Values.metrics_operator.image | default "radondb/chronus-metrics-operator:dmp" }}
defaultMetricsExporterContainerImagePullPolicy: {{ .Values.metrics_operator.imagePullPolicy | default "IfNotPresent" }}
imagePrefix: {{ .Values.localRegistry | default "docker.io" }}
namespaceOverride: {{ .Values.namespaceOverride | default "" }}
---
# Possible Template Parameters:
#
Expand Down Expand Up @@ -3255,9 +3355,7 @@ data:
#
# {{ .Release.Namespace }}
# {{ .Values.operator.image }}
# {{ .Values.metrics_operator.image }}
# {{ .Values.operator.imagePullPolicy }}
# {{ .Values.metrics_operator.imagePullPolicy }}
#
# Setup Deployment for clickhouse-operator
# Deployment would be created in kubectl-specified namespace
Expand Down Expand Up @@ -3300,7 +3398,7 @@ spec:
name: etc-clickhouse-operator-usersd-files
containers:
- name: clickhouse-operator
image: {{ .Values.operator.image | default "radondb/chronus-operator:2.1.1" }}
image: {{ .Values.operator.image | default "radondb/chronus-operator:dmp" }}
imagePullPolicy: {{ .Values.operator.imagePullPolicy | default "IfNotPresent" }}
volumeMounts:
- name: etc-clickhouse-operator-folder
Expand Down Expand Up @@ -3362,20 +3460,6 @@ spec:
resourceFieldRef:
containerName: clickhouse-operator
resource: limits.memory
- name: metrics-exporter
image: {{ .Values.metrics_operator.image | default "radondb/chronus-metrics-operator:2.1.1" }}
imagePullPolicy: {{ .Values.metrics_operator.imagePullPolicy | default "IfNotPresent" }}
volumeMounts:
- name: etc-clickhouse-operator-folder
mountPath: /etc/clickhouse-operator
- name: etc-clickhouse-operator-confd-folder
mountPath: /etc/clickhouse-operator/conf.d
- name: etc-clickhouse-operator-configd-folder
mountPath: /etc/clickhouse-operator/config.d
- name: etc-clickhouse-operator-templatesd-folder
mountPath: /etc/clickhouse-operator/templates.d
- name: etc-clickhouse-operator-usersd-folder
mountPath: /etc/clickhouse-operator/users.d
---
# Possible Template Parameters:
#
Expand Down
117 changes: 100 additions & 17 deletions clickhouse-operator/templates/clickhouse-operator-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,41 @@ spec:
- "disabled"
- "Enabled"
- "enabled"
# Need to be StringBool
metricsExporter:
type: string
description: "Monitoring related, allows adding prometheus exporter containers to each pod"
enum:
# List StringBoolXXX constants from model
- ""
- "0"
- "1"
- "False"
- "false"
- "True"
- "true"
- "No"
- "no"
- "Yes"
- "yes"
- "Off"
- "off"
- "On"
- "on"
- "Disable"
- "disable"
- "Enable"
- "enable"
- "Disabled"
- "disabled"
- "Enabled"
- "enabled"
imagePrefix:
type: string
description: "custom image prefix which will add to the front of the image used by the clickhouse cluster"
namespaceOverride:
type: string
description: "custom namespace which will add to the front of the image used by the clickhouse cluster"
namespaceDomainPattern:
type: string
description: "custom domain suffix which will add to end of `Service` or `Pod` name, use it when you use custom cluster domain in your Kubernetes cluster"
Expand Down Expand Up @@ -1440,6 +1475,41 @@ spec:
- "disabled"
- "Enabled"
- "enabled"
# Need to be StringBool
metricsExporter:
type: string
description: "Monitoring related, allows adding prometheus exporter containers to each pod"
enum:
# List StringBoolXXX constants from model
- ""
- "0"
- "1"
- "False"
- "false"
- "True"
- "true"
- "No"
- "no"
- "Yes"
- "yes"
- "Off"
- "off"
- "On"
- "on"
- "Disable"
- "disable"
- "Enable"
- "enable"
- "Disabled"
- "disabled"
- "Enabled"
- "enabled"
imagePrefix:
type: string
description: "custom image prefix which will add to the front of the image used by the clickhouse cluster"
namespaceOverride:
type: string
description: "custom namespace which will add to the front of the image used by the clickhouse cluster"
namespaceDomainPattern:
type: string
description: "custom domain suffix which will add to end of `Service` or `Pod` name, use it when you use custom cluster domain in your Kubernetes cluster"
Expand Down Expand Up @@ -2717,6 +2787,24 @@ spec:
- "LabelClusterScopeCycleSize"
- "LabelClusterScopeCycleIndex"
- "LabelClusterScopeCycleOffset"
defaultClickHouseLogContainerImage:
type: string
description: "ClickHouse log container image, default `busybox`"
defaultClickHouseLogContainerImagePullPolicy:
type: string
description: "ClickHouse log container image pull policy, default `IfNotPresent`"
defaultMetricsExporterContainerImage:
type: string
description: "ClickHouse metrics exporter container image, default `radondb/chronus-metrics-operator:dmp`"
defaultMetricsExporterContainerImagePullPolicy:
type: string
description: "ClickHouse metrics exporter container image pull policy, default `IfNotPresent`"
imagePrefix:
type: string
description: "custom image prefix which will add to the front of the image used by the clickhouse cluster, if the parameter is also defined in CHI, CHI has higher priority"
namespaceOverride:
type: string
description: "custom namespace which will add to the front of the image used by the clickhouse cluster"
---
# Possible Template Parameters:
#
Expand Down Expand Up @@ -2906,6 +2994,10 @@ data:
# - test
# - info
# - onemore
{{- if .Values.watchAllNamespaces }}
watchNamespaces:
- ^[a-z]([-a-z0-9]*[a-z0-9])?$
{{- end }}
################################################
##
Expand Down Expand Up @@ -3049,6 +3141,13 @@ data:
# LabelClusterScopeCycleOffset
appendScopeLabels: "no"
defaultClickHouseLogContainerImage: "busybox"
defaultClickHouseLogContainerImagePullPolicy: "IfNotPresent"
defaultMetricsExporterContainerImage: {{ .Values.metrics_operator.image | default "radondb/chronus-metrics-operator:dmp" }}
defaultMetricsExporterContainerImagePullPolicy: {{ .Values.metrics_operator.imagePullPolicy | default "IfNotPresent" }}
imagePrefix: {{ .Values.localRegistry | default "docker.io" }}
namespaceOverride: {{ .Values.namespaceOverride | default "" }}
---
# Possible Template Parameters:
#
Expand Down Expand Up @@ -3284,9 +3383,7 @@ data:
#
# {{ .Release.Namespace }}
# {{ .Values.operator.image }}
# {{ .Values.metrics_operator.image }}
# {{ .Values.operator.imagePullPolicy }}
# {{ .Values.metrics_operator.imagePullPolicy }}
#
# Setup Deployment for clickhouse-operator
# Deployment would be created in kubectl-specified namespace
Expand Down Expand Up @@ -3329,7 +3426,7 @@ spec:
name: etc-clickhouse-operator-usersd-files
containers:
- name: clickhouse-operator
image: {{ .Values.operator.image | default "radondb/chronus-operator:2.1.1" }}
image: {{ .Values.operator.image | default "radondb/chronus-operator:dmp" }}
imagePullPolicy: {{ .Values.operator.imagePullPolicy | default "IfNotPresent" }}
volumeMounts:
- name: etc-clickhouse-operator-folder
Expand Down Expand Up @@ -3393,20 +3490,6 @@ spec:
containerName: clickhouse-operator
resource: limits.memory

- name: metrics-exporter
image: {{ .Values.metrics_operator.image | default "radondb/chronus-metrics-operator:2.1.1" }}
imagePullPolicy: {{ .Values.metrics_operator.imagePullPolicy | default "IfNotPresent" }}
volumeMounts:
- name: etc-clickhouse-operator-folder
mountPath: /etc/clickhouse-operator
- name: etc-clickhouse-operator-confd-folder
mountPath: /etc/clickhouse-operator/conf.d
- name: etc-clickhouse-operator-configd-folder
mountPath: /etc/clickhouse-operator/config.d
- name: etc-clickhouse-operator-templatesd-folder
mountPath: /etc/clickhouse-operator/templates.d
- name: etc-clickhouse-operator-usersd-folder
mountPath: /etc/clickhouse-operator/users.d
---
# Possible Template Parameters:
#
Expand Down
8 changes: 6 additions & 2 deletions clickhouse-operator/values.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Default values for ClickHouse-operator
localRegistry: "docker.io"
namespaceOverride: ""
watchAllNamespaces: true

operator:
image: radondb/chronus-operator:2.1.1
image: radondb/chronus-operator:dmp
imagePullPolicy: IfNotPresent

metrics_operator:
image: radondb/chronus-metrics-operator:2.1.1
image: radondb/chronus-metrics-operator:dmp
imagePullPolicy: IfNotPresent
Binary file added docs/clickhouse-cluster-v2.1.2.tgz
Binary file not shown.
Binary file added docs/clickhouse-operator-v2.1.2.tgz
Binary file not shown.
Loading

0 comments on commit c8f2131

Please sign in to comment.