Commit Graph

30 Commits

Author SHA1 Message Date
ravisantoshgudimetla
ceb1dbd2f1 statefulsets: MinReadySeconds implementation
https://github.com/kubernetes/kubernetes/pull/100842
introduced featuregate. This PR implements the logic
behind it.
2021-06-15 12:59:54 -04:00
Shintaro Murakami
acc970399d Remove redundant variable
The variable firstUnhealthyOrdinal is redundant because replicas and condemned are already sorted in ascending order.
2020-10-16 09:53:34 +09:00
Davanum Srinivas
442a69c3bd
switch over k/k to use klog v2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:27 -04:00
Nan Yu
89bb7d8454 Honor the RevisionHistoryLimit in StatefulSetSpec
The StatefulSet controller cleans up ControllerRevisions at the end of
the reconcile loop. If something goes wrong during reconcile, it bails
out without actually performing this step. This commit moves the cleanup
to a deferred function call to guarantee it will be executed.

Fixes issue: https://github.com/kubernetes/kubernetes/issues/85690
2020-02-18 10:42:38 -08:00
Ted Yu
7a2edb780a Break out of loop when currentRevision is found in defaultStatefulSetControl#getStatefulSetRevisions 2019-05-26 09:22:58 -07:00
Draven
df190a0197
fix: typo in stateful_set_control 2019-02-27 18:16:50 +08:00
Davanum Srinivas
954996e231
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
Pingan2017
38c6dcf519 fix typo: scale dowm-> scale down 2018-08-01 10:39:59 +08:00
Faraaz Khan
594e228a17 set updated replicas correctly in scale up, scale down scenarios as well 2018-04-25 20:46:17 -05:00
Faraaz Khan
beec45b4de set updated replicas 2018-04-25 20:46:17 -05:00
Marek Grabowski
b27157a271 Increase loging verbosity for deleting stateful set pods 2018-03-01 09:33:18 +00:00
dhilipkumars
aba725a391 Promote SS to apps/v1 2018-01-18 13:48:52 +05:30
Tomas Nozicka
f6af1904cd Make StatefulSet report an event when recreating failed pod 2017-11-09 12:23:37 +01:00
Dr. Stefan Schimanski
1d053c4f7c controllers: simplify deepcopy calls 2017-08-29 19:21:24 +02:00
crimsonfaith91
ebdbafd2c5 statefulSet kubectl rollout command 2017-08-24 16:43:03 -07:00
Yinan Li
46c6aea1cf Use CollisionCount for collision avoidance in StatefulSet controller 2017-08-18 06:49:02 -07:00
Chao Xu
60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu
cde4772928 run ./root-rewrite-all-other-apis.sh, then run make all, pkg/... compiles 2017-06-22 11:30:52 -07:00
Chao Xu
f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
Kenneth Owens
45eeaab715 Fixes a bug where RollingUpdateStrategy combined with Parallel pod management allows for more than one Pod to be unready during update. We want this behavior during turn up and turn down but not during update. Otherwise we risk violating reasonable disruption budgets. 2017-06-19 06:53:46 -07:00
Kenneth Owens
b1ce1ffc55 Removes PartitionStatefulSetStrategyType and Partition from UpdateStrategy and replaces them with a parameterized RollingUpdate strategy. 2017-06-12 10:06:09 -07:00
Kenneth Owens
1b55f57391 Implements StatefulSet update
Implements history utilities for ControllerRevision in the controller/history package
StatefulSetStatus now has additional fields for consistency with DaemonSet and Deployment
StatefulSetStatus.Replicas now represents the current number of createdPods and StatefulSetStatus.ReadyReplicas is the current number of ready Pods
2017-06-06 12:00:28 -07:00
Clayton Coleman
2861ae5eb9
Support burst in stateful set scale up and down
The alpha field podManagementPolicy defines how pods are created,
deleted, and replaced. The new `Parallel` policy will replace pods
as fast as possible, not waiting for the pod to be `Ready` or providing
an order. This allows for advanced clustered software to take advantage
of rapid changes in scale.
2017-05-21 01:14:26 -04:00
Chao Xu
3fa7b7824a easy changes 2017-04-27 09:41:53 -07:00
Kenneth Owens
7d22e64284 StatefulSet should not launch Pod i, if a Pod in the sequence [0,i) has its
DeletionTimestamp set. Fixes 44229.
Rename isTerminated to isTerminating
Adds a test case for at the unit level to prevent regression
2017-04-21 08:38:21 -07:00
Anthony Yeh
e4f67c8170 StatefulSet: Use ControllerRefManager to adopt/orphan. 2017-03-06 09:46:03 -08:00
Anthony Yeh
f269e78ebc StatefulSet: Don't touch Pods if DeletionTimestamp is set. 2017-03-06 09:46:03 -08:00
Michail Kargakis
dbab67aa32 controller: statefulsets respect observed generation 2017-03-02 19:43:06 +01:00
Andy Goldstein
f6a186b1e1 Switch statefulset controller to shared informers 2017-02-22 08:53:51 -05:00
Kenneth Owens
4d99b4d825 StatefulSet refactoring and semantics fix
1. pcb and pcb controller are removed and their functionality is
encapsulated in StatefulPodControlInterface.
2. IdentityMappers has been removed to clarify what properties of a Pod are
mutated by the controller. All mutations are performed in the
UpdateStatefulPod method of the StatefulPodControlInterface.
3. The statefulSetIterator and petQueue classes are removed. These classes
sorted Pods by CreationTimestamp. This is brittle and not resilient to
clock skew. The current control loop, which implements the same logic,
is in stateful_set_control.go. The Pods are now sorted and considered by
their ordinal indices, as is outlined in the documentation.
4. StatefulSetController now checks to see if the Pods matching a
StatefulSet's Selector also match the Name of the StatefulSet. This will
make the controller resilient to overlapping, and will be enhanced by
the addition of ControllerRefs.
2017-02-09 08:42:28 -08:00