Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 11 additions & 0 deletions tests/templates/kuttl/cluster-operation/90-shutdown-kafka.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
# Scale Kafka down before kuttl deletes the namespace.
# Without this, ZooKeeper and Kafka are terminated simultaneously,
# and Kafka hangs on controlled-shutdown ZooKeeper timeouts.
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- script: |
kubectl patch kafkacluster test-kafka -n $NAMESPACE --type merge -p '{"spec":{"brokers":{"roleGroups":{"default":{"replicas":0}}}}}'
- script: |
kubectl wait --for=delete pod -l app.kubernetes.io/instance=test-kafka -n $NAMESPACE --timeout=300s
12 changes: 12 additions & 0 deletions tests/templates/kuttl/delete-rolegroup/90-shutdown-kafka.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
# Scale Kafka down before kuttl deletes the namespace.
# Without this, ZooKeeper and Kafka are terminated simultaneously,
# and Kafka hangs on controlled-shutdown ZooKeeper timeouts.
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
# Note: By the time this script runs, the secondary RoleGroup has already been deleted, therefore we don't scale it down.
- script: |
kubectl patch kafkacluster test-kafka -n $NAMESPACE --type merge -p '{"spec":{"brokers":{"roleGroups":{"default":{"replicas":0}}}}}'
- script: |
kubectl wait --for=delete pod -l app.kubernetes.io/instance=test-kafka -n $NAMESPACE --timeout=300s
11 changes: 11 additions & 0 deletions tests/templates/kuttl/kerberos/90-shutdown-kafka.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
# Scale Kafka down before kuttl deletes the namespace.
# Without this, ZooKeeper and Kafka are terminated simultaneously,
# and Kafka hangs on controlled-shutdown ZooKeeper timeouts.
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- script: |
kubectl patch kafkacluster test-kafka -n $NAMESPACE --type merge -p '{"spec":{"brokers":{"roleGroups":{"default":{"replicas":0}}}}}'
- script: |
kubectl wait --for=delete pod -l app.kubernetes.io/instance=test-kafka -n $NAMESPACE --timeout=300s
11 changes: 11 additions & 0 deletions tests/templates/kuttl/logging/90-shutdown-kafka.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
# Scale Kafka down before kuttl deletes the namespace.
# Without this, ZooKeeper and Kafka are terminated simultaneously,
# and Kafka hangs on controlled-shutdown ZooKeeper timeouts.
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- script: |
kubectl patch kafkacluster test-kafka -n $NAMESPACE --type merge -p '{"spec":{"brokers":{"roleGroups":{"automatic-log-config":{"replicas":0}, "custom-log-config":{"replicas":0}}}}}'
- script: |
kubectl wait --for=delete pod -l app.kubernetes.io/instance=test-kafka -n $NAMESPACE --timeout=300s
11 changes: 11 additions & 0 deletions tests/templates/kuttl/opa/90-shutdown-kafka.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
# Scale Kafka down before kuttl deletes the namespace.
# Without this, ZooKeeper and Kafka are terminated simultaneously,
# and Kafka hangs on controlled-shutdown ZooKeeper timeouts.
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- script: |
kubectl patch kafkacluster test-kafka -n $NAMESPACE --type merge -p '{"spec":{"brokers":{"roleGroups":{"default":{"replicas":0}}}}}'
- script: |
kubectl wait --for=delete pod -l app.kubernetes.io/instance=test-kafka -n $NAMESPACE --timeout=300s
11 changes: 11 additions & 0 deletions tests/templates/kuttl/smoke/90-shutdown-kafka.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
# Scale Kafka down before kuttl deletes the namespace.
# Without this, ZooKeeper and Kafka are terminated simultaneously,
# and Kafka hangs on controlled-shutdown ZooKeeper timeouts.
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- script: |
kubectl patch kafkacluster test-kafka -n $NAMESPACE --type merge -p '{"spec":{"brokers":{"roleGroups":{"default":{"replicas":0}}}}}'
- script: |
kubectl wait --for=delete pod -l app.kubernetes.io/instance=test-kafka -n $NAMESPACE --timeout=300s
11 changes: 11 additions & 0 deletions tests/templates/kuttl/tls/90-shutdown-kafka.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
# Scale Kafka down before kuttl deletes the namespace.
# Without this, ZooKeeper and Kafka are terminated simultaneously,
# and Kafka hangs on controlled-shutdown ZooKeeper timeouts.
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- script: |
kubectl patch kafkacluster test-kafka -n $NAMESPACE --type merge -p '{"spec":{"brokers":{"roleGroups":{"default":{"replicas":0}}}}}'
- script: |
kubectl wait --for=delete pod -l app.kubernetes.io/instance=test-kafka -n $NAMESPACE --timeout=300s
Loading