This repository has been archived by the owner on Oct 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Add upgrade test in pre checks #170
Open
ANeumann82
wants to merge
20
commits into
master
Choose a base branch
from
an/add-upgrade-test
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
21b7b34
Add upgrade test
ANeumann82 57e73c4
Add upgrade test
ANeumann82 4497e68
Add upgrade test
ANeumann82 417ffe4
Fixed bug in upgrade test
ANeumann82 4a737af
Another fix for new test
ANeumann82 c86769d
Use KUDO 0.17.3 with fix for upgrades
ANeumann82 cef5655
Use KUTTL 0.8.0
ANeumann82 b53762c
Delete old kind cluster if one exists
ANeumann82 c5656a8
Use KUDO 0.17.3
ANeumann82 9ca6d7a
Update test-tools
ANeumann82 3ae2d0d
Try upgrade test with fixed version and no params.yaml
ANeumann82 6ff8a1b
Doc update
ANeumann82 a66787b
Restore upgrade test, add more doc to backup test
ANeumann82 38943a2
Print backup pod logs after backup plan
ANeumann82 d3da81c
Try fixing backup image
ANeumann82 3c151d8
Fix image in template, duh
ANeumann82 85478ff
Add log for repair job in sanity test
ANeumann82 5324c56
Try running repair on first pod in sanity test
ANeumann82 2008a64
More debug output for sanity test
ANeumann82 04fa896
Merge branch 'master' into an/add-upgrade-test
ANeumann82 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: kudo.dev/v1alpha1 | ||
kind: TestSuite | ||
manifestDirs: | ||
- ./manifests/ | ||
commands: | ||
- command: ./bin/kubectl-kudo init --unsafe-self-signed-webhook-ca --wait | ||
- command: ./bin/kubectl create ns cassandra-upgrade-test | ||
- command: ./bin/kubectl-kudo install -n cassandra-upgrade-test --skip-instance ../operator/ | ||
testDirs: | ||
- ./suites/upgrade | ||
startKIND: true | ||
kindConfig: ./suites/upgrade/kind-config.yaml | ||
{{- if not .IMAGE_DISAMBIGUATION_SUFFIX }} | ||
kindContainers: | ||
- {{ .CASSANDRA_DOCKER_IMAGE }} | ||
{{- end }} | ||
timeout: 300 | ||
parallel: 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
kind: Cluster | ||
apiVersion: kind.sigs.k8s.io/v1alpha3 | ||
nodes: | ||
- role: control-plane | ||
image: kindest/node:v1.18.4@sha256:d8ff5fc405fc679dd3dd0cccc01543ba4942ed90823817d2e9e2c474a5343c4f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: kudo.dev/v1beta1 | ||
kind: Instance | ||
metadata: | ||
name: cassandra | ||
namespace: cassandra-upgrade-test | ||
status: | ||
planStatus: | ||
deploy: | ||
status: COMPLETE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: kudo.dev/v1beta1 | ||
kind: TestStep | ||
commands: | ||
- command: cat old-params.yaml | ||
- command: kubectl kudo install -n cassandra-upgrade-test --instance cassandra -P old-params.yaml cassandra --app-version 3.11.5 --operator-version 0.1.2 | ||
namespaced: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
apiVersion: kudo.dev/v1beta1 | ||
kind: Instance | ||
metadata: | ||
name: cassandra | ||
namespace: cassandra-upgrade-test | ||
status: | ||
planStatus: | ||
deploy: | ||
status: COMPLETE | ||
--- | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: cassandra-node | ||
namespace: cassandra-upgrade-test | ||
spec: | ||
template: | ||
spec: | ||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: "kudo-cassandra/cordon" | ||
operator: DoesNotExist | ||
status: | ||
readyReplicas: 1 | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: cassandra-topology-lock | ||
namespace: cassandra-upgrade-test | ||
data: | ||
last-updated-by: cassandra-node-0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: kudo.dev/v1beta1 | ||
kind: TestStep | ||
commands: | ||
- command: cat params.yaml | ||
- command: kubectl kudo upgrade -n cassandra-upgrade-test --instance cassandra -P params.yaml ../../../../operator/ | ||
namespaced: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
PROMETHEUS_EXPORTER_ENABLED: false | ||
NODE_COUNT: 1 | ||
NODE_CPU_MC: 200 | ||
NODE_MEM_MIB: 128 | ||
NODE_DISK_SIZE_GIB: 1 | ||
NODE_DOCKER_IMAGE_PULL_POLICY: IfNotPresent | ||
SERVICE_ACCOUNT_INSTALL: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
PROMETHEUS_EXPORTER_ENABLED: false | ||
NODE_COUNT: 1 | ||
NODE_CPU_MC: 200 | ||
NODE_MEM_MIB: 128 | ||
NODE_DISK_SIZE_GIB: 1 | ||
NODE_DOCKER_IMAGE: {{ .CASSANDRA_DOCKER_IMAGE }} | ||
NODE_DOCKER_IMAGE_PULL_POLICY: IfNotPresent | ||
SERVICE_ACCOUNT_INSTALL: true | ||
NUM_TOKENS: 256 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of hardcoding, we can use an env variable for Cassandra and its operator version.