Skip to content

Commit 9ef732c

Browse files
committed
Merge branch 'master' of github.com:Altinity/clickhouse-operator into tests_refactoring
Signed-off-by: Slach <[email protected]> # Conflicts: # .github/workflows/run_tests.yaml # tests/e2e/test_keeper.py # tests/e2e/test_operator.py
2 parents d34a3a5 + 055a6d6 commit 9ef732c

File tree

65 files changed

+9508
-371
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+9508
-371
lines changed

.github/workflows/run_tests.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ jobs:
8383
8484
- name: Run Tests
8585
id: run-tests
86+
continue-on-error: true
8687
run: |
8788
echo "Test run settings:"
8889
echo " test mode: ${{ github.event.inputs.test_mode }}"
@@ -145,7 +146,7 @@ jobs:
145146
retention-days: 90
146147

147148
- name: Test Failed
148-
if: ${{ failure() }}
149+
if: ${{ steps.run-tests.outputs.test_result != '0' }}
149150
uses: actions/github-script@v3
150151
with:
151152
script: |

config/config-dev.yaml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -353,12 +353,13 @@ reconcile:
353353

354354
# Reconcile Host scenario
355355
host:
356-
# Whether the operator during reconcile procedure should wait for a ClickHouse host:
357-
# - to be excluded from a ClickHouse cluster
358-
# - to complete all running queries
359-
# - to be included into a ClickHouse cluster
360-
# respectfully before moving forward with host reconcile
356+
# The operator during reconcile procedure should wait for a ClickHouse host to achieve the following conditions:
361357
wait:
358+
# Whether the operator during reconcile procedure should wait for a ClickHouse host:
359+
# - to be excluded from a ClickHouse cluster
360+
# - to complete all running queries
361+
# - to be included into a ClickHouse cluster
362+
# respectfully before moving forward with host reconcile
362363
exclude: true
363364
queries: true
364365
include: false
@@ -382,6 +383,15 @@ reconcile:
382383
# In case probe is unspecified wait is assumed to be completed successfully.
383384
# Default option value is to wait.
384385
readiness: yes
386+
# The operator during reconcile procedure should drop the following entities:
387+
drop:
388+
replicas:
389+
# Whether the operator during reconcile procedure should drop replicas when replica is deleted
390+
onDelete: yes
391+
# Whether the operator during reconcile procedure should drop replicas when replica volume is lost
392+
onLostVolume: yes
393+
# Whether the operator during reconcile procedure should drop active replicas when replica is deleted or recreated
394+
active: no
385395

386396
################################################
387397
##

config/config.yaml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -351,12 +351,13 @@ reconcile:
351351

352352
# Reconcile Host scenario
353353
host:
354-
# Whether the operator during reconcile procedure should wait for a ClickHouse host:
355-
# - to be excluded from a ClickHouse cluster
356-
# - to complete all running queries
357-
# - to be included into a ClickHouse cluster
358-
# respectfully before moving forward with host reconcile
354+
# The operator during reconcile procedure should wait for a ClickHouse host to achieve the following conditions:
359355
wait:
356+
# Whether the operator during reconcile procedure should wait for a ClickHouse host:
357+
# - to be excluded from a ClickHouse cluster
358+
# - to complete all running queries
359+
# - to be included into a ClickHouse cluster
360+
# respectfully before moving forward with host reconcile
360361
exclude: true
361362
queries: true
362363
include: false
@@ -380,6 +381,15 @@ reconcile:
380381
# In case probe is unspecified wait is assumed to be completed successfully.
381382
# Default option value is to wait.
382383
readiness: yes
384+
# The operator during reconcile procedure should drop the following entities:
385+
drop:
386+
replicas:
387+
# Whether the operator during reconcile procedure should drop replicas when replica is deleted
388+
onDelete: yes
389+
# Whether the operator during reconcile procedure should drop replicas when replica volume is lost
390+
onLostVolume: yes
391+
# Whether the operator during reconcile procedure should drop active replicas when replica is deleted or recreated
392+
active: no
383393

384394
################################################
385395
##

deploy/builder/templates-config/config.yaml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -345,12 +345,13 @@ reconcile:
345345

