-
Notifications
You must be signed in to change notification settings - Fork 30
K8SPS-335: Add gr-upgrade and async-upgrade tests #918
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
egegunes
wants to merge
10
commits into
main
Choose a base branch
from
K8SPS-335
base: main
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.
+692
−41
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
8d42d0f
K8SPS-335: Add gr-upgrade and async-upgrade tests
egegunes 21ab3ec
Merge branch 'main' into K8SPS-335
hors 2a63cfd
fix cluster-wide
egegunes 858ab89
run shfmt
egegunes 711bd42
ensure no rollout
egegunes cf2ea81
Merge branch 'main' into K8SPS-335
egegunes e7773f6
fix operator upgrade on cluster-wide
egegunes 14b92d7
run only upgrade tests
egegunes 05fdd76
Merge branch 'main' into K8SPS-335
hors 24aa4dc
Merge branch 'main' into K8SPS-335
hors 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 hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
@@ -1,34 +1,2 @@ | ||
version-service | ||
async-ignore-annotations | ||
auto-config | ||
config | ||
config-router | ||
demand-backup | ||
gr-demand-backup | ||
gr-demand-backup-haproxy | ||
gr-finalizer | ||
gr-haproxy | ||
gr-ignore-annotations | ||
gr-init-deploy | ||
gr-one-pod | ||
gr-recreate | ||
gr-scaling | ||
gr-scheduled-backup | ||
gr-security-context | ||
gr-self-healing | ||
gr-tls-cert-manager | ||
gr-users | ||
haproxy | ||
init-deploy | ||
limits | ||
monitoring | ||
one-pod | ||
operator-self-healing | ||
recreate | ||
scaling | ||
scheduled-backup | ||
service-per-pod | ||
sidecars | ||
smart-update | ||
tls-cert-manager | ||
users | ||
gr-upgrade | ||
async-upgrade |
This file contains hidden or 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 hidden or 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,26 @@ | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestAssert | ||
timeout: 120 | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: perconaservermysqls.ps.percona.com | ||
spec: | ||
group: ps.percona.com | ||
names: | ||
kind: PerconaServerMySQL | ||
listKind: PerconaServerMySQLList | ||
plural: perconaservermysqls | ||
shortNames: | ||
- ps | ||
singular: perconaservermysql | ||
scope: Namespaced | ||
--- | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestAssert | ||
metadata: | ||
name: check-operator-deploy-status | ||
timeout: 120 | ||
commands: | ||
- script: kubectl assert exist-enhanced deployment percona-server-mysql-operator -n ${OPERATOR_NS:-$NAMESPACE} --field-selector status.readyReplicas=1 |
This file contains hidden or 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,15 @@ | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
commands: | ||
- script: |- | ||
set -o errexit | ||
set -o xtrace | ||
|
||
source ../../functions | ||
init_temp_dir # do this only in the first TestStep | ||
|
||
git_tag="v$(latest_operator_version_in_vs)" | ||
deploy_operator_gh ${git_tag} | ||
deploy_non_tls_cluster_secrets | ||
deploy_tls_cluster_secrets | ||
deploy_client |
This file contains hidden or 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,58 @@ | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestAssert | ||
timeout: 420 | ||
--- | ||
kind: StatefulSet | ||
apiVersion: apps/v1 | ||
metadata: | ||
name: async-upgrade-mysql | ||
status: | ||
observedGeneration: 1 | ||
replicas: 3 | ||
readyReplicas: 3 | ||
currentReplicas: 3 | ||
updatedReplicas: 3 | ||
collisionCount: 0 | ||
--- | ||
kind: StatefulSet | ||
apiVersion: apps/v1 | ||
metadata: | ||
name: async-upgrade-haproxy | ||
status: | ||
observedGeneration: 1 | ||
replicas: 3 | ||
readyReplicas: 3 | ||
updatedReplicas: 3 | ||
--- | ||
kind: StatefulSet | ||
apiVersion: apps/v1 | ||
metadata: | ||
name: async-upgrade-orc | ||
status: | ||
observedGeneration: 1 | ||
replicas: 3 | ||
readyReplicas: 3 | ||
currentReplicas: 3 | ||
updatedReplicas: 3 | ||
collisionCount: 0 | ||
--- | ||
apiVersion: ps.percona.com/v1alpha1 | ||
kind: PerconaServerMySQL | ||
metadata: | ||
name: async-upgrade | ||
finalizers: | ||
- percona.com/delete-mysql-pods-in-order | ||
status: | ||
mysql: | ||
ready: 3 | ||
size: 3 | ||
state: ready | ||
haproxy: | ||
ready: 3 | ||
size: 3 | ||
state: ready | ||
orchestrator: | ||
ready: 3 | ||
size: 3 | ||
state: ready | ||
state: ready |
This file contains hidden or 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,22 @@ | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
commands: | ||
- script: |- | ||
set -o errexit | ||
set -o xtrace | ||
|
||
source ../../functions | ||
|
||
version=$(latest_operator_version_in_vs) | ||
init_image=$(get_operator_image) | ||
|
||
if [[ -z ${init_image} ]]; then | ||
echo "failed to get operator image" | ||
exit 1 | ||
fi | ||
|
||
get_cr_with_latest_versions_in_vs \ | ||
| yq eval "$(printf '.spec.initImage="%s"' "${init_image}")" - \ | ||
| yq eval "$(printf '.spec.crVersion="%s"' "${version}")" - \ | ||
| yq eval '.spec.mysql.clusterType="async"' - \ | ||
| kubectl -n "${NAMESPACE}" apply -f - |
This file contains hidden or 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,12 @@ | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
commands: | ||
- timeout: 120 | ||
script: |- | ||
set -o errexit | ||
set -o xtrace | ||
|
||
source ../../functions | ||
|
||
upgrade_operator_image ${IMAGE} | ||
wait_deployment percona-server-mysql-operator ${OPERATOR_NS:-$NAMESPACE} |
Oops, something went wrong.
Oops, something went wrong.
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.
[shfmt] reported by reviewdog 🐶