Skip to content

Commit 77f2aef

Browse files
authored
Merge pull request #1761 from Altinity/0.25.1
0.25.1
2 parents a0ac641 + bd1b479 commit 77f2aef

File tree

108 files changed

+11115
-2762
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+11115
-2762
lines changed

deploy/builder/templates-install-bundle/clickhouse-operator-install-yaml-template-01-section-crd-01-chi-chit.yaml

Lines changed: 62 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,49 @@ spec:
447447
minimum: 0
448448
maximum: 100
449449
description: "The maximum percentage of cluster shards that may be reconciled in parallel, 50 percent by default."
450-
450+
macros:
451+
type: object
452+
description: "macros parameters"
453+
properties:
454+
sections:
455+
type: object
456+
description: "sections behaviour for macros"
457+
properties:
458+
users:
459+
type: object
460+
description: "sections behaviour for macros on users"
461+
properties:
462+
enabled:
463+
<<: *TypeStringBool
464+
description: "enabled or not"
465+
profiles:
466+
type: object
467+
description: "sections behaviour for macros on profiles"
468+
properties:
469+
enabled:
470+
<<: *TypeStringBool
471+
description: "enabled or not"
472+
quotas:
473+
type: object
474+
description: "sections behaviour for macros on quotas"
475+
properties:
476+
enabled:
477+
<<: *TypeStringBool
478+
description: "enabled or not"
479+
settings:
480+
type: object
481+
description: "sections behaviour for macros on settings"
482+
properties:
483+
enabled:
484+
<<: *TypeStringBool
485+
description: "enabled or not"
486+
files:
487+
type: object
488+
description: "sections behaviour for macros on files"
489+
properties:
490+
enabled:
491+
<<: *TypeStringBool
492+
description: "enabled or not"
451493
defaults:
452494
type: object
453495
description: |
@@ -642,7 +684,7 @@ spec:
642684
every key in this object is the file name
643685
every value in this object is the file content
644686
you can use `!!binary |` and base64 for binary files, see details here https://yaml.org/type/binary.html
645-
each key could contains prefix like {users}, {common}, {host} or config.d, users.d, cond.d, wrong prefixes will ignored, subfolders also will ignored
687+
each key could contains prefix like {common}, {users}, {hosts} or config.d, users.d, conf.d, wrong prefixes will be ignored, subfolders also will be ignored
646688
More details: https://github.com/Altinity/clickhouse-operator/blob/master/docs/chi-examples/05-settings-05-files-nested.yaml
647689
648690
any key could contains `valueFrom` with `secretKeyRef` which allow pass values from kubernetes secrets
@@ -765,6 +807,24 @@ spec:
765807
by specifying 0. This is a mutually exclusive setting with "minAvailable".
766808
minimum: 0
767809
maximum: 65535
810+
reconcile:
811+
type: object
812+
description: "allow tuning reconciling process"
813+
properties:
814+
runtime:
815+
type: object
816+
description: "runtime parameters for clickhouse-operator process which are used during reconcile cycle"
817+
properties:
818+
reconcileShardsThreadsNumber:
819+
type: integer
820+
minimum: 1
821+
maximum: 65535
822+
description: "How many goroutines will be used to reconcile shards of a cluster in parallel, 1 by default"
823+
reconcileShardsMaxConcurrencyPercent:
824+
type: integer
825+
minimum: 0
826+
maximum: 100
827+
description: "The maximum percentage of cluster shards that may be reconciled in parallel, 50 percent by default."
768828
layout:
769829
type: object
770830
description: |
@@ -1011,24 +1071,6 @@ spec:
10111071
description: |
10121072
optional, configuration of the templates names which will use for generate Kubernetes resources according to selected replica
10131073
override top-level `chi.spec.configuration.templates`, cluster-level `chi.spec.configuration.clusters.templates`, replica-level `chi.spec.configuration.clusters.layout.replicas.templates`
1014-
reconcile:
1015-
type: object
1016-
description: "allow tuning reconciling process"
1017-
properties:
1018-
runtime:
1019-
type: object
1020-
description: "runtime parameters for clickhouse-operator process which are used during reconcile cycle"
1021-
properties:
1022-
reconcileShardsThreadsNumber:
1023-
type: integer
1024-
minimum: 1
1025-
maximum: 65535
1026-
description: "How many goroutines will be used to reconcile shards of a cluster in parallel, 1 by default"
1027-
reconcileShardsMaxConcurrencyPercent:
1028-
type: integer
1029-
minimum: 0
1030-
maximum: 100
1031-
description: "The maximum percentage of cluster shards that may be reconciled in parallel, 50 percent by default."
10321074
templates:
10331075
type: object
10341076
description: "allows define templates which will use for render Kubernetes resources like StatefulSet, ConfigMap, Service, PVC, by default, clickhouse-operator have own templates, but you can override it"
Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,47 @@
11
---
2-
apiVersion: integreatly.org/v1alpha1
2+
apiVersion: grafana.integreatly.org/v1beta1
33
kind: Grafana
44
metadata:
55
name: "$GRAFANA_NAME"
6+
labels:
7+
app: grafana
68
spec:
79
deployment:
8-
annotations:
9-
cluster-autoscaler.kubernetes.io/safe-to-evict: "true"
10-
securityContext:
11-
fsGroup: 472
12-
ingress:
13-
enabled: False
14-
# baseImage: "grafana/grafana:9.3.6"
15-
dataStorage:
16-
size: 1Gi
17-
accessModes:
18-
- ReadWriteOnce
10+
metadata:
11+
annotations:
12+
cluster-autoscaler.kubernetes.io/safe-to-evict: "true"
13+
labels:
14+
app: grafana
15+
16+
persistentVolumeClaim:
17+
spec:
18+
resources:
19+
requests:
20+
storage: 1G
21+
accessModes:
22+
- ReadWriteOnce
23+
1924
client:
2025
timeout: 30
21-
preferService: True
26+
preferIngress: False
2227
config:
2328
log:
2429
mode: "console"
25-
level: "warn"
30+
level: "debug"
2631
security:
2732
admin_user: "$GRAFANA_ADMIN_USER"
2833
admin_password: "$GRAFANA_ADMIN_PASSWORD"
2934
auth:
30-
disable_login_form: $GRAFANA_DISABLE_LOGIN_FORM
31-
disable_signout_menu: $GRAFANA_DISABLE_SIGNOUT_MENU
35+
disable_login_form: "$GRAFANA_DISABLE_LOGIN_FORM"
36+
disable_signout_menu: "$GRAFANA_DISABLE_SIGNOUT_MENU"
3237
# required for Dashboard Installation - https://github.com/integr8ly/grafana-operator/issues/92
3338
auth.basic:
34-
enabled: True
39+
enabled: "True"
3540
dataproxy:
36-
timeout: 600
41+
timeout: "600"
3742
auth.anonymous:
38-
enabled: $GRAFANA_ANONYMOUS_EDITOR
43+
enabled: "$GRAFANA_ANONYMOUS_EDITOR"
3944
org_role: Editor
40-
4145
# look to https://grafana.com/docs/grafana/latest/auth/generic-oauth/
4246
# server:
4347
# root_url: $GRAFANA_ROOT_URL
@@ -53,7 +57,4 @@ spec:
5357
# scopes: openid profile email
5458
# auth_url: https://$OAUTH_DOMAIN/authorize
5559
# token_url: https://$OAUTH_DOMAIN/oauth/token
56-
# api_url: https://$OAUTH_DOMAIN/userinfo
57-
dashboardLabelSelector:
58-
- matchExpressions:
59-
- {key: app, operator: In, values: [grafana]}
60+
# api_url: https://$OAUTH_DOMAIN/userinfo
Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,25 @@
1-
apiVersion: integreatly.org/v1alpha1
1+
apiVersion: grafana.integreatly.org/v1beta1
22
kind: GrafanaDashboard
33
metadata:
44
name: "$GRAFANA_CLICKHOUSE_KEEPER_DASHBOARD_NAME"
55
labels:
66
app: grafana
77
spec:
8+
instanceSelector:
9+
matchExpressions:
10+
- key: app
11+
operator: In
12+
values:
13+
- grafana
814
url: https://raw.githubusercontent.com/Altinity/clickhouse-operator/master/grafana-dashboard/ClickHouseKeeper_dashboard.json
15+
resyncPeriod: 24h
916
datasources:
1017
- inputName: "DS_PROMETHEUS"
1118
datasourceName: "$GRAFANA_PROMETHEUS_DATASOURCE_NAME"
1219
# look to https://github.com/integr8ly/grafana-operator/issues/416#issuecomment-849498860, json used as fallback
1320
json: ""
21+
plugins:
22+
- name: "vertamedia-clickhouse-datasource"
23+
version: "3.3.1"
24+
- name: "grafana-piechart-panel"
25+
version: "1.6.4"

