Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

[elasticsearch] Add upgrade integration test #115

Merged
merged 2 commits into from
May 2, 2019
Merged

Conversation

Crazybus
Copy link
Contributor

@Crazybus Crazybus commented May 1, 2019

This test will install the latest chart release and then attempt to
upgrade to what is currently in git. This is designed to test two
things.

  1. That any changes do not happen to the statefulset that isn't allowed
    by Kubernetes. An example of this happening is bump es version, remove default storageClassName #94 where the change
    was not caught as part of pull request testing but was luckily caught
    during manual testing before the release.
  2. That a rolling upgrade actually works and results in a healthy
    cluster at the end. The test will always override the
    "terminationGracePeriod" to make sure that a rolling upgrade is always
    done even if there are no changes.

Kubectl and helm have also been updated to the latest releases. Oddly
enough there was a breaking change in the mock value used for release
names where it is now lowercased for some reason.

The kubectl upgraded was needed to get the handy timeout flag for the
kubectl rollout statuscommand to make sure that jobs don't hang
forever if something does actually go wrong. This command is needed
because the helm --wait flag only works apps/v1 resources. See
helm/helm#3173 for more information.

This test will install the latest chart release and then attempt to
upgrade to what is currently in git. This is designed to test two
things.

1. That any changes do not happen to the statefulset that isn't allowed
by Kubernetes. An example of this happening is #94 where the change
was not caught as part of pull request testing but was luckily caught
during manual testing before the release.
2. That a rolling upgrade actually works and results in a healthy
cluster at the end. The test will always override the
"terminationGracePeriod" to make sure that a rolling upgrade is always
done even if there are no changes.

Kubectl and helm have also been updated to the latest releases. Oddly
enough there was a breaking change in the mock value used for release
names where it is now lowercased for some reason.

The kubectl upgraded was needed to get the handy timeout flag for the
`kubectl rollout status`command to make sure that jobs don't hang
forever if something does actually go wrong. This command is needed
because the `helm --wait` flag only works `apps/v1` resources. See
helm/helm#3173 for more information.
@Crazybus
Copy link
Contributor Author

Crazybus commented May 1, 2019

CI failure when downloading kubectl despite having 5 retries. jenkins test this please

curl: (7) Failed to connect to 2607:f8b0:4001:c15::80: Cannot assign requested address
The command '/bin/sh -c curl --retry 5 -O https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl &&     mv kubectl /usr/local/bin/ &&     chmod a+x /usr/local/bin/kubectl &&     kubectl version --client' returned a non-zero code: 7
make: *** [build] Error 7

@Crazybus Crazybus requested a review from tylerjl May 1, 2019 19:09
@Crazybus
Copy link
Contributor Author

Crazybus commented May 1, 2019

Jenkins test this please

Copy link
Contributor

@tylerjl tylerjl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, makes sense to me 👍

@Crazybus Crazybus merged commit 7d2e152 into master May 2, 2019
@Crazybus Crazybus deleted the up_and_at_them branch May 2, 2019 08:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants