Skip to content
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

pause-upgrade stability test #521

Merged
merged 4 commits into from
May 27, 2019
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
20 changes: 10 additions & 10 deletions tests/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,15 @@ func (oa *operatorActions) DeployOperator(info *OperatorConfig) error {
return fmt.Errorf("failed to deploy operator: %v, %s", err, string(res))
}

// delete statefulset update webhook and configuration
cmd = fmt.Sprintf("kubectl delete -f %s/webhook.yaml", oa.manifestPath(info.Tag))
Copy link
Contributor

Choose a reason for hiding this comment

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

why move the cleaner to DeployOperator?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

manifests dir will only exist after checkouttag in stability test

glog.Info(cmd)

res, err = exec.Command("/bin/sh", "-c", cmd).CombinedOutput()
if err != nil && !notFound(string(res)) {
return fmt.Errorf("failed to delete statefulset webhook and configuration : %v, %s", err, string(res))
}

// create cert and secret for webhook
cmd = fmt.Sprintf("%s/create-cert.sh", oa.manifestPath(info.Tag))
glog.Info(cmd)
Expand Down Expand Up @@ -420,16 +429,7 @@ func (oa *operatorActions) CleanOperator(info *OperatorConfig) error {
return err
}

// delete statefulset update webhook and configuration
cmd := fmt.Sprintf("kubectl delete -f %s/webhook.yaml", oa.manifestPath(info.Tag))
glog.Info(cmd)

res, err := exec.Command("/bin/sh", "-c", cmd).CombinedOutput()
if err != nil && !notFound(string(res)) {
return fmt.Errorf("failed to delete statefulset webhook and configuration : %v, %s", err, string(res))
}

res, err = exec.Command("helm", "del", "--purge", info.ReleaseName).CombinedOutput()
res, err := exec.Command("helm", "del", "--purge", info.ReleaseName).CombinedOutput()

if err == nil || !releaseIsNotFound(err) {
return nil
Expand Down
2 changes: 1 addition & 1 deletion tests/images/stability-test/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM alpine:3.5
ENV KUBECTL_VERSION=v1.12.2
ENV HELM_VERSION=v2.9.1

RUN apk update && apk add --no-cache ca-certificates curl git
RUN apk update && apk add --no-cache ca-certificates curl git openssl bash
RUN curl https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl \
-o /usr/local/bin/kubectl && \
chmod +x /usr/local/bin/kubectl && \
Expand Down