deploy/grafana/grafana-with-grafana-operator/grafana-dashboard-kafka-cr-template.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
1-
apiVersion: integreatly.org/v1alpha1
1+
apiVersion: grafana.integreatly.org/v1beta1
22
kind: GrafanaDashboard
33
metadata:
44
name: "$GRAFANA_CLICKHOUSE_KAFKA_DASHBOARD_NAME"
55
labels:
66
app: grafana
77
spec:
8+
instanceSelector:
9+
matchExpressions:
10+
- key: app
11+
operator: In
12+
values:
13+
- grafana
814
url: https://raw.githubusercontent.com/Altinity/clickhouse-operator/master/grafana-dashboard/Kafka_dashboard.json
15+
resyncPeriod: 24h
916
json: ""
1017
datasources:
1118
- inputName: "DS_PROMETHEUS"

deploy/grafana/grafana-with-grafana-operator/grafana-dashboard-operator-cr-template.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
1-
apiVersion: integreatly.org/v1alpha1
1+
apiVersion: grafana.integreatly.org/v1beta1
22
kind: GrafanaDashboard
33
metadata:
44
name: "$GRAFANA_DASHBOARD_NAME"
55
labels:
66
app: grafana
77
spec:
8+
instanceSelector:
9+
matchExpressions:
10+
- key: app
11+
operator: In
12+
values:
13+
- grafana
814
url: https://raw.githubusercontent.com/Altinity/clickhouse-operator/master/grafana-dashboard/Altinity_ClickHouse_Operator_dashboard.json
15+
resyncPeriod: 24h
916
# look to https://github.com/integr8ly/grafana-operator/issues/416#issuecomment-849498860, json used as fallback
1017
json: ""
1118
datasources:

