Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
c93e88a
complex refactoring for base clickhouse version 24.8 and fix in tests…
Slach Nov 10, 2024
4a219cb
fix for test_metrics_exporter.py
Slach Nov 10, 2024
f68921a
merge with 0.24.1
Slach Nov 10, 2024
cfa56a0
fix run_tests.yaml failures
Slach Nov 10, 2024
aef91cd
refactoring run_tests.yaml to allow parallel test executions
Slach Nov 10, 2024
34d9ec2
refactoring run_tests.yaml to allow parallel test executions
Slach Nov 10, 2024
e8737e9
refactoring run_tests.yaml to allow parallel test executions
Slach Nov 10, 2024
ef961ae
refactoring run_tests.yaml to allow parallel test executions
Slach Nov 10, 2024
5baf407
refactoring run_tests.yaml to allow parallel test executions
Slach Nov 10, 2024
2d85948
refactoring run_tests.yaml to allow parallel test executions
Slach Nov 10, 2024
298e13d
refactoring run_tests.yaml to allow parallel test executions
Slach Nov 10, 2024
1964167
why keeper in pending state?
Slach Nov 11, 2024
7478631
just run test_operator
Slach Nov 11, 2024
600d0d6
merge 0.24.1 into tests_refactoring
Slach Nov 21, 2024
9488eff
fix test_011_2* failures, when readonly profile, doesn't allow change…
Slach Nov 21, 2024
6276e8a
fix for test_keeper.py
Slach Nov 21, 2024
e818693
remote receive_timeout for test_029
Slach Nov 21, 2024
fcc6c25
debug run_tests.yaml
Slach Nov 21, 2024
95a39a1
debug run_tests.yaml
Slach Nov 21, 2024
e6576de
update PROMETHEUS_OPERATOR_BRANCH to 0.78.2
Slach Nov 21, 2024
adeba51
use altinity/clickhouse-server:24.3.12.76.altinitystable
Slach Nov 22, 2024
1bede28
merges with 0.24.1
Slach Nov 26, 2024
b5e5630
merge with 0.24.1
Slach Dec 4, 2024
29a8f4b
Merge branch '0.24.2' of github.com:Altinity/clickhouse-operator into…
Slach Dec 4, 2024
e4ec6ea
merge 0.24.3
Slach Dec 14, 2024
0b6f7a1
fix random_namespace for name conversion
Slach Dec 14, 2024
b396c27
test_010_1. -> test_010_1#, test_053. -> test_053#
Slach Dec 14, 2024
b0bd4df
merge 0.24.3 to test_refactoring
Slach Jan 4, 2025
b546cb9
fix for https://github.com/Altinity/clickhouse-operator/issues/1604
Slach Jan 6, 2025
41b7812
merge 0.24.3 to test_refactoring
Slach Jan 6, 2025
b9ce284
Merge branch '1.24.3' of github.com:Altinity/clickhouse-operator into…
Slach Jan 31, 2025
85543ce
Merge branch '0.25.0' of github.com:Altinity/clickhouse-operator into…
Slach Feb 5, 2025
621e324
add example to fix https://github.com/Altinity/clickhouse-operator/is…
Slach Feb 5, 2025
ad5f35f
Merge branch 'fix_readonly_in_master' into fix_readonly
Slach Feb 6, 2025
c629a9b
merge with 0.24.4, all conflicts resolved
Slach Feb 6, 2025
e663dad
merge 0.25.0 and fix conflicts
Slach Feb 6, 2025
d85bef8
Merge branch 'master' of github.com:Altinity/clickhouse-operator into…
Slach Oct 1, 2025
f641b08
Merge branch '0.25.5' of github.com:Altinity/clickhouse-operator into…
Slach Oct 1, 2025
f3065af
upgrade testflows to latest version
Slach Oct 1, 2025
0155f28
test_010024
Slach Oct 1, 2025
4fc4405
add zookeeper operator to prepare test_keeper.py
Slach Oct 2, 2025
c645b04
continue to debug test executions
Slach Oct 3, 2025
d34a3a5
continue debug test failure
Slach Oct 6, 2025
028c311
Added recommendation to disable the default user with a sample XML file
DougTidwell Oct 6, 2025
0cf33cf
Merge pull request #1840 from DougTidwell/master
alex-zaitsev Oct 7, 2025
055a6d6
Merge pull request #1852 from Altinity/0.25.5
sunsingerus Oct 24, 2025
9ef732c
Merge branch 'master' of github.com:Altinity/clickhouse-operator into…
Slach Oct 27, 2025
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
20 changes: 15 additions & 5 deletions .github/workflows/run_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,22 @@ jobs:
test_mode="--test-to-end"
fi

