Commit Graph

159 Commits

Author SHA1 Message Date
Mike Danese
c58e69ec79 automated refactor 2020-03-05 14:59:46 -08:00
taesun_lee
79680b5d9b Fix pkg/controller typos in some error messages, comments etc
- applied review results by LuisSanchez
- Co-Authored-By: Luis Sanchez <sanchezl@redhat.com>

genernal -> general
iniital -> initial
initalObjects -> initialObjects
intentionaly -> intentionally
inforer -> informer
anotother -> another
triger -> trigger
mutli -> multi
Verifyies -> Verifies
valume -> volume
unexpect -> unexpected
unfulfiled -> unfulfilled
implenets -> implements
assignement -> assignment
expectataions -> expectations
nexpected -> unexpected
boundSatsified -> boundSatisfied
externel -> external
calcuates -> calculates
workes -> workers
unitialized -> uninitialized
afater -> after
Espected -> Expected
nodeMontiorGracePeriod -> NodeMonitorGracePeriod
estimateGrracefulTermination -> estimateGracefulTermination
secondrary -> secondary
ShouldRunDaemonPodOnUnscheduableNode -> ShouldRunDaemonPodOnUnschedulableNode
rrror -> error
expectatitons -> expectations
foud -> found
epackage -> package
succesfulJobs -> successfulJobs
namesapce -> namespace
ConfigMapResynce -> ConfigMapResync
2020-02-27 00:15:33 +09: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
Yecheng Fu
bb2b50f3db Garbage collector should orphan ControllerRevisions too
Signed-off-by: Yecheng Fu <fuyecheng@pingcap.com>
2020-02-10 20:58:28 +08:00
Mike Danese
25651408ae generated: run refactor 2020-02-08 12:30:21 -05:00
Mike Danese
3aa59f7f30 generated: run refactor 2020-02-07 18:16:47 -08:00
likakuli
10864d3366 fix a bug that orphan revision cannot be adopted and sts cannot be synced 2020-01-08 17:56:41 +08:00
yuxiaobo
81e9f21f83 Correct spelling mistakes
Signed-off-by: yuxiaobo <yuxiaobogo@163.com>
2019-11-06 20:25:19 +08:00
wojtekt
7b6bcdf780 Autogenerated code 2019-10-24 20:21:00 +02:00
qingsenLi
d3a0c149a3 Remove some unused codes in stateful_set_utils.go 2019-09-21 22:24:48 +08:00
hwdef
4e7ef9ad36 delete unused var 2019-09-19 18:04:13 +08:00
Yassine TIJANI
7e4c3096fe move WaitForCacheSync to the sharedInformer package
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>
2019-08-22 16:13:41 +01:00
YueHonghui
d29f194474 add flag concurrent-statefulset-syncs to kube-controller-manager (#79169)
* add flag `concurrent-statefulset-syncs` to set number of concurrent workers for statefulset controller

* change default value of ConcurrentStatefulSetSyncs from 1 to 5

* 1. fix doc comment of statefulset config types.go
2. add missing deps k8s.io/kubernetes/pkg/controller/statefulset/config

* add missing dep k8s.io/kubernetes/pkg/controller/statefulset/config/v1alpha1

* updated bazel BUILD files

* update kube-controller-manager options testcase

* fix codegen

* fix golint error

* fix testcase
2019-07-31 22:36:14 -07:00
David Xia
fabfd950b1
cleanup: fix some log and error capitalizations
Part of https://github.com/kubernetes/kubernetes/issues/15863
2019-07-20 18:26:16 -04:00
Kubernetes Prow Robot
12f36302f9
Merge pull request #78361 from tedyu/stateful-get-rev
Break out of loop when currentRevision is found in defaultStatefulSetControl#getStatefulSetRevisions
2019-07-15 12:37:23 -07:00
Kubernetes Prow Robot
dc8829df5c
Merge pull request #75922 from humblec/stateful_set
Remove unwanted `else` block from statefulset controller.
2019-07-10 00:12:25 -07:00
kanchairen
bf421ae560 Fix a bug that StatefulSet applies the revision incorrectly 2019-06-30 09:49:00 +08:00
Ted Yu
7a2edb780a Break out of loop when currentRevision is found in defaultStatefulSetControl#getStatefulSetRevisions 2019-05-26 09:22:58 -07:00
Kenneth Owens
f81fc8ae1b Updates OWNERS files and OWNERS_ALIASES for SIG Apps to make reviewers
and approvers more clear
2019-04-16 11:35:21 -07:00
Kubernetes Prow Robot
529cd2c674
Merge pull request #74649 from draveness/patch-1
fix: typo in stateful_set_control
2019-04-04 17:47:31 -07:00
Kubernetes Prow Robot
eee8af93ba
Merge pull request #75622 from jonsabo/ssetresync
Remove resync period for sset controller
2019-04-04 00:41:02 -07:00
Humble Chirammal
48e1838f6c Remove unwanted else block from statefulset controller.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2019-04-01 16:24:55 +05:30
Jon Sabo
445d711611 Remove resync period 2019-03-22 16:40:40 -05:00
caiweidong
eb8dd093fe add UT 2019-03-19 20:36:38 +08:00
caiweidong
751007c17d Do not replace labels of pvc with those of StastefulSet 2019-03-12 11:13:57 +08:00
Draven
df190a0197
fix: typo in stateful_set_control 2019-02-27 18:16:50 +08:00
Kubernetes Prow Robot
808f2cf0ef
Merge pull request #72525 from justinsb/owners_should_not_be_executable
Remove executable file permission from OWNERS files
2019-02-14 23:55:45 -08:00
Roy Lenferink
b43c04452f Updated OWNERS files to include link to docs 2019-02-04 22:33:12 +01:00
Justin SB
dd19b923b7
Remove executable file permission from OWNERS files 2019-01-11 16:42:59 -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
AdamDang
dc2c003457 Correct some errors in returned message
Update stateful_set.go

Update azure_vmss.go

Update azure_vmss.go

Update disruption.go

Update stateful_set.go
2018-10-30 09:53:02 +08:00
Davanum Srinivas
9b43d97cd4
Add Labels to various OWNERS files
Will reduce the burden of manually adding labels. Information pulled
from:
https://github.com/kubernetes/community/blob/master/sigs.yaml

Change-Id: I17e661e37719f0bccf63e41347b628269cef7c8b
2018-08-21 13:59:08 -04:00
Pingan2017
38c6dcf519 fix typo: scale dowm-> scale down 2018-08-01 10:39:59 +08:00
Kubernetes Submit Queue
162655f42f
Merge pull request #62943 from faraazkhan/master
Automatic merge from submit-queue (batch tested with PRs 66304, 62943). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

set updated replicas

**What this PR does / why we need it**: 
Sets the `.status.updatedReplicas` field for stateful sets when they are being created. This behavior is consistent with how this field is handled in the deployments controller and also allows for `kubectl rollout status` to work when stateful sets are being created. 


**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #52653

**Special notes for your reviewer**:

**Release note**:

```release-note
fix rollout status for statefulsets
```
2018-07-17 17:52:59 -07:00
Jeff Grafton
23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
Minhan Xia
cb9ac04777 fix unit tests using Patch in fake client 2018-05-30 11:33:55 -07: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
Wang Guoliang
89669283fe should use time.Since instead of time.Now().Sub 2018-04-10 12:05:51 +08:00
Mikhail Mazurskiy
468655b76a
Use typed events client directly 2018-04-01 18:57:29 +10:00
Marek Grabowski
b27157a271 Increase loging verbosity for deleting stateful set pods 2018-03-01 09:33:18 +00:00
Kubernetes Submit Queue
249ecab74e
Merge pull request #59365 from ayushpateria/patch-sts
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix StatefulSet set-based selector bug

**What this PR does / why we need it**:
ControllerRevisions were using selectors as the labels, in case of set-based selectors, the helper function to convert selectors to labels would break. This PR uses pod labels for ControllerRevision labels instead of selectors.
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #59266

**Special notes for your reviewer**:
I'm trying to learn Kubernetes codebase and would be happy to make changes if anything is off.
**Release note**:

```release-note
Fix StatefulSet to work with set-based selectors.
```
2018-02-27 10:21:00 -08:00
Ayush Pateria
a269491f18 Modify tests 2018-02-22 19:19:06 +05:30
Ayush Pateria
1beed0f4c6 Remove unused code and modify tests to include set based selector 2018-02-20 03:23:51 +05:30
Jeff Grafton
ef56a8d6bb Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
Ayush Pateria
4f84a1cb7e Pass pod labels to controller revision 2018-02-09 14:54:18 +05:30
Kubernetes Submit Queue
c21173d0ea
Merge pull request #55792 from dhilipkumars/statefulset-appsv1
Automatic merge from submit-queue (batch tested with PRs 55792, 58342). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Promote Statefulset controller and its e2e tests to use apps/v1

**What this PR does / why we need it**: 
Promotes the statefulset controller to use to use the latest apps group [apps/v1](https://github.com/kubernetes/kubernetes/pull/53679)


**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes # https://github.com/kubernetes/kubernetes/issues/55714

**Special notes for your reviewer**:

* Listerexpansion for v1 `k8s.io/client-go/listers/apps/v1`  (was recently done for v1beta2)

* `v1beta2` && `v1` had `ObservedGeneration` as `int64` where as `v1beta1` and rest of the code (including conversion) is expecting `ObservedGeneration` to be  `*int64`

```
type StatefulSetStatus struct {
	// observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the
	// StatefulSet's generation, which is updated on mutation by the API Server.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
```

* for kubectl's `rollback` and `history` commands a couple functions have been duplicated to allow us to use `v1` version instead of `v1beta1` for statefulsets, while the older functions are still used by other controllers.  

We should be able to remove these duplicates once all the controllers are moved. 

If this aligns with the plan then i could move other controllers too. 

cc: @kow3ns 

**Release note**:

```release-note
NONE
```
2018-01-26 06:54:33 -08:00
dhilipkumars
aba725a391 Promote SS to apps/v1 2018-01-18 13:48:52 +05:30
Kubernetes Submit Queue
416a38e552
Merge pull request #56994 from zouyee/patch-14
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Comment typo fix in StatefulSet controller

**What this PR does / why we need it**:

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```
NONE
```
2018-01-12 17:17:56 -08:00
Kubernetes Submit Queue
87e2db8089
Merge pull request #55316 from tnozicka/statefulset-report-event-on-pod-recreate
Automatic merge from submit-queue (batch tested with PRs 55316, 57934). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Make StatefulSet report an event when recreating failed pod

When StatefulSet finds any of its pods in phase Failed it will delete it and create it again. While doing so it will emit delete+create event which is really confusing for the user as he has no idea what's happening.

Fixes https://github.com/kubernetes/kubernetes/issues/58082
2018-01-10 06:31:58 -08:00