Skip to content

Commit dba2a07

Browse files
Add Clickhouse (#728)
Signed-off-by: SK Ali Arman <[email protected]> Signed-off-by: shuvo <[email protected]> Co-authored-by: shuvo <[email protected]>
1 parent a8be03d commit dba2a07

38 files changed

+1890
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: v1
2+
kind: Secret
3+
metadata:
4+
name: ch-configuration
5+
namespace: demo
6+
type: Opaque
7+
stringData:
8+
ch-config.yaml: |
9+
profiles:
10+
default:
11+
max_query_size: 200000
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
apiVersion: kubedb.com/v1alpha2
2+
kind: ClickHouse
3+
metadata:
4+
name: ch-cluster
5+
namespace: demo
6+
spec:
7+
version: 24.4.1
8+
configSecret:
9+
name: ch-configuration
10+
clusterTopology:
11+
clickHouseKeeper:
12+
externallyManaged: false
13+
spec:
14+
replicas: 3
15+
storage:
16+
accessModes:
17+
- ReadWriteOnce
18+
resources:
19+
requests:
20+
storage: 1Gi
21+
cluster:
22+
- name: appscode-cluster
23+
shards: 2
24+
replicas: 2
25+
podTemplate:
26+
spec:
27+
containers:
28+
- name: clickhouse
29+
resources:
30+
limits:
31+
memory: 4Gi
32+
requests:
33+
cpu: 500m
34+
memory: 2Gi
35+
initContainers:
36+
- name: clickhouse-init
37+
resources:
38+
limits:
39+
memory: 1Gi
40+
requests:
41+
cpu: 500m
42+
memory: 1Gi
43+
storage:
44+
accessModes:
45+
- ReadWriteOnce
46+
resources:
47+
requests:
48+
storage: 1Gi
49+
deletionPolicy: WipeOut
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
apiVersion: kubedb.com/v1alpha2
2+
kind: ClickHouse
3+
metadata:
4+
name: ch-standalone
5+
namespace: demo
6+
spec:
7+
version: 24.4.1
8+
configSecret:
9+
name: clickhouse-configuration
10+
replicas: 1
11+
storage:
12+
accessModes:
13+
- ReadWriteOnce
14+
resources:
15+
requests:
16+
storage: 2Gi
17+
deletionPolicy: WipeOut
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: kubedb.com/v1alpha2
2+
kind: ClickHouse
3+
metadata:
4+
name: ch
5+
namespace: demo
6+
spec:
7+
version: 24.4.1
8+
replicas: 1
9+
storage:
10+
accessModes:
11+
- ReadWriteOnce
12+
resources:
13+
requests:
14+
storage: 1Gi
15+
deletionPolicy: WipeOut
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: v1
2+
kind: Secret
3+
metadata:
4+
name: ch-custom-config
5+
namespace: demo
6+
type: Opaque
7+
stringData:
8+
ch-config.yaml: |
9+
profiles:
10+
default:
11+
max_query_size: 200000
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: ops.kubedb.com/v1alpha1
2+
kind: ClickHouseOpsRequest
3+
metadata:
4+
name: chops-cluster-reconfiugre-with-config
5+
namespace: demo
6+
spec:
7+
type: Reconfigure
8+
databaseRef:
9+
name: ch
10+
configuration:
11+
applyConfig:
12+
config.yaml: |
13+
profiles:
14+
default:
15+
max_query_size: 180000
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: ops.kubedb.com/v1alpha1
2+
kind: ClickHouseOpsRequest
3+
metadata:
4+
name: chops-cluster-reconfiugre-with-secret
5+
namespace: demo
6+
spec:
7+
type: Reconfigure
8+
databaseRef:
9+
name: ch
10+
configuration:
11+
configSecret:
12+
name: ch-custom-config
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
apiVersion: kubedb.com/v1alpha2
2+
kind: ClickHouse
3+
metadata:
4+
name: ch
5+
namespace: demo
6+
spec:
7+
version: 24.4.1
8+
clusterTopology:
9+
clickHouseKeeper:
10+
externallyManaged: false
11+
spec:
12+
replicas: 3
13+
storage:
14+
accessModes:
15+
- ReadWriteOnce
16+
resources:
17+
requests:
18+
storage: 1Gi
19+
cluster:
20+
- name: appscode-cluster
21+
shards: 2
22+
replicas: 2
23+
podTemplate:
24+
spec:
25+
containers:
26+
- name: clickhouse
27+
resources:
28+
limits:
29+
memory: 4Gi
30+
requests:
31+
cpu: 500m
32+
memory: 2Gi
33+
initContainers:
34+
- name: clickhouse-init
35+
resources:
36+
limits:
37+
memory: 1Gi
38+
requests:
39+
cpu: 500m
40+
memory: 1Gi
41+
storage:
42+
accessModes:
43+
- ReadWriteOnce
44+
resources:
45+
requests:
46+
storage: 1Gi
47+
deletionPolicy: WipeOut
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: kubedb.com/v1alpha2
2+
kind: ClickHouse
3+
metadata:
4+
name: ch
5+
namespace: demo
6+
spec:
7+
version: 24.4.1
8+
replicas: 1
9+
storage:
10+
accessModes:
11+
- ReadWriteOnce
12+
resources:
13+
requests:
14+
storage: 2Gi
15+
deletionPolicy: WipeOut
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
apiVersion: kubedb.com/v1alpha2
2+
kind: ClickHouse
3+
metadata:
4+
name: ch
5+
namespace: demo
6+
spec:
7+
version: 24.4.1
8+
clusterTopology:
9+
clickHouseKeeper:
10+
externallyManaged: false
11+
spec:
12+
replicas: 3
13+
storage:
14+
accessModes:
15+
- ReadWriteOnce
16+
resources:
17+
requests:
18+
storage: 1Gi
19+
cluster:
20+
- name: appscode-cluster
21+
shards: 2
22+
replicas: 2
23+
podTemplate:
24+
spec:
25+
containers:
26+
- name: clickhouse
27+
resources:
28+
limits:
29+
memory: 4Gi
30+
requests:
31+
cpu: 500m
32+
memory: 2Gi
33+
initContainers:
34+
- name: clickhouse-init
35+
resources:
36+
limits:
37+
memory: 1Gi
38+
requests:
39+
cpu: 500m
40+
memory: 1Gi
41+
storage:
42+
accessModes:
43+
- ReadWriteOnce
44+
resources:
45+
requests:
46+
storage: 1Gi
47+
deletionPolicy: WipeOut

0 commit comments

Comments
 (0)