Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 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
9ef732c
Merge branch 'master' of github.com:Altinity/clickhouse-operator into…
Slach Oct 27, 2025
d22d63c
Merge branch '0.25.6' of github.com:Altinity/clickhouse-operator into…
Slach Dec 3, 2025
3d8d1ea
Merge pull request #1886 from Altinity/0.25.6
sunsingerus Dec 11, 2025
16c9181
Fix misspelled word
rajdudhare1 Dec 13, 2025
30bd85c
Merge pull request #1890 from rajdudhare1/master
Slach Dec 15, 2025
c13c525
merge master into tests_refactoring, fix conflicts
Slach Dec 15, 2025
d5943a9
update kuberentes-version to 1.34.3
Slach Dec 15, 2025
1712f0a
actualize default clickhouse image in podTemplates
Slach Dec 15, 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
26 changes: 18 additions & 8 deletions .github/workflows/run_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
with:
driver: docker
container-runtime: containerd
kubernetes-version: v1.33.5
kubernetes-version: v1.34.3
cpus: max
memory: max

Expand Down Expand Up @@ -108,17 +108,27 @@ 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"

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v6
with:
name: testflows-logs
path: |
Expand All @@ -127,7 +137,7 @@ jobs:
if-no-files-found: error
retention-days: 7

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v6
with:
name: testflows-report
path: |
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,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
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ subjects:
- kind: ServiceAccount
name: {{ include "altinity-clickhouse-operator.serviceAccountName" . }}
namespace: {{ include "altinity-clickhouse-operator.namespace" . }}

# Template Parameters:
#
# NAMESPACE=kube-system
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ metadata:
namespace: {{ include "altinity-clickhouse-operator.namespace" . }}
labels: {{ include "altinity-clickhouse-operator.labels" . | nindent 4 }}
annotations: {{ include "altinity-clickhouse-operator.annotations" . | nindent 4 }}{{ if .Values.serviceAccount.annotations }}{{ toYaml .Values.serviceAccount.annotations | nindent 4 }}{{ end }}

# Template Parameters:
#
# NAMESPACE=kube-system
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 @@ -724,7 +724,7 @@ configs:
"containers" : [
{
"name": "clickhouse",
"image": "clickhouse/clickhouse-server:23.8",
"image": "clickhouse/clickhouse-server:24.8",
"ports": [
{
"name": "http",
Expand Down
2 changes: 1 addition & 1 deletion deploy/operator/clickhouse-operator-install-ansible.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5306,7 +5306,7 @@ data:
"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 @@ -5499,7 +5499,7 @@ data:
"containers" : [
{
"name": "clickhouse",
"image": "clickhouse/clickhouse-server:23.8",
"image": "clickhouse/clickhouse-server:24.8",
"ports": [
{
"name": "http",
Expand Down
2 changes: 1 addition & 1 deletion deploy/operator/clickhouse-operator-install-bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5565,7 +5565,7 @@ data:
"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 @@ -5246,7 +5246,7 @@ data:
"containers" : [
{
"name": "clickhouse",
"image": "clickhouse/clickhouse-server:23.8",
"image": "clickhouse/clickhouse-server:24.8",
"ports": [
{
"name": "http",
Expand Down
2 changes: 1 addition & 1 deletion deploy/operator/clickhouse-operator-install-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5299,7 +5299,7 @@ data:
"containers" : [
{
"name": "clickhouse",
"image": "clickhouse/clickhouse-server:23.8",
"image": "clickhouse/clickhouse-server:24.8",
"ports": [
{
"name": "http",
Expand Down
2 changes: 1 addition & 1 deletion deploy/operator/clickhouse-operator-install-tf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5306,7 +5306,7 @@ data:
"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
2 changes: 1 addition & 1 deletion 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.4
go 1.25

replace (
github.com/emicklei/go-restful/v3 => github.com/emicklei/go-restful/v3 v3.10.0
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
6 changes: 3 additions & 3 deletions tests/e2e/manifests/chi/test-022-broken-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ metadata:
spec:
defaults:
templates:
podTemplate: v20.3
podTemplate: broken-image
templates:
podTemplates:
- name: v20.3
- name: broken-image
spec:
containers:
- name: clickhouse-pod
image: clickhouse/clickhouse-server:24.3-broken
image: clickhouse/clickhouse-server:24.8-broken
configuration:
clusters:
- name: default
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
spec:
containers:
- name: clickhouse-pod
image: clickhouse/clickhouse-server:24.3-broken
image: clickhouse/clickhouse-server:24.8-broken
defaults:
templates:
podTemplate: clickhouse-new
8 changes: 8 additions & 0 deletions tests/e2e/manifests/chi/test-cluster-for-alerts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ spec:
prometheus/metrics: true
prometheus/events: true
prometheus/asynchronous_metrics: true
# tune for low memory
mark_cache_size: 67108864
merge_tree/parts_to_throw_insert: 300
merge_tree/parts_to_delay_insert: 150
# merge_tree/merge_max_block_size: 1024
# merge_tree/max_bytes_to_merge_at_max_space_in_pool: 1073741824
# merge_tree/number_of_free_entries_in_pool_to_lower_max_size_of_merge: 0
# background_schedule_pool_size: 128

zookeeper:
nodes:
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/manifests/chit/tpl-clickhouse-alerts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ spec:
spec:
containers:
- name: clickhouse-pod
image: clickhouse/clickhouse-server:24.3
image: clickhouse/clickhouse-server:latest
imagePullPolicy: Always
Loading
Loading