cloudfoundry-incubator / kubecf

Cloud Foundry on Kubernetes
Apache License 2.0
115 stars 62 forks source link

fix: add pre-check on scheduler statefulset before patch it #1676

Closed ShuangMen closed 3 years ago

ShuangMen commented 3 years ago

Description

add a pre-check before patch scheduler statefulset during kubecf upgrade.

Motivation and Context

https://github.com/cloudfoundry-incubator/kubecf/issues/1675

How Has This Been Tested?

This has been tested in kubecf v2.7.1, re-run helm upgrade, no incorrect patch to scheduler statefulsets.

$ k get pod -n kubecf
NAME                                     READY   STATUS      RESTARTS   AGE
api-z0-0                                 17/17   Running     16         3h49m
api-z1-0                                 17/17   Running     16         3h49m
auctioneer-0                             6/6     Running     1          3h50m
cc-worker-z0-0                           6/6     Running     0          3h49m
cc-worker-z1-0                           6/6     Running     0          3h50m
cf-apps-dns-59f9f659f5-c4z5g             1/1     Running     0          3h54m
coredns-quarks-6db68476bd-4pjvh          1/1     Running     0          4h42m
coredns-quarks-6db68476bd-cdqtm          1/1     Running     0          4h42m
database-0                               2/2     Running     0          3h53m
database-seeder-10807f69f53c6e0f-hpxmr   0/2     Completed   0          2d
database-seeder-7a19efc54ebbb714-pqtbg   0/2     Completed   0          48d
database-seeder-c400c55f793c774c-5ltcb   0/2     Completed   0          5h27m
database-seeder-d49344d80353dd73-gmljj   0/2     Completed   0          48d
database-seeder-e421e917deb27f22-mps4r   0/2     Completed   0          4h42m
diego-api-z0-0                           9/9     Running     2          3h49m
diego-api-z1-0                           9/9     Running     2          3h49m
diego-cell-z0-0                          12/12   Running     9          3h49m
diego-cell-z1-0                          12/12   Running     9          3h49m
doppler-z0-0                             6/6     Running     0          3h50m
doppler-z1-0                             6/6     Running     0          3h50m
ian-nsenter-10.240.64.24                 0/1     Completed   0          7d2h
log-api-z0-0                             9/9     Running     0          3h49m
log-api-z1-0                             9/9     Running     0          3h49m
log-cache-0                              10/10   Running     0          3h50m
nats-z0-0                                7/7     Running     0          3h50m
nats-z1-0                                7/7     Running     0          3h50m
router-z0-0                              7/7     Running     0          3h50m
router-z1-0                              7/7     Running     0          3h50m
scheduler-z0-0                           12/12   Running     1          13m
scheduler-z1-0                           12/12   Running     1          14m
singleton-blobstore-z0-0                 8/8     Running     0          3h50m
uaa-z0-0                                 8/8     Running     0          3h50m
uaa-z1-0                                 8/8     Running     0          3h50m

Screenshots (if appropriate):

Types of changes

Checklist:

ShuangMen commented 3 years ago

@jandubois, for script remove-deployment-updater-readiness.sh, I find another bug. Could you review the code change ?

jandubois commented 3 years ago

@ShuangMen Can you please rebase this PR on the latest master branch?

There is some issue with the recent go-buildpack bump, and the image for it seems to have gotten lost.

This has been reverted on master already, so rebasing this PR should allow it to pass through CI.

ShuangMen commented 3 years ago

I've rebased this PR.