346346
# Reconcile Host scenario
347347
host:
348-
# Whether the operator during reconcile procedure should wait for a ClickHouse host:
349-
# - to be excluded from a ClickHouse cluster
350-
# - to complete all running queries
351-
# - to be included into a ClickHouse cluster
352-
# respectfully before moving forward with host reconcile
348+
# The operator during reconcile procedure should wait for a ClickHouse host to achieve the following conditions:
353349
wait:
350+
# Whether the operator during reconcile procedure should wait for a ClickHouse host:
351+
# - to be excluded from a ClickHouse cluster
352+
# - to complete all running queries
353+
# - to be included into a ClickHouse cluster
354+
# respectfully before moving forward with host reconcile
354355
exclude: true
355356
queries: true
356357
include: false
@@ -374,6 +375,15 @@ reconcile:
374375
# In case probe is unspecified wait is assumed to be completed successfully.
375376
# Default option value is to wait.
376377
readiness: yes
378+
# The operator during reconcile procedure should drop the following entities:
379+
drop:
380+
replicas:
381+
# Whether the operator during reconcile procedure should drop replicas when replica is deleted
382+
onDelete: yes
383+
# Whether the operator during reconcile procedure should drop replicas when replica volume is lost
384+
onLostVolume: yes
385+
# Whether the operator during reconcile procedure should drop active replicas when replica is deleted or recreated
386+
active: no
377387

378388
################################################
379389
##

deploy/builder/templates-install-bundle/clickhouse-operator-install-yaml-template-01-section-crd-01-chi-chit.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,10 @@ spec:
242242
type: object
243243
description: "Normalized resource completed"
244244
x-kubernetes-preserve-unknown-fields: true
245+
actionPlan:
246+
type: object
247+
description: "Action Plan"
248+
x-kubernetes-preserve-unknown-fields: true
245249
hostsWithTablesCreated:
246250
type: array
247251
description: "List of hosts with tables created by the operator"
@@ -539,6 +543,26 @@ spec:
539543
Whether the operator during host launch procedure should wait for ready probe to succeed.
540544
In case probe is unspecified wait is assumed to be completed successfully.
541545
Default option value is to wait.
546+
drop:
547+
type: object
548+
properties:
549+
replicas:
550+
type: object
551+
description: |
552+
Whether the operator during reconcile procedure should drop replicas when replica is deleted or recreated
553+
properties:
554+
onDelete:
555+
<<: *TypeStringBool
556+
description: |
557+
Whether the operator during reconcile procedure should drop replicas when replica is deleted
558+
onLostVolume:
559+
<<: *TypeStringBool
560+
description: |
561+
Whether the operator during reconcile procedure should drop replicas when replica volume is lost
562+
active:
563+
<<: *TypeStringBool
564+
description: |
565+
Whether the operator during reconcile procedure should drop active replicas when replica is deleted or recreated
542566
reconcile:
543567
<<: *TypeReconcile
544568
description: "Optional, allows tuning reconciling cycle for ClickhouseInstallation from clickhouse-operator side"

deploy/builder/templates-install-bundle/clickhouse-operator-install-yaml-template-01-section-crd-02-chopconf.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,26 @@ spec:
393393
Whether the operator during host launch procedure should wait for readiness probe to succeed.
394394
In case probe is unspecified wait is assumed to be completed successfully.
395395
Default option value is to wait.
396+
drop:
397+
type: object
398+
properties:
399+
replicas:
400+
type: object
401+
description: |
402+
Whether the operator during reconcile procedure should drop replicas when replica is deleted or recreated
403+
properties:
404+
onDelete:
405+
<<: *TypeStringBool
406+
description: |
407+
Whether the operator during reconcile procedure should drop replicas when replica is deleted
408+
onLostVolume:
409+
<<: *TypeStringBool
410+
description: |
411+
Whether the operator during reconcile procedure should drop replicas when replica volume is lost
412+
active:
413+
<<: *TypeStringBool
414+
description: |
415+
Whether the operator during reconcile procedure should drop active replicas when replica is deleted or recreated
396416
annotation:
397417
type: object
398418
description: "defines which metadata.annotations items will include or exclude during render StatefulSet, Pod, PVC resources"

