Commit Graph

79 Commits

Author SHA1 Message Date
Ole Markus With 63f13322d5 Don't pass ctx and cluster everywhere 2020-09-23 08:30:24 +02:00
Ole Markus With 0ec71686b9 Refactor cloudinstancegroupmember in a more independent cloud instance representation
Apply suggestions from code review

Co-authored-by: John Gardiner Myers <jgmyers@proofpoint.com>
2020-08-30 21:37:03 +02:00
Ole Markus With ff6c04938d Add kops delete instance command
Add support for deleting instance by k8s node name

Add yes flag
2020-08-28 08:43:30 +02:00
Peter Rifel 4d9f0128a3
Upgrade to klog2
This splits up the kubernetes 1.19 PR to make it easier to keep up to date until we get it sorted out.
2020-08-16 20:56:48 -05:00
John Gardiner Myers cc2b647d06 Create separate field for disabling rolling updates 2020-06-19 22:19:26 -07:00
ZouYu 2fc52ec6be fix some go-lint warning
Signed-off-by: ZouYu <zouy.fnst@cn.fujitsu.com>
2020-06-09 08:52:50 +08:00
John Gardiner Myers 091893fd20 Simplify rolling update internal methods 2020-05-29 10:52:03 -07:00
John Gardiner Myers dd884a6a64
fix missing space
Co-authored-by: Peter Rifel <rifelpet@users.noreply.github.com>
2020-05-29 10:35:15 -07:00
John Gardiner Myers 7756be7fbc Try validating multiple times before updating instancegroup 2020-05-22 20:26:02 -07:00
John Gardiner Myers df7e0b18b6 Ignore already-deleted nodes during rolling update 2020-04-26 21:41:54 -07:00
Justin Santa Barbara ffb6cd61aa Rolling-update validation harmonization
This is a follow-on to #8868; I believe the intent of that was to
expose the option to do more (or fewer) retries.

We previously had a single retry to prevent flapping; this basically
unifies the previous behaviour with the idea of making it
configurable.

* validate-count=0 effectively turns off validation.

* validate-count=1 will do a single validation, without flapping
  detection.

* validate-count>=2 will require N succesful validations in a row,
waiting ValidateSuccessDuration in between.