deploy/grafana/grafana-with-grafana-operator/grafana-dashboard-queries-cr-template.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
1-
apiVersion: integreatly.org/v1alpha1
1+
apiVersion: grafana.integreatly.org/v1beta1
22
kind: GrafanaDashboard
33
metadata:
44
name: "$GRAFANA_DASHBOARD_NAME"
55
labels:
66
app: grafana
77
spec:
8+
instanceSelector:
9+
matchExpressions:
10+
- key: app
11+
operator: In
12+
values:
13+
- grafana
814
url: https://raw.githubusercontent.com/Altinity/clickhouse-operator/master/grafana-dashboard/ClickHouse_Queries_dashboard.json
15+
resyncPeriod: 24h
916
# look to https://github.com/integr8ly/grafana-operator/issues/416#issuecomment-849498860, json used as fallback
1017
json: ""
1118
datasources:

deploy/grafana/grafana-with-grafana-operator/grafana-dashboard-zookeeper-cr-template.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
1-
apiVersion: integreatly.org/v1alpha1
1+
apiVersion: grafana.integreatly.org/v1beta1
22
kind: GrafanaDashboard
33
metadata:
44
name: "$GRAFANA_ZOOKEEPER_DASHBOARD_NAME"
55
labels:
66
app: grafana
77
spec:
8+
instanceSelector:
9+
matchExpressions:
10+
- key: app
11+
operator: In
12+
values:
13+
- grafana
814
url: https://raw.githubusercontent.com/Altinity/clickhouse-operator/master/grafana-dashboard/Zookeeper_dashboard.json
15+
resyncPeriod: 24h
916
# look to https://github.com/integr8ly/grafana-operator/issues/416#issuecomment-849498860, json used as fallback
1017
json: ""
1118
datasources:
Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,28 @@
1-
apiVersion: integreatly.org/v1alpha1
2-
kind: GrafanaDataSource
1+
apiVersion: grafana.integreatly.org/v1beta1
2+
kind: GrafanaDatasource
33
metadata:
44
name: "${GRAFANA_CLICKHOUSE_DATASOURCE_NAME}"
55
spec:
6-
name: ${ENDPOINT}.yaml
7-
datasources:
8-
- name: "${GRAFANA_CLICKHOUSE_DATASOURCE_NAME}"
9-
type: vertamedia-clickhouse-datasource
10-
access: proxy
11-
url: "${CLICKHOUSE_URL}"
12-
basicAuth: false
13-
basicAuthUser: "${OPERATOR_CH_USER}"
6+
instanceSelector:
7+
matchLabels:
8+
app: grafana
9+
resyncPeriod: 24h
10+
datasource:
11+
name: "${GRAFANA_CLICKHOUSE_DATASOURCE_NAME}"
12+
type: vertamedia-clickhouse-datasource
13+
access: proxy
14+
url: "${CLICKHOUSE_URL}"
15+
basicAuth: false
16+
basicAuthUser: "${OPERATOR_CH_USER}"
17+
isDefault: false
18+
editable: true
19+
secureJsonData:
1420
basicAuthPassword: "${OPERATOR_CH_PASS}"
15-
isDefault: false
16-
version: 1
17-
editable: true
18-
jsonData:
19-
tlsSkipVerify: true
20-
addCorsHeader: true
21-
defaultDatabase: "default"
22-
usePOST: true
23-
useYandexCloudAuthorization: true
24-
xHeaderUser: "${OPERATOR_CH_USER}"
25-
xHeaderKey: "${OPERATOR_CH_PASS}"
21+
xHeaderKey: "${OPERATOR_CH_PASS}"
22+
jsonData:
23+
tlsSkipVerify: true
24+
addCorsHeader: true
25+
defaultDatabase: "default"
26+
usePOST: true
27+
useYandexCloudAuthorization: true
28+
xHeaderUser: "${OPERATOR_CH_USER}"
Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1-
apiVersion: integreatly.org/v1alpha1
2-
kind: GrafanaDataSource
1+
apiVersion: grafana.integreatly.org/v1beta1
2+
kind: GrafanaDatasource
33
metadata:
44
name: "$GRAFANA_PROMETHEUS_DATASOURCE_NAME"
55
spec:
6-
name: ${GRAFANA_PROMETHEUS_DATASOURCE_NAME}.yaml
7-
datasources:
8-
- name: "${GRAFANA_PROMETHEUS_DATASOURCE_NAME}"
9-
type: prometheus
10-
access: proxy
11-
url: "${PROMETHEUS_URL}"
12-
isDefault: true
13-
version: 1
14-
editable: false
15-
jsonData:
16-
tlsSkipVerify: true
17-
timeInterval: "5s"
6+
instanceSelector:
7+
matchLabels:
8+
app: grafana
9+
resyncPeriod: 24h
10+
datasource:
11+
name: "${GRAFANA_PROMETHEUS_DATASOURCE_NAME}"
12+
type: prometheus
13+
access: proxy
14+
url: "${PROMETHEUS_URL}"
15+
isDefault: true
16+
editable: false
17+
jsonData:
18+
tlsSkipVerify: true
19+
timeInterval: "5s"

0 commit comments

Comments
 (0)