Skip to content

Commit

Permalink
Merge remote-tracking branch 'altinity/0.24.1' into 0.24.1
Browse files Browse the repository at this point in the history
  • Loading branch information
sunsingerus committed Nov 26, 2024
2 parents 39380e2 + 9e9f67b commit 7ae82ad
Show file tree
Hide file tree
Showing 9 changed files with 188 additions and 266 deletions.
2 changes: 1 addition & 1 deletion dockerfile/metrics-exporter/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ RUN METRICS_EXPORTER_BIN=/tmp/metrics-exporter bash -xe ./dev/go_build_metrics_e
# ===================
# == Delve builder ==
# ===================
FROM --platform=${BUILDPLATFORM} golang:1.19 AS delve-builder
FROM --platform=${BUILDPLATFORM} golang:1.23 AS delve-builder
RUN CGO_ENABLED=0 GO111MODULE=on GOOS="${TARGETOS}" GOARCH="${TARGETARCH}" \
go install -ldflags "-s -w -extldflags '-static'" github.com/go-delve/delve/cmd/dlv@latest && \
rm -rf /root/.cache/go-build/ /go/pkg/mod/
Expand Down
2 changes: 1 addition & 1 deletion dockerfile/operator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ RUN OPERATOR_BIN=/tmp/clickhouse-operator bash -xe ./dev/go_build_operator.sh
# ===================
# == Delve builder ==
# ===================
FROM --platform=${BUILDPLATFORM} golang:1.19 AS delve-builder
FROM --platform=${BUILDPLATFORM} golang:1.23 AS delve-builder
RUN CGO_ENABLED=0 GO111MODULE=on GOOS="${TARGETOS}" GOARCH="${TARGETARCH}" \
go install -ldflags "-s -w -extldflags '-static'" github.com/go-delve/delve/cmd/dlv@latest && \
rm -rf /root/.cache/go-build/ /go/pkg/mod/
Expand Down
45 changes: 19 additions & 26 deletions docs/chk-examples/clickhouse-keeper-1-node-for-test-only.yaml
Original file line number Diff line number Diff line change
@@ -1,51 +1,44 @@
---
# Fake Service to drop-in replacement in tests
apiVersion: v1
kind: Service
metadata:
# DNS would be like zookeeper.namespace.svc
name: zookeeper
labels:
app: zookeeper
spec:
ports:
- port: 2181
name: client
- port: 7000
name: prometheus
selector:
clickhouse-keeper.altinity.com/chk: clickhouse-keeper
clickhouse-keeper.altinity.com/ready: "yes"
---
apiVersion: "clickhouse-keeper.altinity.com/v1"
kind: "ClickHouseKeeperInstallation"
metadata:
name: clickhouse-keeper
labels:
app: clickhouse-keeper
spec:
defaults:
templates:
podTemplate: clickhouse-keeper
volumeClaimTemplate: data-volume
podTemplate: latest-with-volume-mounts
clusterServiceTemplate: zookeeper
configuration:
clusters:
- name: "test-only"
- name: test
layout:
replicasCount: 1
settings:
keeper_server/tcp_port: "2181"
templates:
podTemplates:
- name: latest-with-volume-mounts
- name: clickhouse-keeper
spec:
containers:
- name: clickhouse-keeper
imagePullPolicy: Always
image: "clickhouse/clickhouse-keeper:latest-alpine"
image: "clickhouse/clickhouse-keeper:24.8"
volumeClaimTemplates:
- name: data-volume
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storage: 100Mi
serviceTemplates: # Service drop-in replacement in tests
- name: zookeeper
generateName: zookeeper
spec:
ports:
- port: 2181
name: client
- port: 7000
name: prometheus
type: ClusterIP
clusterIP: None

This file was deleted.

45 changes: 19 additions & 26 deletions docs/chk-examples/clickhouse-keeper-3-node-for-test-only.yaml
Original file line number Diff line number Diff line change
@@ -1,51 +1,44 @@
---
# Fake Service to drop-in replacement in tests
apiVersion: v1
kind: Service
metadata:
# DNS would be like zookeeper.namespace.svc
name: zookeeper
labels:
app: zookeeper
spec:
ports:
- port: 2181
name: client
- port: 7000
name: prometheus
selector:
clickhouse-keeper.altinity.com/chk: clickhouse-keeper
clickhouse-keeper.altinity.com/ready: "yes"
---
apiVersion: "clickhouse-keeper.altinity.com/v1"
kind: "ClickHouseKeeperInstallation"
metadata:
name: clickhouse-keeper
labels:
app: clickhouse-keeper
spec:
defaults:
templates:
podTemplate: clickhouse-keeper
volumeClaimTemplate: data-volume
podTemplate: latest-with-volume-mounts
clusterServiceTemplate: zookeeper
configuration:
clusters:
- name: "test-only"
- name: test
layout:
replicasCount: 3
settings:
keeper_server/tcp_port: "2181"
templates:
podTemplates:
- name: latest-with-volume-mounts
- name: clickhouse-keeper
spec:
containers:
- name: clickhouse-keeper
imagePullPolicy: Always
image: "clickhouse/clickhouse-keeper:latest-alpine"
image: "clickhouse/clickhouse-keeper:24.8"
volumeClaimTemplates:
- name: data-volume
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storage: 100Mi
serviceTemplates: # Service drop-in replacement in tests
- name: zookeeper
generateName: zookeeper
spec:
ports:
- port: 2181
name: client
- port: 7000
name: prometheus
type: ClusterIP
clusterIP: None
11 changes: 5 additions & 6 deletions tests/e2e/test_keeper.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ def check_zk_root_znode(chi, keeper_type, pod_count, retry_count=15):
"zookeeper": "2",
"zookeeper-operator": "3",
"clickhouse-keeper": "2",
"clickhouse-keeper_with_chk": "2",
"CHK": "2",
"chk": "1",
}
if expected_out[keeper_type] != out.strip(" \t\r\n") and i + 1 < retry_count:
with Then(f"{keeper_type} system.zookeeper not ready, wait {(i + 1) * 3} sec"):
Expand Down Expand Up @@ -358,10 +357,10 @@ def test_clickhouse_keeper_rescale(self):
@Requirements(RQ_SRS_026_ClickHouseOperator_CustomResource_Kind_ClickHouseKeeperInstallation("1.0"))
def test_clickhouse_keeper_rescale_chk(self):
test_keeper_rescale_outline(
keeper_type="clickhouse-keeper_with_chk",
keeper_type="chk",
pod_for_insert_data="chi-test-cluster-for-zk-default-0-1-0",
keeper_manifest_1_node="clickhouse-keeper-1-node-for-test-only.yaml",
keeper_manifest_3_node="clickhouse-keeper-3-node-for-test-only.yaml",
keeper_manifest_1_node="clickhouse-keeper-1-node-for-test.yaml",
keeper_manifest_3_node="clickhouse-keeper-3-node-for-test.yaml",
)


Expand Down Expand Up @@ -428,7 +427,7 @@ def test_keeper_probes_outline(
min_bytes_for_compact_part=10485760,
parts_to_delay_insert=1000000,
parts_to_throw_insert=1000000,
max_parts_in_total=1000000;
max_parts_in_total=1000000;
""",
)
with Then("Insert data to keeper_bench for make zookeeper workload"):
Expand Down
Loading

0 comments on commit 7ae82ad

Please sign in to comment.