~/venv/qa/bin/python3 ./tests/regression.py --only=/regression/e2e.test_operator/${ONLY} $test_mode --trim-results on -o short --no-colors --native --log ./tests/raw.log
for test_file in ./tests/e2e/test_operator*.py; do
name=$(basename "$test_file" .py | sed 's/^test_//')
run_cmd="~/venv/qa/bin/python3 ./tests/regression.py --only=/regression/e2e?test_${name}/${ONLY} $test_mode --no-colors --trim-results on --debug --native --log ./tests/raw_${name}.log && "
run_cmd+="~/venv/qa/bin/tfs --no-colors transform compact ./tests/raw_${name}.log ./tests/compact_${name}.log.txt && "
run_cmd+="~/venv/qa/bin/tfs --no-colors transform nice ./tests/raw_${name}.log ./tests/nice_${name}.log.txt && "
run_cmd+="~/venv/qa/bin/tfs --no-colors transform short ./tests/raw_${name}.log ./tests/short_${name}.log.txt && "
run_cmd+="bash -xec '~/venv/qa/bin/tfs --no-colors report results -a '${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}/' ./tests/raw_${name}.log - --confidential --copyright 'Altinity Inc.' --logo ./tests/altinity.png | ~/venv/qa/bin/tfs --debug --no-colors document convert > ./tests/report_${name}.html'"

run_tests+=(
"${run_cmd}"
)
done
printf "%s\n" "${run_tests[@]}" | xargs -P 2 -I {} bash -xec '{}'

