Commit Graph

122 Commits (52603a78abf958c2b3f4b045a21b880dd7606033)

Author SHA1 Message Date
Minhan Xia cb9ac04777 fix unit tests using Patch in fake client 2018-05-30 11:33:55 -07: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
Jeff Grafton efee0704c6 Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
zoues 9a47249180
typo 2017-12-10 11:11:37 +08:00
Tomas Nozicka ba6ed642a1 Wait for controllerrevision informer to sync on statefulset controller startup 2017-11-24 22:02:28 +01:00
Kenneth Owens 1ce4ef8229 Adds the statefulset.kubernetes.io/pod-name label allowing users to
attach a Service to an individual Pod.
2017-11-20 09:13:07 -08:00
Tomas Nozicka f6af1904cd Make StatefulSet report an event when recreating failed pod 2017-11-09 12:23:37 +01:00
Dr. Stefan Schimanski bec617f3cc Update generated files 2017-11-09 12:14:08 +01:00
Dr. Stefan Schimanski 012b085ac8 pkg/apis/core: mechanical import fixes in dependencies 2017-11-09 12:14:08 +01:00
Kevin 4c8539cece use core client with explicit version globally 2017-10-27 15:48:32 +08:00
Kubernetes Submit Queue 1d8f1e268f Merge pull request #47699 from supereagle/fix-typos
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 typos: remove duplicated word in comments

**What this PR does / why we need it**: Remove the duplicated word `the` in comments

**Which issue this PR fixes** : fixes #

**Special notes for your reviewer**:

```release-note
NONE
```
2017-10-17 02:35:52 -07:00
Jeff Grafton aee5f457db update BUILD files 2017-10-15 18:18:13 -07:00
Kubernetes Submit Queue 2aa0704c0e Merge pull request #51754 from huzhengchuan/fix/event_name
Automatic merge from submit-queue (batch tested with PRs 51754, 53261, 53450). 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>.

Rename the name of event source in controller-manager

**What this PR does / why we need it**: Make the event source more obvious 

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

**Special notes for your reviewer**:

**Release note**:

```
NONE
```
2017-10-04 13:13:15 -07:00
Michail Kargakis a702742d31
Remove kargakis from OWNERS, add tnozicka
Signed-off-by: Michail Kargakis <mkargaki@redhat.com>
2017-09-19 11:05:23 +02:00
supereagle 87c29a08e1 fix typos: remove duplicated word in comments 2017-09-16 14:38:10 +08:00
zhengchuan hu 2b8891a59f rename the name of eventsource in controller-manager 2017-09-04 23:30:59 +08: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
Kubernetes Submit Queue 57ab7c6a64 Merge pull request #51062 from alrs/fix-statefulset-test-swallowed-errors
Automatic merge from submit-queue (batch tested with PRs 50980, 46902, 51051, 51062, 51020)

Fix swallowed errors in statefulset tests

**What this PR does / why we need it**: Fixes errors that were being swallowed in the tests of the statefulset package.

```release-note NONE
```
2017-08-22 23:14:05 -07:00
Lars Lehtonen 9f8d57a2d4
Fix swallowed errors in statefulset tests 2017-08-21 17:12:36 -07:00
Kenneth Owens a6473d82dc StatefulSet controller no longer attempts to mutate v1.PodSpec.Hostname or v1.PodSpec.Subdomain 2017-08-21 13:08:31 -07:00
Kubernetes Submit Queue b59ad9cbff Merge pull request #50146 from gmarek/deepcopyinto
Automatic merge from submit-queue (batch tested with PRs 46512, 50146)

Make metav1.(Micro)?Time functions take pointers

Is there any reason for those functions not to be on pointers?
2017-08-19 11:28:15 -07:00
Yinan Li 46c6aea1cf Use CollisionCount for collision avoidance in StatefulSet controller 2017-08-18 06:49:02 -07:00
Kubernetes Submit Queue f0066597ca Merge pull request #50220 from zhangxiaoyu-zidif/delete-statefulset-test-redundant-sort
Automatic merge from submit-queue (batch tested with PRs 50536, 50809, 50220, 50399, 50176)

Refactor statefulset test with sets.String

**What this PR does / why we need it**:
Delete redundant sort. These string slices only own one element.
There is no necessary to sort them.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-08-17 18:12:06 -07:00
gmarek 0504cfbc25 Make metav1.(Micro)?Time functions take pointers 2017-08-17 11:24:28 +02:00
zhangxiaoyu-zidif 3393cf4718 fix-review 2017-08-17 06:00:02 +08:00
jianglingxia 2d132ed61a update it 2017-08-16 11:49:52 +08:00
Kubernetes Submit Queue a7c69bd5fe Merge pull request #50219 from zhangxiaoyu-zidif/fix-statefulset-test-err-print
Automatic merge from submit-queue

Fix error message of statefulset test

**What this PR does / why we need it**:
Fix error message of statefulset test
It should be 0 replocas in the error message.
And fix typo from Falied to Failed

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-08-15 17:00:01 -07:00
ymqytw 7500b55ce4 move retry to client-go 2017-08-14 14:16:26 -07:00
zhangxiaoyu-zidif db2e7cd69a fix-review 2017-08-12 13:31:08 +08:00
Jeff Grafton a7f49c906d Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
Jeff Grafton 33276f06be Use buildozer to remove deprecated automanaged tags 2017-08-11 09:31:50 -07:00
Kubernetes Submit Queue 3e8a25e818 Merge pull request #50008 from atlassian/meta-controller-ref
Automatic merge from submit-queue

Migrate to controller references helpers in meta/v1

**What this PR does / why we need it**:
This is a follow up for #48319 that migrates all method usages to new methods in meta/v1.

**Special notes for your reviewer**:
Looking at each commit individually might be easier.

**Release note**:
```release-note
NONE
```
/sig api-machinery
/kind cleanup
2017-08-10 17:07:30 -07:00
Yinan Li 89fd3b0ebd Copy annotations from StatefulSet to ControllerRevisions it owns 2017-08-07 14:50:05 -07:00
Mikhail Mazurskiy 042b5642b9
Migrate to NewControllerRef from meta/v1 package 2017-08-06 22:43:46 +10:00
Mikhail Mazurskiy b28a83a4cf
Migrate to GetControllerOf from meta/v1 package 2017-08-06 22:41:58 +10:00
Eric Paris 5e22e149c5 Fix usage a make(struct, len()) followed by append()
A couple of places in the code we allocate with make() but then use
append(), instead of copy() or direct assignment. This results in a
slice with len() zero elements at the front followed by the expected
data. The correct form for such usage is `make(struct, 0, len())`.

I found these by running:
```
$ git grep -EI -A7 'make\([^,]*, len\(' | grep 'append(' -B7 | grep -v vendor
```
And then manually looking through the results. I'm sure something better
could exist.
2017-07-31 14:43:29 -04:00
Kubernetes Submit Queue 9350afd772 Merge pull request #48976 from supereagle/cleanup-api-package
Automatic merge from submit-queue (batch tested with PRs 48976, 49474, 40050, 49426, 49430)

Remove duplicated import and wrong alias name of api package

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

**Which issue this PR fixes**: fixes #48975

**Special notes for your reviewer**:
/assign @caesarxuchao

**Release note**:
```release-note
NONE
```
2017-07-25 12:14:38 -07:00
Kubernetes Submit Queue 144a4c2b74 Merge pull request #49358 from jianglingxia/jlx72113
Automatic merge from submit-queue

[trival] fix typo

**What this PR does / why we need it**:
some file word spell error that amend correct
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
2017-07-24 21:26:54 -07:00