Skip to content
Merged

0.25.4 #1826

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
171 commits
Select commit Hold shift + click to select a range
237b640
deny list implementation via predicates
AdheipSingh Jul 15, 2025
5857852
0.25.4
sunsingerus Aug 12, 2025
fe65de9
env: manifests
sunsingerus Aug 12, 2025
5dbe17c
env: helm
sunsingerus Aug 12, 2025
05b3247
dev: poller
sunsingerus Aug 14, 2025
4d68d98
dev: context propagation
sunsingerus Aug 14, 2025
fbd281d
dev: generalize poller
sunsingerus Aug 15, 2025
d33e0f2
dev: sts poller
sunsingerus Aug 15, 2025
7d38e15
dev: introduce pod poller
sunsingerus Aug 15, 2025
28a6d7e
fix(helm): remove whitespace trimming from priorityClassName conditio…
alirezadoostimehr Aug 15, 2025
de00631
dev: merge pod and sts pollers
sunsingerus Aug 15, 2025
c93597c
dev: introduce host objects poller
sunsingerus Aug 15, 2025
92e1c96
dev: file
sunsingerus Aug 15, 2025
3de902e
dev: remove unused callback
sunsingerus Aug 15, 2025
2e8bc7a
dev: expose pod started waiter through interface
sunsingerus Aug 15, 2025
48205f3
dev: actualize options
sunsingerus Aug 16, 2025
af08ad8
dev: extract and unify host waiter functions
sunsingerus Aug 16, 2025
2269505
Merge pull request #1794 from alirezadoostimehr/0.25.4
Slach Aug 16, 2025
a6899a3
Merge remote-tracking branch 'altinity/0.25.4' into 0.25.4
sunsingerus Aug 17, 2025
dcaf5ab
dev: clarify waiter
sunsingerus Aug 20, 2025
fdf1fa7
dev: explanations
sunsingerus Aug 20, 2025
7587308
dev: config
sunsingerus Aug 20, 2025
7571d26
env: manifests
sunsingerus Aug 20, 2025
5ebb8bd
env: helm
sunsingerus Aug 20, 2025
c0a2261
env: dev config
sunsingerus Aug 20, 2025
a362664
dev: config minor clarification
sunsingerus Aug 21, 2025
260aa1b
env: manifests
sunsingerus Aug 21, 2025
2cd5638
env:; helm
sunsingerus Aug 21, 2025
f7cfe10
env: configs
sunsingerus Aug 21, 2025
8aa0717
dev: unify wait config section
sunsingerus Aug 21, 2025
6dc2265
dev: introduce host section to chi reconcile
sunsingerus Aug 21, 2025
d9f4b62
dev: chi host reconciler normalizer
sunsingerus Aug 21, 2025
1c5239c
dev: introduce explicit ready wait funoptions
sunsingerus Aug 21, 2025
b4cc3a3
dev: make probe waiting not exclussive, but compulsory
sunsingerus Aug 21, 2025
1dc5e3f
dev: sts reconcile options
sunsingerus Aug 21, 2025
860f330
dev: codegen
sunsingerus Aug 21, 2025
539b934
env: manifests
sunsingerus Aug 21, 2025
3872bb8
dev: dev config
sunsingerus Aug 21, 2025
08b1e5d
config template
sunsingerus Aug 21, 2025
3c50c81
env: chart
sunsingerus Aug 21, 2025
3a7b5f8
Test populating labels from a CHI template
alex-zaitsev Aug 22, 2025
39c3697
dev: reconciler merge
sunsingerus Aug 22, 2025
4f7a2fa
dev: merge chop config
sunsingerus Aug 22, 2025
b8d47cc
Merge remote-tracking branch 'altinity/0.25.4' into 0.25.4
sunsingerus Aug 22, 2025
6498669
dev: add CRD spec field
sunsingerus Aug 25, 2025
d280c9d
env: typo
sunsingerus Aug 25, 2025
d30a4c0
dev: claridy options
sunsingerus Aug 25, 2025
22e8fdb
env: manifests
sunsingerus Aug 25, 2025
661def8
env: helm
sunsingerus Aug 25, 2025
f7889b6
dev: introduce host recinciling section in chi spec
sunsingerus Aug 25, 2025
1c23d67
env: manifests
sunsingerus Aug 25, 2025
a9a84cd
env: helm chart
sunsingerus Aug 25, 2025
7054790
dev: fix type
sunsingerus Aug 26, 2025
88076c1
env: manifests
sunsingerus Aug 26, 2025
8c370b8
env: helm chart
sunsingerus Aug 26, 2025
170ce92
Update 14-zones-distribution-01.yaml (#1802)
realyota Aug 26, 2025
928d1ba
dev: introduce new queue item type
sunsingerus Sep 1, 2025
834eb93
dev: adjust priority
sunsingerus Sep 1, 2025
02d9f16
dev: add slices controllers
sunsingerus Sep 1, 2025
6fe84c7
dev: move updfate slices to meta object and introduce slices handler
sunsingerus Sep 1, 2025
1986c6c
dev: switch explicitly to meta object in endppoint handler
sunsingerus Sep 1, 2025
4fe6b2b
dev: adjust role access to cover endpointslice
sunsingerus Sep 1, 2025
05edb68
env: manifests
sunsingerus Sep 1, 2025
315ff3f
env: helm charts
sunsingerus Sep 1, 2025
8f082cc
dev: introduce set of strings
sunsingerus Sep 3, 2025
d62dd97
dev: switch namespaces to strings
sunsingerus Sep 3, 2025
d55f7f7
dev: codegenerator
sunsingerus Sep 3, 2025
f95195a
dev: introduce excluded namespaces and logic around include/exclude
sunsingerus Sep 4, 2025
a5222b8
dev: enhanse strings
sunsingerus Sep 4, 2025
586f584
dev: watched namespace
sunsingerus Sep 4, 2025
6308dc0
dev: tooling
sunsingerus Sep 4, 2025
23417f5
dev: generator
sunsingerus Sep 4, 2025
b3a9ff6
dev: switch to object handling
sunsingerus Sep 4, 2025
25b3e61
env: manifests
sunsingerus Sep 4, 2025
7ef191a
env: helm
sunsingerus Sep 4, 2025
dccc6f7
dev: clean
sunsingerus Sep 4, 2025
4cc5eca
env: manifests
sunsingerus Sep 4, 2025
087ab6d
env: helm chart
sunsingerus Sep 4, 2025
222b57a
dev: introduce include/exclude namespaces
sunsingerus Sep 5, 2025
68b3be2
dev: codegenerator
sunsingerus Sep 5, 2025
e075850
merge
sunsingerus Sep 5, 2025
acca19a
dev: adopt exclude namespace env var
sunsingerus Sep 5, 2025
81a0f10
dev: adopt excluded namespaces
sunsingerus Sep 5, 2025
b8fc6a2
dev: parametrize go version
sunsingerus Sep 5, 2025
fcd84f8
dev: pass go version
sunsingerus Sep 5, 2025
81b925a
env: builder
sunsingerus Sep 5, 2025
5997123
dev: test builder
sunsingerus Sep 5, 2025
2db1892
dev: paramtrized dockerfile
sunsingerus Sep 8, 2025
dc4d196
dev: bumo go version
sunsingerus Sep 8, 2025
d28e6ef
dev: config template
sunsingerus Sep 8, 2025
308dbec
dev: example
sunsingerus Sep 8, 2025
69ac743
configs
sunsingerus Sep 8, 2025
517fb98
env: helm
sunsingerus Sep 8, 2025
c44619b
env: manifests
sunsingerus Sep 8, 2025
86c05ed
dev: clarify failure
sunsingerus Sep 8, 2025
a365c82
dev: switch to fallback scenario
sunsingerus Sep 8, 2025
ebce71d
env: manifests
sunsingerus Sep 8, 2025
1b45834
dev: rename field
sunsingerus Sep 9, 2025
be48e66
dev: field usage
sunsingerus Sep 9, 2025
f8b5d5a
dev: config file template
sunsingerus Sep 9, 2025
846271f
dev: CRD chop config
sunsingerus Sep 9, 2025
384760d
dev: codegenerator
sunsingerus Sep 9, 2025
1bd09bc
env: manifests
sunsingerus Sep 9, 2025
823655e
env: helm
sunsingerus Sep 9, 2025
ebe328b
dev: config files
sunsingerus Sep 9, 2025
20ea7fe
dev: config value explanation
sunsingerus Sep 9, 2025
fd9cfa3
env: manifests
sunsingerus Sep 9, 2025
3218c9e
dev: explanation
sunsingerus Sep 9, 2025
5768984
doc: fix typo for clickhuse and clichouse (#1807)
nahuel11500 Sep 9, 2025
98562ee
Publish Operator Helm Chart on helm.altinity.com
joshleecreates Aug 13, 2025
6af6b5f
add use_compression config option - per https://clickhouse.com/docs/o…
wilkermichael Sep 11, 2025
e6c6ee0
dev: simplify handler
sunsingerus Sep 11, 2025
0c883e8
dev: code generator
sunsingerus Sep 11, 2025
1afd079
env: manifests
sunsingerus Sep 11, 2025
5b41c56
Extend test_010011_3 to cover long settings names mapped to secrets
alex-zaitsev Sep 12, 2025
618dc37
dev: rewrite shell name creator
sunsingerus Sep 15, 2025
1d762b7
dev: return error in case unable to create anv var
sunsingerus Sep 15, 2025
12de7da
Add system.custom_metrics scraping
alex-zaitsev Sep 16, 2025
d0e20a5
Make test a bit more reliable
alex-zaitsev Sep 16, 2025
45c409b
Add a test for system.custom_metrics
alex-zaitsev Sep 16, 2025
8dc4ba0
dev: extract reconcile macros
sunsingerus Sep 18, 2025
6932c97
dev: macros
sunsingerus Sep 18, 2025
81c93a5
code generator
sunsingerus Sep 18, 2025
c30c6eb
dev: unify naming
sunsingerus Sep 18, 2025
29405a1
dev: switch controller
sunsingerus Sep 18, 2025
0ca9e24
dev: unify model
sunsingerus Sep 18, 2025
63efaea
add values.schema.json (#1815)
Slach Sep 19, 2025
4197c11
dev: inherit cluster reconcile
sunsingerus Sep 20, 2025
39f4ae6
dev: extract reconcile separately
sunsingerus Sep 20, 2025
05a53a3
dev: extract reconcile runtime
sunsingerus Sep 20, 2025
a43fb1b
dev: switch reconcile
sunsingerus Sep 20, 2025
2da12bd
dev: extend interface
sunsingerus Sep 20, 2025
16e4417
dev: adjust normalizer
sunsingerus Sep 20, 2025
4f5243a
dev: code generator
sunsingerus Sep 20, 2025
0acd315
dev: unify keeper
sunsingerus Sep 20, 2025
98be017
dev: code generator
sunsingerus Sep 20, 2025
22729fa
Merge remote-tracking branch 'altinity/0.25.4' into 0.25.4
sunsingerus Sep 20, 2025
415b657
dev: clarify
sunsingerus Sep 20, 2025
c1bded5
dev: actualize cluster reconcile CRD section
sunsingerus Sep 20, 2025
41f9ef0
env: manifests
sunsingerus Sep 20, 2025
b04c4c6
env: helm
sunsingerus Sep 20, 2025
1fd7127
doc: chi examples
sunsingerus Sep 20, 2025
2baae0d
doc: chop conf examples
sunsingerus Sep 20, 2025
67558d2
dev: fix typo in CRD
sunsingerus Sep 23, 2025
659e330
env: fix typo in helm
sunsingerus Sep 23, 2025
e87bdf5
env: fix typo in manifest
sunsingerus Sep 23, 2025
d6335e4
Try attach table if INCORRECT_DATA(error code 117) with "CREATE TABLE…
gangseok514 Sep 23, 2025
1d525e8
test_010040_1 -- waiting for a startup probe instead of readiness
alex-zaitsev Sep 23, 2025
c22123c
dev: reconcile merger
sunsingerus Sep 24, 2025
97e0185
dev: verbose logger
sunsingerus Sep 24, 2025
264785f
dev: poller clearly explains steps
sunsingerus Sep 24, 2025
5fbb937
dev: statup probe type
sunsingerus Sep 24, 2025
c6ecf45
dev: startup probe generators
sunsingerus Sep 24, 2025
176f149
dev: add explanations
sunsingerus Sep 24, 2025
49914ca
dev: add default startup probe insertion
sunsingerus Sep 24, 2025
28ed4e0
test: fix test 10040_1
sunsingerus Sep 24, 2025
edc431b
Merge pull request #1791 from joshleecreates/publish-helm-charts
alex-zaitsev Sep 24, 2025
d0c5e6d
dev: probes accessors
sunsingerus Sep 24, 2025
ac5f309
Merge remote-tracking branch 'altinity/0.25.4' into 0.25.4
sunsingerus Sep 24, 2025
325fcf8
Fix test
alex-zaitsev Sep 25, 2025
bc2f535
Extra sanity check
alex-zaitsev Sep 25, 2025
5ac353c
Support watching multiple namespaces in OLM (#1825)
saeedhosseini21 Sep 25, 2025
8087ac0
dev: introduce reconciling/reconcile pair
sunsingerus Sep 25, 2025
0d7259b
dev: support migration and normalization of the pair
sunsingerus Sep 25, 2025
3995000
doc: major example
sunsingerus Sep 25, 2025
3b5f8e5
dev: support in CRD painr reconcile/reconciling
sunsingerus Sep 25, 2025
b2f5609
env: manifests
sunsingerus Sep 25, 2025
0bc54f7
env: helm
sunsingerus Sep 25, 2025
0ffedaf
Replace 'reconciling' with 'reconcile'
alex-zaitsev Sep 26, 2025
c205d81
dev: lower cr logger priority
sunsingerus Sep 26, 2025
4e069d2
env: manifests
sunsingerus Sep 26, 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
5 changes: 3 additions & 2 deletions .github/workflows/build_branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ jobs:
DOCKER_PASS: ${{ secrets.DOCKER_PASS }}
run: |
export CHO_RELEASE=$(cat release)
export GO_VERSION=$(grep '^go ' go.mod | awk '{print $2}')

echo "${DOCKER_PASS}" | docker login -u $DOCKER_USER --password-stdin docker.io
docker buildx build --progress plain --platform=linux/amd64,linux/arm64 -f dockerfile/operator/Dockerfile -t docker.io/${DOCKER_ORG}/clickhouse-operator:${CHO_RELEASE} --pull --push .
docker buildx build --progress plain --platform=linux/amd64,linux/arm64 -f dockerfile/metrics-exporter/Dockerfile -t docker.io/${DOCKER_ORG}/metrics-exporter:${CHO_RELEASE} --pull --push .
docker buildx build --progress plain --platform=linux/amd64,linux/arm64 -f dockerfile/operator/Dockerfile --build-arg GO_VERSION=${GO_VERSION} -t docker.io/${DOCKER_ORG}/clickhouse-operator:${CHO_RELEASE} --pull --push .
docker buildx build --progress plain --platform=linux/amd64,linux/arm64 -f dockerfile/metrics-exporter/Dockerfile --build-arg GO_VERSION=${GO_VERSION} -t docker.io/${DOCKER_ORG}/metrics-exporter:${CHO_RELEASE} --pull --push .
6 changes: 3 additions & 3 deletions .github/workflows/build_master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ jobs:
DOCKER_PASS: ${{ secrets.DOCKER_PASS }}
run: |
export CHO_RELEASE=latest
export GO_VERSION=$(grep '^go ' go.mod | awk '{print $2}')

echo "${DOCKER_PASS}" | docker login -u $DOCKER_USER --password-stdin docker.io
docker buildx build --progress plain --platform=linux/amd64,linux/arm64 -f dockerfile/operator/Dockerfile -t docker.io/${DOCKER_ORG}/clickhouse-operator:${CHO_RELEASE} --pull --push .
docker buildx build --progress plain --platform=linux/amd64,linux/arm64 -f dockerfile/metrics-exporter/Dockerfile -t docker.io/${DOCKER_ORG}/metrics-exporter:${CHO_RELEASE} --pull --push .

docker buildx build --progress plain --platform=linux/amd64,linux/arm64 -f dockerfile/operator/Dockerfile --build-arg GO_VERSION=${GO_VERSION} -t docker.io/${DOCKER_ORG}/clickhouse-operator:${CHO_RELEASE} --pull --push .
docker buildx build --progress plain --platform=linux/amd64,linux/arm64 -f dockerfile/metrics-exporter/Dockerfile --build-arg GO_VERSION=${GO_VERSION} -t docker.io/${DOCKER_ORG}/metrics-exporter:${CHO_RELEASE} --pull --push .
124 changes: 110 additions & 14 deletions .github/workflows/release_chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@ jobs:
- name: Package Chart
run: cr package deploy/helm/clickhouse-operator

- name: Install Helm
run: |
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash

- name: Login to GitHub Container Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Get Release Assets
id: get_assets
run: |
Expand Down Expand Up @@ -62,13 +55,38 @@ jobs:
-H "Content-Type: application/gzip" \
-T "${CHART_PATH}" \
"https://uploads.github.com/repos/${GITHUB_REPOSITORY}/releases/${{ github.event.release.id }}/assets?name=$(basename ${CHART_PATH})"

- name: Validate Helm Repository Configuration
run: |
if [ -z "${{ secrets.HELM_GITHUB_TOKEN }}" ]; then
echo "ERROR: HELM_GITHUB_TOKEN secret is not set or is empty"
echo "Please add HELM_GITHUB_TOKEN to repository secrets with write access to the helm repository"
exit 1
fi

if [ -z "${{ vars.HELM_GITHUB_REPOSITORY }}" ]; then
echo "ERROR: HELM_GITHUB_REPOSITORY variable is not set or is empty"
echo "Please add HELM_GITHUB_REPOSITORY to repository variables (Settings -> Secrets and variables -> Actions -> Variables)"
exit 1
fi

echo "Configuration validated:"
echo " HELM_GITHUB_REPOSITORY: ${{ vars.HELM_GITHUB_REPOSITORY }}"
echo " HELM_GITHUB_TOKEN: [SET]"

- name: Upload Release Artifacts to Helm Repo
run: |
cr upload \
--git-repo=${{ vars.HELM_GITHUB_REPOSITORY }} \
--owner=${GITHUB_REPOSITORY_OWNER} \
--release-name-template=${{ github.event.release.name }} \
--token=${{ secrets.HELM_GITHUB_TOKEN }} \
--package-path=.cr-release-packages \
--skip-existing
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"

- name: Release Chart
- name: Release Chart to Operator Repo
run: |
git remote add httpsorigin "https://github.com/${GITHUB_REPOSITORY}.git"
git fetch httpsorigin
Expand All @@ -80,8 +98,86 @@ jobs:
--index-path=index.yaml \
--remote=httpsorigin \
--push

- name: Push Helm Chart to OCI Registry
- name: Release Chart to Helm Repo
run: |
CHART_PATH=$(ls .cr-release-packages/altinity-clickhouse-operator-*.tgz)
helm push "${CHART_PATH}" oci://ghcr.io/altinity/clickhouse-operator-helm-chart
# Validate configuration before attempting to push
if [ -z "${{ vars.HELM_GITHUB_REPOSITORY }}" ]; then
echo "ERROR: HELM_GITHUB_REPOSITORY variable is not set or is empty"
echo "This step requires HELM_GITHUB_REPOSITORY to be set in repository variables"
echo "Go to: Settings -> Secrets and variables -> Actions -> Variables"
exit 1
fi

if [ -z "${{ secrets.HELM_GITHUB_TOKEN }}" ]; then
echo "ERROR: HELM_GITHUB_TOKEN secret is not set or is empty"
echo "This step requires HELM_GITHUB_TOKEN with write access to: ${GITHUB_REPOSITORY_OWNER}/${{ vars.HELM_GITHUB_REPOSITORY }}"
echo "Go to: Settings -> Secrets and variables -> Actions -> Secrets"
exit 1
fi

echo "Attempting to push to helm repository: ${GITHUB_REPOSITORY_OWNER}/${{ vars.HELM_GITHUB_REPOSITORY }}"

# Test token authentication
echo "Testing token authentication..."
TOKEN_USER=$(curl -sS -H "Authorization: token ${{ secrets.HELM_GITHUB_TOKEN }}" https://api.github.com/user | jq -r '.login')
echo "Token authenticated as user: ${TOKEN_USER}"

# Save current directory
WORK_DIR=$(pwd)

# Create a temporary directory for helm repo operations
TEMP_DIR=$(mktemp -d)
cd "$TEMP_DIR"

# Clone the helm repository WITHOUT token in URL to avoid masking issues
echo "Cloning helm repository to temporary directory..."
git clone https://github.com/${GITHUB_REPOSITORY_OWNER}/${{ vars.HELM_GITHUB_REPOSITORY }}.git helm-repo || {
echo "ERROR: Failed to clone helm repository"
echo "Please verify:"
echo " 1. Repository exists: ${GITHUB_REPOSITORY_OWNER}/${{ vars.HELM_GITHUB_REPOSITORY }}"
exit 1
}

cd helm-repo

# Configure git credentials for push
git config user.email "[email protected]"
git config user.name "$GITHUB_ACTOR"

# Set up authentication using git credential helper
git config credential.helper "store --file=.git/credentials"
echo "https://x-access-token:${{ secrets.HELM_GITHUB_TOKEN }}@github.com" > .git/credentials

# Now use cr index from within the helm repo to avoid history conflicts
echo "Generating index.yaml within helm repository context..."

# Copy the package to a local directory within helm repo
mkdir -p .cr-release-packages
cp "$WORK_DIR"/.cr-release-packages/*.tgz .cr-release-packages/ || {
echo "ERROR: No chart packages found in .cr-release-packages"
exit 1
}

# Generate index with cr (this will handle the gh-pages branch automatically)
cr index \
--git-repo=${{ vars.HELM_GITHUB_REPOSITORY }} \
--owner=${GITHUB_REPOSITORY_OWNER} \
--release-name-template=${{ github.event.release.name }} \
--token=${{ secrets.HELM_GITHUB_TOKEN }} \
--package-path=.cr-release-packages \
--index-path=index.yaml \
--push || {
echo "ERROR: Failed to generate or push index to helm repository"
echo "Debug: Current directory is $(pwd)"
echo "Debug: Git remotes:"
git remote -v
echo "Debug: Git status:"
git status
exit 1
}

echo "Successfully updated helm repository index"

# Cleanup
cd /
rm -rf "$TEMP_DIR"
8 changes: 5 additions & 3 deletions .github/workflows/run_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,15 @@ jobs:
run: |
minikube status
export CHO_RELEASE=$(cat release)
export GO_VERSION=$(grep '^go ' go.mod | awk '{print $2}')
echo "current release=$CHO_RELEASE"
echo "current go version=$GO_VERSION"

docker build -f dockerfile/operator/Dockerfile -t altinity/clickhouse-operator:${CHO_RELEASE} --pull .
docker build -f dockerfile/metrics-exporter/Dockerfile -t altinity/metrics-exporter:${CHO_RELEASE} --pull .
docker build -f dockerfile/operator/Dockerfile --build-arg GO_VERSION=${GO_VERSION} -t altinity/clickhouse-operator:${CHO_RELEASE} --pull .
docker build -f dockerfile/metrics-exporter/Dockerfile --build-arg GO_VERSION=${GO_VERSION} -t altinity/metrics-exporter:${CHO_RELEASE} --pull .

docker image save altinity/clickhouse-operator:${CHO_RELEASE} -o operator.tar
docker image save altinity/metrics-exporter:${CHO_RELEASE} -o metrics-exporter.tar
docker image save altinity/metrics-exporter:${CHO_RELEASE} -o metrics-exporter.tar

minikube image load operator.tar
minikube image load metrics-exporter.tar
Expand Down
7 changes: 7 additions & 0 deletions cmd/operator/app/thread_chi.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ func initClickHouse(ctx context.Context) {
log.V(1).F().Info("Config parsed:")
log.Info("\n" + chop.Config().String(true))

// Log namespace deny list configuration
if chop.Config().Watch.Namespaces.Exclude.Len() > 0 {
log.Info("Namespace deny list configured: %v - these namespaces will NOT be reconciled", chop.Config().Watch.Namespaces.Exclude.Value())
} else {
log.V(1).Info("No namespace deny list configured - all watched namespaces will be reconciled")
}

// Create Informers
kubeInformerFactory := kubeinformers.NewSharedInformerFactoryWithOptions(
kubeClient,
Expand Down
12 changes: 12 additions & 0 deletions cmd/operator/app/thread_keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ func keeperPredicate() predicate.Funcs {
return false
}

// Check if namespace should be watched (includes deny list check)
if !chop.Config().IsNamespaceWatched(obj.Namespace) {
logger.V(2).Info("chkInformer: skip event, namespace is not watched or is in deny list", "namespace", obj.Namespace)
return false
}

if obj.Spec.Suspend.Value() {
return false
}
Expand All @@ -107,6 +113,12 @@ func keeperPredicate() predicate.Funcs {
return false
}

// Check if namespace should be watched (includes deny list check)
if !chop.Config().IsNamespaceWatched(obj.Namespace) {
logger.V(2).Info("chkInformer: skip event, namespace is not watched or is in deny list", "namespace", obj.Namespace)
return false
}

if obj.Spec.Suspend.Value() {
return false
}
Expand Down
59 changes: 38 additions & 21 deletions config/config-dev.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# IMPORTANT
# This file is auto-generated
# Do not edit this file - all changes would be lost
# Edit appropriate template in the following folder:
# deploy/builder/templates-config
# IMPORTANT
#
#
#
#
#
#
#
#
#
#
#
#
#
#
# Template parameters available:
# WATCH_NAMESPACES=
# CH_USERNAME_PLAIN=
# CH_PASSWORD_PLAIN=
# CH_CREDENTIALS_SECRET_NAMESPACE=
# CH_CREDENTIALS_SECRET_NAME=clickhouse-operator
# VERBOSITY=1

################################################
##
Expand All @@ -23,8 +23,9 @@ watch:
# Concurrently running operators should watch on different namespaces.
# IMPORTANT
# Regexp is applicable.
#namespaces: ["dev", "test"]
namespaces: [dev, test]
namespaces:
include: [dev, test]
exclude: []

clickhouse:
configuration:
Expand Down Expand Up @@ -276,8 +277,8 @@ template:
chi:
# CHI template updates handling policy
# Possible policy values:
# - ReadOnStart. Accept CHIT updates on the operators start only.
# - ApplyOnNextReconcile. Accept CHIT updates at all time. Apply news CHITs on next regular reconcile of the CHI
# - ReadOnStart. Accept CHIT updates on the operator's start only.
# - ApplyOnNextReconcile. Accept CHIT updates at all time. Apply new CHITs on next regular reconcile of the CHI
policy: ApplyOnNextReconcile

# Path to the folder where ClickHouseInstallation templates .yaml manifests are located.
Expand All @@ -288,7 +289,7 @@ template:
# CHK template updates handling policy
# Possible policy values:
# - ReadOnStart. Accept CHIT updates on the operators start only.
# - ApplyOnNextReconcile. Accept CHIT updates at all time. Apply news CHITs on next regular reconcile of the CHI
# - ApplyOnNextReconcile. Accept CHIT updates at all time. Apply new CHITs on next regular reconcile of the CHI
policy: ApplyOnNextReconcile

# Path to the folder where ClickHouseInstallation templates .yaml manifests are located.
Expand All @@ -315,9 +316,9 @@ reconcile:
# 3. The first shard is always reconciled alone. Concurrency starts from the second shard and onward.
# Thus limiting number of shards being reconciled (and thus having hosts down) in each CHI by both number and percentage

# Max number of concurrent shard reconciles within one CHI in progress
# Max number of concurrent shard reconciles within one cluster in progress
reconcileShardsThreadsNumber: 1
# Max percentage of concurrent shard reconciles within one CHI in progress
# Max percentage of concurrent shard reconciles within one cluster in progress
reconcileShardsMaxConcurrencyPercent: 50

# Reconcile StatefulSet scenario
Expand Down Expand Up @@ -356,15 +357,31 @@ reconcile:
# - to be excluded from a ClickHouse cluster
# - to complete all running queries
# - to be included into a ClickHouse cluster
# respectfully before moving forward
# respectfully before moving forward with host reconcile
wait:
exclude: true
queries: true
include: false
# The operator during reconcile procedure should wait for replicas to catch-up
# replication delay a.k.a replication lag for the following replicas
replicas:
# All replicas (new and known earlier) are explicitly requested to wait for replication to catch-up
all: no
# New replicas only are requested to wait for replication to catch-up
new: yes
# Replication catch-up is considered to be completed as soon as replication delay
# a.k.a replication lag - calculated as "MAX(absolute_delay) FROM system.replicas"
# is within this specified delay (in seconds)
delay: 10
probes:
# Whether the operator during host launch procedure should wait for startup probe to succeed.
# In case probe is unspecified wait is assumed to be completed successfully.
# Default option value is to do not wait.
startup: no
# Whether the operator during host launch procedure should wait for readiness probe to succeed.
# In case probe is unspecified wait is assumed to be completed successfully.
# Default option value is to wait.
readiness: yes

################################################
##
Expand Down
19 changes: 17 additions & 2 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ watch:
# Concurrently running operators should watch on different namespaces.
# IMPORTANT
# Regexp is applicable.
#namespaces: ["dev", "test"]
namespaces: []

clickhouse:
Expand Down Expand Up @@ -356,15 +355,31 @@ reconcile:
# - to be excluded from a ClickHouse cluster
# - to complete all running queries
# - to be included into a ClickHouse cluster
# respectfully before moving forward
# respectfully before moving forward with host reconcile
wait:
exclude: true
queries: true
include: false
# The operator during reconcile procedure should wait for replicas to catch-up
# replication delay a.k.a replication lag for the following replicas
replicas:
# All replicas (new and known earlier) are explicitly requested to wait for replication to catch-up
all: no
# New replicas only are requested to wait for replication to catch-up
new: yes
# Replication catch-up is considered to be completed as soon as replication delay
# a.k.a replication lag - calculated as "MAX(absolute_delay) FROM system.replicas"
# is within this specified delay (in seconds)
delay: 10
probes:
# Whether the operator during host launch procedure should wait for startup probe to succeed.
# In case probe is unspecified wait is assumed to be completed successfully.
# Default option value is to do not wait.
startup: no
# Whether the operator during host launch procedure should wait for readiness probe to succeed.
# In case probe is unspecified wait is assumed to be completed successfully.
# Default option value is to wait.
readiness: yes

################################################
##
Expand Down
Loading
Loading