ls -la ./tests/*.html
test_result=$?
~/venv/qa/bin/tfs --no-colors transform compact ./tests/raw.log ./tests/compact.log
~/venv/qa/bin/tfs --no-colors transform nice ./tests/raw.log ./tests/nice.log.txt
~/venv/qa/bin/tfs --no-colors transform short ./tests/raw.log ./tests/short.log.txt
~/venv/qa/bin/tfs --no-colors report results -a "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}/" ./tests/raw.log - --confidential --copyright "Altinity Inc." --logo ./tests/altinity.png | ~/venv/qa/bin/tfs --debug --no-colors document convert > ./tests/report.html

echo "test_result=$test_result" >> $GITHUB_OUTPUT
exit "$test_result"
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ venv

# Tests cached files
tests/image/cache
tests/*.log.txt
tests/*.html

# Skip tmp folder
/tmp/
Expand Down
9 changes: 4 additions & 5 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,13 @@ Vagrant.configure(2) do |config|
# docker
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
add-apt-repository "deb https://download.docker.com/linux/ubuntu $(lsb_release -cs) test"
apt-get install --no-install-recommends -y docker-ce pigz
apt-get install --no-install-recommends -y docker-ce docker-ce-cli containerd.io docker-compose-plugin pigz

# docker compose
apt-get install -y --no-install-recommends python3-distutils
curl -sL https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py
python3 /tmp/get-pip.py

pip3 install -U setuptools
pip3 install -U docker-compose
pip3 install -U -r ./tests/image/requirements.txt

# k9s CLI
K9S_VERSION=$(curl -sL https://github.com/derailed/k9s/releases/latest -H "Accept: application/json" | jq -r .tag_name)
Expand Down Expand Up @@ -170,7 +168,8 @@ Vagrant.configure(2) do |config|
# K8S_VERSION=${K8S_VERSION:-1.23.1}
# K8S_VERSION=${K8S_VERSION:-1.24.8}
# K8S_VERSION=${K8S_VERSION:-1.25.4}
K8S_VERSION=${K8S_VERSION:-1.31.1}
# K8S_VERSION=${K8S_VERSION:-1.31.1}
K8S_VERSION=${K8S_VERSION:-1.31.2}
export VALIDATE_YAML=true

killall kubectl || true
Expand Down
2 changes: 1 addition & 1 deletion config/chi/templates.d/001-templates.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"containers" : [
{
"name": "clickhouse",
"image": "clickhouse/clickhouse-server:23.8",
"image": "clickhouse/clickhouse-server:24.8",
"ports": [
{
"name": "http",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"containers" : [
{
"name": "clickhouse",
"image": "clickhouse/clickhouse-server:23.8",
"image": "clickhouse/clickhouse-server:24.8",
"ports": [
{
"name": "http",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -382,13 +382,13 @@ spec:
containers:
- name: clickhouse-keeper
imagePullPolicy: Always
image: "clickhouse/clickhouse-keeper:latest-alpine"
image: "clickhouse/clickhouse-keeper:24.8"
resources:
requests:
memory: "256M"
cpu: "1"
limits:
memory: "4Gi"
memory: "1Gi"
cpu: "2"
volumeMounts:
- name: clickhouse-keeper-settings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -382,13 +382,13 @@ spec:
containers:
- name: clickhouse-keeper
imagePullPolicy: Always
image: "clickhouse/clickhouse-keeper:latest-alpine"
image: "clickhouse/clickhouse-keeper:24.8"
resources:
requests:
memory: "256M"
cpu: "1"
limits:
memory: "4Gi"
memory: "1Gi"
cpu: "2"
volumeMounts:
- name: clickhouse-keeper-settings
Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/clickhouse-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ configs:
"containers" : [
{
"name": "clickhouse",
"image": "clickhouse/clickhouse-server:23.8",
"image": "clickhouse/clickhouse-server:24.8",
"ports": [
{
"name": "http",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ spec:
containers:
- name: kubernetes-zookeeper
imagePullPolicy: IfNotPresent
image: "docker.io/zookeeper:3.8.4"
image: "docker.io/zookeeper:latest"
ports:
- containerPort: 2181
name: client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ spec:
containers:
- name: kubernetes-zookeeper
imagePullPolicy: IfNotPresent
image: "docker.io/zookeeper:3.8.4"
image: "docker.io/zookeeper:latest"
ports:
- containerPort: 2181
name: client
Expand Down
8 changes: 4 additions & 4 deletions docs/chi-examples/99-clickhouseinstallation-max.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ spec:
spec:
containers:
- name: clickhouse
image: clickhouse/clickhouse-server:23.8
image: clickhouse/clickhouse-server:24.8
volumeMounts:
- name: default-volume-claim
mountPath: /var/lib/clickhouse
Expand All @@ -686,7 +686,7 @@ spec:
memory: "64Mi"
cpu: "100m"
- name: clickhouse-log
image: clickhouse/clickhouse-server:23.8
image: clickhouse/clickhouse-server:24.8
command:
- "/bin/sh"
- "-c"
Expand All @@ -704,7 +704,7 @@ spec:
spec:
containers:
- name: clickhouse
image: clickhouse/clickhouse-server:23.8
image: clickhouse/clickhouse-server:24.8
volumeMounts:
- name: default-volume-claim
mountPath: /var/lib/clickhouse
Expand All @@ -716,7 +716,7 @@ spec:
memory: "64Mi"
cpu: "100m"
- name: clickhouse-log
image: clickhouse/clickhouse-server:23.8
image: clickhouse/clickhouse-server:24.8
command:
- "/bin/sh"
- "-c"
Expand Down
12 changes: 11 additions & 1 deletion docs/security_hardening.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,17 @@ With the default settings, the ClickHouse operator deploys ClickHouse with two u

The '**default**' user is used to connect to ClickHouse instance from a pod where it is running, and also for distributed queries. It is deployed with an **empty password** that was a long-time default for ClickHouse out-of-the-box installation.

To secure it, the operator applies network security rules that restrict connections to the pods running the ClickHouse cluster, and nothing else.
For security purposes, we recommend that you disable the `default` user altogether. As an example, create a file named `remove_default_user.xml` and place it in the `users.d` directory. This markup does the trick:

```xml
<clickhouse>
<users>
<default remove="1"/>
</users>
</clickhouse>
```

However, if you do use the `default` user, the operator applies network security rules that restrict connections to the pods running the ClickHouse cluster, and nothing else.

Before version **0.19.0** `hostRegexp` was applied that captured pod names. This did not work correctly in some Kubernetes distributions, such as GKE. In later versions, the operator additionally applies a restrictive set of pod IP addresses and rebuilds this set if the IP address of a pod changes for whatever reason.

Expand Down
16 changes: 8 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/altinity/clickhouse-operator

go 1.25.1
go 1.25

replace (
github.com/emicklei/go-restful/v3 => github.com/emicklei/go-restful/v3 v3.10.0
Expand Down Expand Up @@ -40,7 +40,7 @@ require (
go.opentelemetry.io/otel/sdk v1.24.0
go.opentelemetry.io/otel/sdk/metric v1.24.0
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e
golang.org/x/sync v0.12.0
golang.org/x/sync v0.17.0
gopkg.in/d4l3k/messagediff.v1 v1.2.1
gopkg.in/yaml.v3 v3.0.1
sigs.k8s.io/controller-runtime v0.15.1
Expand Down Expand Up @@ -88,14 +88,14 @@ require (
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.38.0 // indirect
golang.org/x/mod v0.28.0 // indirect
golang.org/x/net v0.44.0 // indirect
golang.org/x/oauth2 v0.28.0 // indirect
golang.org/x/sys v0.31.0 // indirect
golang.org/x/term v0.30.0 // indirect
golang.org/x/text v0.23.0 // indirect
golang.org/x/sys v0.36.0 // indirect
golang.org/x/term v0.35.0 // indirect
golang.org/x/text v0.29.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
golang.org/x/tools v0.37.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
Expand Down
28 changes: 14 additions & 14 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -544,8 +544,8 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA=
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.28.0 h1:gQBtGhjxykdjY9YhZpSlZIsbnaE2+PgjfLWUQTnoZ1U=
golang.org/x/mod v0.28.0/go.mod h1:yfB/L0NOf/kmEbXjzCPOx1iK1fRutOydrCMsqRhEBxI=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
Expand Down Expand Up @@ -583,8 +583,8 @@ golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwY
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
golang.org/x/net v0.44.0 h1:evd8IRDyfNBMBTTY5XRF1vaZlD+EmWx6x8PkhR04H/I=
golang.org/x/net v0.44.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
Expand All @@ -603,8 +603,8 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw=
golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug=
golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
Expand Down Expand Up @@ -653,20 +653,20 @@ golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik=
golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k=
golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.30.0 h1:PQ39fJZ+mfadBm0y5WlL4vlM7Sx1Hgf13sMIY2+QS9Y=
golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g=
golang.org/x/term v0.35.0 h1:bZBVKBudEyhRcajGcNc3jIfWPqV4y/Kt2XcoigOWtDQ=
golang.org/x/term v0.35.0/go.mod h1:TPGtkTLesOwf2DE8CgVYiZinHAOuy5AYUYT1lENIZnA=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
golang.org/x/text v0.29.0 h1:1neNs90w9YzJ9BocxfsQNHKuAT4pkghyXc4nhZ6sJvk=
golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4=
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
Expand Down Expand Up @@ -726,8 +726,8 @@ golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4f
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg=
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
golang.org/x/tools v0.37.0 h1:DVSRzp7FwePZW356yEAChSdNcQo6Nsp+fex1SUW09lE=
golang.org/x/tools v0.37.0/go.mod h1:MBN5QPQtLMHVdvsbtarmTNukZDdgwdwlO5qGacAzF0w=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
Expand Down
6 changes: 3 additions & 3 deletions tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ To execute tests, you will need:
* TestFlows Python library (`pip3 install -r ./tests/image/requirements.txt`)
* To run tests in docker container (approximately 2 times slower, but does not require any additional configuration):
- `docker`
- `docker-compose`
- `docker compose`
- `python3`
* To run tests natively on your machine:
- `kubectl`
Expand All @@ -37,7 +37,7 @@ To execute the test suite (that currently involves only operator tests, not test
```bash
pip3 install -U -r ./tests/image/requirements.txt
docker pull registry.gitlab.com/altinity-public/container-images/clickhouse-operator-test-runner:latest
COMPOSE_HTTP_TIMEOUT=1800 python3 ./tests/regression.py --only "/regression/e2e.test_operator/*"
COMPOSE_HTTP_TIMEOUT=1800 python3 ./tests/regression.py --only "/regression/e2e?test_operator/*"
```

To execute tests natively (not in docker), you need to add `--native` parameter.
Expand All @@ -47,7 +47,7 @@ Tests running in parallel by default, to run it consistently, add `--parallel of
If you need only one certain test, you may execute

```bash
COMPOSE_HTTP_TIMEOUT=1800 python3 ./tests/regression.py --only "/regression/e2e.test_operator/test_009*"
COMPOSE_HTTP_TIMEOUT=1800 python3 ./tests/regression.py --only "/regression/e2e?test_operator/test_009*"
```

where `009` may be substituted by the number of the test you need. Tests --- numbers and names correspondence may be found in `tests/regression.py` and `tests/test_*.py` source code files.
2 changes: 1 addition & 1 deletion tests/docker-compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ services:
- NET_ADMIN

# dummy service which does nothing, but allows to postpone
# 'docker-compose up -d' till all dependecies will go healthy
# 'docker compose up -d' till all dependecies will go healthy
all_services_ready:
image: hello-world
privileged: true
Expand Down
6 changes: 3 additions & 3 deletions tests/e2e/clickhouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ def query(
pwd_str = "" if pwd == "" else f"--password={pwd}"
user_str = "" if user == "" else f"--user={user}"

for i in [1,2,3]: # re-tries for "Unknown stream id" error
for _ in [1,2,3]: # re-tries for "Unknown stream id" error
if with_error:
res = kubectl.launch(
f"exec {pod_name} -n {current().context.test_namespace} -c {container}"
f" --"
f" clickhouse-client -mn -h {host} --port={port} {user_str} {pwd_str} {advanced_params}"
f" clickhouse-client --receive_timeout={timeout} -mn -h {host} --port={port} {user_str} {pwd_str} {advanced_params}"
f' --query="{sql}"'
f" 2>&1",
timeout=timeout,
Expand All @@ -43,7 +43,7 @@ def query(
res = kubectl.launch(
f"exec {pod_name} -n {current().context.test_namespace} -c {container}"
f" -- "
f"clickhouse-client -mn -h {host} --port={port} {user_str} {pwd_str} {advanced_params}"
f"clickhouse-client --receive_timeout={timeout} -mn -h {host} --port={port} {user_str} {pwd_str} {advanced_params}"
f'--query="{sql}"',
timeout=timeout,
ns=current().context.test_namespace,
Expand Down
2 changes: 2 additions & 0 deletions tests/e2e/manifests/chi/test-011-secured-default-2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ spec:
useTemplates:
- name: clickhouse-version
configuration:
profiles:
readonly/receive_timeout: 60
users:
default/profile: readonly
clusters:
Expand Down
Loading
Loading