Skip to content

Commit

Permalink
pause-upgrade stability test (#521)
Browse files Browse the repository at this point in the history
  • Loading branch information
shuijing198799 authored and weekface committed May 27, 2019
1 parent 5f28fba commit 375304b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
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))
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

0 comments on commit 375304b

Please sign in to comment.