deploy/helm/clickhouse-operator/crds/CustomResourceDefinition-clickhouseinstallations.clickhouse.altinity.com.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,10 @@ spec:
242242
type: object
243243
description: "Normalized resource completed"
244244
x-kubernetes-preserve-unknown-fields: true
245+
actionPlan:
246+
type: object
247+
description: "Action Plan"
248+
x-kubernetes-preserve-unknown-fields: true
245249
hostsWithTablesCreated:
246250
type: array
247251
description: "List of hosts with tables created by the operator"
@@ -539,6 +543,26 @@ spec:
539543
Whether the operator during host launch procedure should wait for ready probe to succeed.
540544
In case probe is unspecified wait is assumed to be completed successfully.
541545
Default option value is to wait.
546+
drop:
547+
type: object
548+
properties:
549+
replicas:
550+
type: object
551+
description: |
552+
Whether the operator during reconcile procedure should drop replicas when replica is deleted or recreated
553+
properties:
554+
onDelete:
555+
!!merge <<: *TypeStringBool
556+
description: |
557+
Whether the operator during reconcile procedure should drop replicas when replica is deleted
558+
onLostVolume:
559+
!!merge <<: *TypeStringBool
560+
description: |
561+
Whether the operator during reconcile procedure should drop replicas when replica volume is lost
562+
active:
563+
!!merge <<: *TypeStringBool
564+
description: |
565+
Whether the operator during reconcile procedure should drop active replicas when replica is deleted or recreated
542566
reconcile:
543567
!!merge <<: *TypeReconcile
544568
description: "Optional, allows tuning reconciling cycle for ClickhouseInstallation from clickhouse-operator side"

deploy/helm/clickhouse-operator/crds/CustomResourceDefinition-clickhouseinstallationtemplates.clickhouse.altinity.com.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,10 @@ spec:
242242
type: object
243243
description: "Normalized resource completed"
244244
x-kubernetes-preserve-unknown-fields: true
245+
actionPlan:
246+
type: object
247+
description: "Action Plan"
248+
x-kubernetes-preserve-unknown-fields: true
245249
hostsWithTablesCreated:
246250
type: array
247251
description: "List of hosts with tables created by the operator"
@@ -539,6 +543,26 @@ spec:
539543
Whether the operator during host launch procedure should wait for ready probe to succeed.
540544
In case probe is unspecified wait is assumed to be completed successfully.
541545
Default option value is to wait.
546+
drop:
547+
type: object
548+
properties:
549+
replicas:
550+
type: object
551+
description: |
552+
Whether the operator during reconcile procedure should drop replicas when replica is deleted or recreated
553+
properties:
554+
onDelete:
555+
!!merge <<: *TypeStringBool
556+
description: |
557+
Whether the operator during reconcile procedure should drop replicas when replica is deleted
558+
onLostVolume:
559+
!!merge <<: *TypeStringBool
560+
description: |
561+
Whether the operator during reconcile procedure should drop replicas when replica volume is lost
562+
active:
563+
!!merge <<: *TypeStringBool
564+
description: |
565+
Whether the operator during reconcile procedure should drop active replicas when replica is deleted or recreated
542566
reconcile:
543567
!!merge <<: *TypeReconcile
544568
description: "Optional, allows tuning reconciling cycle for ClickhouseInstallation from clickhouse-operator side"

deploy/helm/clickhouse-operator/crds/CustomResourceDefinition-clickhouseoperatorconfigurations.clickhouse.altinity.com.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,26 @@ spec:
393393
Whether the operator during host launch procedure should wait for readiness probe to succeed.
394394
In case probe is unspecified wait is assumed to be completed successfully.
395395
Default option value is to wait.
396+
drop:
397+
type: object
398+
properties:
399+
replicas:
400+
type: object
401+
description: |
402+
Whether the operator during reconcile procedure should drop replicas when replica is deleted or recreated
403+
properties:
404+
onDelete:
405+
!!merge <<: *TypeStringBool
406+
description: |
407+
Whether the operator during reconcile procedure should drop replicas when replica is deleted
408+
onLostVolume:
409+
!!merge <<: *TypeStringBool
410+
description: |
411+
Whether the operator during reconcile procedure should drop replicas when replica volume is lost
412+
active:
413+
!!merge <<: *TypeStringBool
414+
description: |
415+
Whether the operator during reconcile procedure should drop active replicas when replica is deleted or recreated
396416
annotation:
397417
type: object
398418
description: "defines which metadata.annotations items will include or exclude during render StatefulSet, Pod, PVC resources"

deploy/helm/clickhouse-operator/templates/generated/Service-clickhouse-operator-metrics.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ metadata:
1717
annotations: {{ include "altinity-clickhouse-operator.annotations" . | nindent 4 }}
1818
spec:
1919
ports:
20+
{{ if .Values.metrics.enabled }}
2021
- port: 8888
2122
name: ch-metrics
23+
{{ end }}
2224
- port: 9999
2325
name: op-metrics
2426
selector: {{ include "altinity-clickhouse-operator.selectorLabels" . | nindent 4 }}

0 commit comments

Comments
 (0)