-
Notifications
You must be signed in to change notification settings - Fork 469
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from Altinity/release-0.2beta
Release 0.2.0-beta
- Loading branch information
Showing
63 changed files
with
1,972 additions
and
782 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
# Builds a dev docker image | ||
# Alter image tag in deployment spec in dev env in order to use it | ||
|
||
cat Dockerfile | envsubst | docker build -t sunsingerus/clickhouse-operator:dev . | ||
|
||
docker login -u sunsingerus | ||
docker push sunsingerus/clickhouse-operator:dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,41 @@ | ||
# Namespaces where clickhouse-operator listens for events. | ||
# Concurrently running operators should listen on different namespaces | ||
namespaces: | ||
- dev | ||
- info | ||
- onemore | ||
|
||
commonConfigsPath: config.d | ||
deploymentConfigsPath: conf.d | ||
usersConfigsPath: users.d | ||
########################################### | ||
## | ||
## Additional Configuration Files Section | ||
## | ||
########################################### | ||
|
||
# Path to folder where ClickHouse configuration files common for all instances within CHI are located. | ||
chCommonConfigsPath: config.d | ||
|
||
# Path to folder where ClickHouse configuration files unique for each instances within CHI are located. | ||
chDeploymentConfigsPath: conf.d | ||
|
||
# Path to folder where ClickHouse configuration files with users settings are located. | ||
# Files are common for all instances within CHI | ||
chUsersConfigsPath: users.d | ||
|
||
# Path to folder where ClickHouseInstallation .yaml manifests are located. | ||
# Manifests are applied in sorted alpha-numeric order | ||
chiTemplatesPath: templates.d | ||
|
||
########################################### | ||
## | ||
## Cluster Update Section | ||
## | ||
########################################### | ||
|
||
# How many seconds to wait for created/updated StatefulSet to be Ready | ||
statefulSetUpdateTimeout: 50 | ||
|
||
# How many seconds to wait between checks for created/updated StatefulSet status | ||
statefulSetUpdatePollPeriod: 2 | ||
|
||
# What to do in case created/updated StatefulSet is not in Ready after `statefulSetUpdateTimeout` seconds | ||
onStatefulSetUpdateFailureAction: abort |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
apiVersion: "clickhouse.altinity.com/v1" | ||
kind: "ClickHouseInstallation" | ||
metadata: | ||
name: "template1" | ||
spec: | ||
defaults: | ||
replicasUseFQDN: 0 # 0 - by default, 1 - enabled | ||
distributedDDL: | ||
profile: default | ||
deployment: | ||
zone: | ||
matchLabels: | ||
clickhouse.altinity.com/zone: zone1 | ||
podTemplate: clickhouse-v18.16.1 | ||
volumeClaimTemplate: default | ||
configuration: | ||
zookeeper: | ||
nodes: | ||
- host: zk-statefulset-0.zk-service.default.svc.cluster.local | ||
port: 2181 | ||
- host: zk-statefulset-1.zk-service.default.svc.cluster.local | ||
port: 2181 | ||
- host: zk-statefulset-2.zk-service.default.svc.cluster.local | ||
port: 2181 | ||
users: | ||
test/profile: default | ||
test/quotas: default | ||
readonly/profile: readonly | ||
profiles: | ||
readonly/readonly: "1" | ||
default/max_memory_usage: "1000000000" | ||
quotas: | ||
default/interval/duration: "3600" | ||
settings: | ||
compression/case/method: zstd | ||
templates: | ||
podTemplates: | ||
- name: clickhouse-v18.16.1 | ||
containers: | ||
- name: clickhouse | ||
image: yandex/clickhouse-server:18.16.1 | ||
volumeMounts: | ||
- name: clickhouse-data-test | ||
mountPath: /var/lib/clickhouse | ||
- name: clickhouse-v18.16.2 | ||
containers: | ||
- name: clickhouse | ||
image: yandex/clickhouse-server:18.16.2 | ||
volumeMounts: | ||
- name: clickhouse-data-test | ||
mountPath: /var/lib/clickhouse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
apiVersion: "clickhouse.altinity.com/v1" | ||
kind: "ClickHouseInstallation" | ||
metadata: | ||
name: "template2" | ||
spec: | ||
templates: | ||
podTemplates: | ||
- name: clickhouse-v19.4.3.11 | ||
containers: | ||
- name: clickhouse | ||
image: yandex/clickhouse-server:19.4.3.11 | ||
volumeMounts: | ||
- name: clickhouse-data-test | ||
mountPath: /var/lib/clickhouse | ||
- name: clickhouse-v19.3.9.12 | ||
containers: | ||
- name: clickhouse | ||
image: yandex/clickhouse-server:19.3.9.12 | ||
volumeMounts: | ||
- name: clickhouse-data-test | ||
mountPath: /var/lib/clickhouse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
apiVersion: "clickhouse.altinity.com/v1" | ||
kind: "ClickHouseInstallation" | ||
metadata: | ||
name: "example-03" | ||
name: "standard-02" | ||
spec: | ||
configuration: | ||
clusters: | ||
- name: "example-03-1shard-2repl" | ||
- name: "standard-02-1shard-2repl" | ||
layout: | ||
type: Standard | ||
replicasCount: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
apiVersion: "clickhouse.altinity.com/v1" | ||
kind: "ClickHouseInstallation" | ||
metadata: | ||
name: "example-02" | ||
name: "standard-03" | ||
spec: | ||
configuration: | ||
clusters: | ||
- name: "example-02-2shard-1repl" | ||
- name: "standard-03-2shard-1repl" | ||
layout: | ||
type: Standard | ||
shardsCount: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
apiVersion: "clickhouse.altinity.com/v1" | ||
kind: "ClickHouseInstallation" | ||
metadata: | ||
name: "example-04" | ||
name: "standard-04" | ||
spec: | ||
configuration: | ||
clusters: | ||
- name: "example-04-not-sharded-replicated" | ||
- name: "standard-04-not-sharded-replicated" | ||
layout: | ||
type: Standard | ||
shardsCount: 1 | ||
replicasCount: 2 | ||
- name: "example-04-sharded-not-replicated" | ||
- name: "standard-04-sharded-not-replicated" | ||
layout: | ||
type: Standard | ||
shardsCount: 2 | ||
- name: "example-04-sharded-replicated" | ||
- name: "standard-04-sharded-replicated" | ||
layout: | ||
type: Standard | ||
replicasCount: 2 |
27 changes: 27 additions & 0 deletions
27
docs/examples/02-standard-layout-01-1shard-1repl-simple-persistent-volume.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
apiVersion: "clickhouse.altinity.com/v1" | ||
kind: "ClickHouseInstallation" | ||
metadata: | ||
name: "standard-01-simple-pv" | ||
spec: | ||
configuration: | ||
clusters: | ||
- name: "standard-01-simple-pv" | ||
layout: | ||
type: Standard | ||
shardsCount: 1 | ||
replicasCount: 1 | ||
defaults: | ||
deployment: | ||
volumeClaimTemplate: volumeclaim-template | ||
templates: | ||
volumeClaimTemplates: | ||
- name: volumeclaim-template | ||
persistentVolumeClaim: | ||
metadata: | ||
name: USE_DEFAULT_NAME | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 500Mi |
45 changes: 45 additions & 0 deletions
45
docs/examples/02-standard-layout-02-1shard-1repl-deployment-persistent-volume.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
apiVersion: "clickhouse.altinity.com/v1" | ||
kind: "ClickHouseInstallation" | ||
metadata: | ||
name: "standard-02-deployment-pv" | ||
spec: | ||
configuration: | ||
clusters: | ||
- name: "standard-02-deployment-pv" | ||
# Deployment is specified for this cluster explicitly | ||
deployment: | ||
podTemplate: pod-template-with-volume | ||
volumeClaimTemplate: storage-vc-template | ||
layout: | ||
type: Standard | ||
shardsCount: 1 | ||
replicasCount: 1 | ||
|
||
templates: | ||
podTemplates: | ||
- name: pod-template-with-volume | ||
containers: | ||
- name: clickhouse | ||
image: yandex/clickhouse-server:19.3.7 | ||
ports: | ||
- name: http | ||
containerPort: 8123 | ||
- name: client | ||
containerPort: 9000 | ||
- name: interserver | ||
containerPort: 9009 | ||
volumeMounts: | ||
- name: clickhouse-data-storage | ||
mountPath: /var/lib/clickhouse | ||
|
||
volumeClaimTemplates: | ||
- name: storage-vc-template | ||
persistentVolumeClaim: | ||
metadata: | ||
name: clickhouse-data-storage | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 1Gi |
Oops, something went wrong.