A nice side-effect of this is that the tests now explicitly specify
ValidateCount=1 instead of setting ValidateSuccessDuration=0, which
had the side effect of doing the equivalent to ValidateCount=1.
2020-04-17 01:40:02 -04:00
Justin Santa Barbara 31bb16d4d1 Add context.Context to most signatures
The client-go signature for most methods adds a context.Context
object, and also makes Options mandatory.  Feed through a
context.Context through many of our methods (but use context.TODO to
stop it getting totally out of hand!)
2020-04-11 14:44:17 -04:00
Jesse Haka 11eaacd53e validationtimes -> validationcount 2020-04-08 13:55:29 +03:00
Jesse Haka e1e79790ef validate cluster n times in rolling update 2020-04-08 13:55:24 +03:00
John Gardiner Myers 6844eef4ca Switch to the k/k implementation of drain.Helper 2020-04-05 10:22:49 -07:00
John Gardiner Myers 03eb8246c7 Refactor/simplify rolling update 2020-03-09 11:05:58 -07:00
John Gardiner Myers ed73726195 Address review comments 2020-02-28 21:05:43 -08:00
John Gardiner Myers ebfcf5d909 Implement recovery from previous failed surge rolling updates 2020-01-27 20:45:16 -08:00
John Gardiner Myers cee662d521 Implement MaxSurge happy path 2020-01-27 20:45:16 -08:00
John Gardiner Myers d56ad41334 Address review comments 2020-01-26 14:18:51 -08:00
John Gardiner Myers 10d6416b8e Allow MaxConcurrency for masters and bastions 2020-01-11 18:50:35 -08:00
John Gardiner Myers 0c3651c9c8 Implement MaxUnavailable 2020-01-05 12:09:55 -08:00
John Gardiner Myers 0952374027 Extract maybeValidate 2020-01-05 12:09:55 -08:00
John Gardiner Myers 91f4920537 Extract drainTerminateAndWait() 2020-01-05 12:09:55 -08:00
Kubernetes Prow Robot 121d9f461f
Merge pull request #7909 from johngmyers/remove-drain-feature-flag
Remove DrainAndValidateRollingUpdate feature flag
2020-01-05 11:15:40 -08:00
Kubernetes Prow Robot a22af4fa80
Merge pull request #8239 from johngmyers/simplify-rolling
Simplify code for rolling updates of nodes
2020-01-04 13:13:40 -08:00
John Gardiner Myers cba59afac4 Change taint key per review comment 2020-01-03 10:07:21 -08:00
John Gardiner Myers cd499f6f09 Remove unused code 2019-12-31 14:33:05 -08:00
John Gardiner Myers 97ad2c3b54 Taint nodes needing update 2019-12-30 16:06:00 -08:00
John Gardiner Myers 1d3d5c1d2f pkg/instancegroups - fix static check 2019-12-22 20:56:27 -08:00
John Gardiner Myers 2850826a52 Improve logging of cluster revalidation 2019-12-13 13:48:47 -08:00
Jesse Haka 44183aef7f validate cluster twice 2019-12-12 08:48:15 +02:00
John Gardiner Myers 1239c05e71 Validate after updating bastion 2019-12-09 18:45:51 -08:00
John Gardiner Myers 2e36124f77 Expose ValidateTickDuration for use by unit tests 2019-12-09 18:43:20 -08:00
John Gardiner Myers 4eccd3d53f Remove DrainAndValidateRollingUpdate feature flag 2019-12-05 22:50:04 -08:00
Justin Santa Barbara 5a0b199119
Merge branch 'master' into fix-roll-validation 2019-11-07 20:54:10 -05:00
John Gardiner Myers 5b8bed77fa Don't update first node in instancegroup if cluster fails validation 2019-11-04 16:26:39 -08:00
John Gardiner Myers 63e0c5e726 Add tests for cluster validation during rolling update 2019-11-04 16:26:39 -08:00
feifei.zhang@huawei.com 4b49412105 fix golint failures 2019-10-31 20:22:37 +08:00
yuxiaobo 0bd700781e Correct word misspelling 2019-09-29 22:23:07 +08:00
Justin SB 728e582360
Fill out kops controller functionality
k8s 1.16 requires that we move label setting away from the kubelet, to
a central controller.  kops-controller is that controller.
2019-09-25 12:04:34 -04:00
mikesplain 9e55b8230a Update copyright notices
Also cleans some white spaces
2019-09-09 14:47:51 -04:00
Justin SB 8b02cf14ca
DeleteLocalData on drain
This restores the kops behaviour before the refactor, where pods using
emptyDir would not block the rolling update.
2019-09-03 07:07:44 -07:00
Kubernetes Prow Robot a957428446
Merge pull request #7470 from justinsb/update_to_k115
Update to kubernetes 1.15
2019-08-27 10:24:43 -07:00
Justin SB b1f8f84306
Code changes for 1.15 2019-08-25 16:00:39 -04:00
Jesse Haka b581e7a305 print all failures 2019-08-23 16:06:37 +03:00
Justin SB 3e33ac7682
Change code from glog to klog
We don't call klog.InitFlags yet, because that will cause a flag
redefinition error until we get everyone to stop using glog.  That
will happen when we update to k8s 1.13.
2019-05-06 12:54:51 -04:00
Justin SB 78ebe93f9f
Update kubernetes dependencies to 1.13.5
Notable changes:

* openapi-gen moved to k8s.io/kube-openapi/cmd/openapi-gen
* templates moved to k8s.io/kubernetes/pkg/kubectl/util/templates
2019-05-06 09:58:37 -04:00
Rodrigo Menezes 2b9243ff8c Getting things ready for when we are ready for 1.12 2018-12-04 18:50:17 -08:00
mikeweiwei 027d324aaf If don't use formatted output,fix logging calls 2018-10-10 19:19:09 +08:00