Commit Graph

101 Commits (05c046f6d339dfbc986d5966ac3a28f0e29f2d81)

Author SHA1 Message Date
Anthony Yeh fa23729a6d kubectl: Use v1.5-compatible ownership logic when listing dependents.
In particular, we should not assume ControllerRefs are necessarily set.
However, we can still use ControllerRefs that do exist to avoid
interfering with controllers that do use it.
2017-03-16 12:28:38 -07:00
Anthony Yeh 725ec0cc5e kubectl: Check for Deployment overlap annotation in reaper.
This effectively reverts the client-side changes in
cec3899b96.
We have to maintain the old behavior on the client side to support
version skew when talking to old servers that set the annotation.

However, the new server-side behavior is still to NOT set the
annotation.
2017-03-16 12:28:28 -07:00
Anthony Yeh 8c4bcb38fb Deployment: Filter by ControllerRef in Reaper.
We don't want to delete ReplicaSets we don't own.
2017-03-06 15:12:08 -08:00
Anthony Yeh cec3899b96 Deployment: Remove Overlap and SelectorUpdate annotations.
These are not used anymore since ControllerRef now protects against
fighting between controllers with overlapping selectors.
2017-03-06 15:12:08 -08:00
Maciej Szulik c272630b1b Deployments under apps/v1beta1 with new defaults 2017-03-01 15:14:41 +01:00
Kubernetes Submit Queue 0bc16d8966 Merge pull request #40576 from nikhiljindal/kubectlcascDel
Automatic merge from submit-queue (batch tested with PRs 41994, 41969, 41997, 40952, 40576)

Updating kubectl to send delete requests with orphanDependents=false if --cascade is true

Ref https://github.com/kubernetes/kubernetes/issues/40568 #38897

Updating kubectl to always set `DeleteOptions.orphanDependents=false` when deleting a resource with `--cascade=true`.
This is primarily for federation where we want to use server side cascading deletion.

Impact on kubernetes: kubectl will do another GET after sending a DELETE and wait till the resource is actually deleted. This can have an impact if the resource has a finalizer. kubectl will wait till the finalizer is removed and then the resource is deleted, which is the right thing to do but a notable change in behavior.

cc @caesarxuchao @lavalamp @smarterclayton @kubernetes/sig-federation-pr-reviews @kubernetes/sig-cli-pr-reviews
2017-02-26 12:58:01 -08:00
nikhiljindal 9dc31c7f82 Updating reapers to set OrphanDependents=false 2017-02-23 12:04:13 -08:00
foxish 205c68351d Fix references to PetSet 2017-02-13 13:40:34 -08:00
Dr. Stefan Schimanski d7eb3b6870 pkg/util: move uuid and strategicpatch into k8s.io/apimachinery 2017-01-25 19:45:09 +01:00
Clayton Coleman be6d2933df
refactor: Move *Options references to metav1 2017-01-24 13:41:51 -05:00
Clayton Coleman 469df12038
refactor: move ListOptions references to metav1 2017-01-23 17:52:46 -05:00
Clayton Coleman 36acd90aba
Move APIs and core code to use metav1.ObjectMeta 2017-01-17 16:17:18 -05:00
deads2k 77b4d55982 mechanical 2017-01-16 09:35:12 -05:00
deads2k 6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Mayank Kumar 777977612b ReplicaSet has owner ref of the Deployment that created it 2016-12-22 16:45:50 -08:00
Maciej Szulik 9f064c57ce Remove extensions/v1beta1 Job 2016-12-17 00:07:24 +01:00
Wojciech Tyczynski e8d1cba875 GetOptions in client calls 2016-12-09 09:42:01 +01:00
Clayton Coleman 3454a8d52c
refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00
Clayton Coleman 5df8cc39c9
refactor: generated 2016-12-03 19:10:46 -05:00
Clayton Coleman 35a6bfbcee
generated: refactor 2016-11-23 22:30:47 -06:00
Chao Xu 96cd71d8f6 kubectl 2016-11-23 15:53:09 -08:00
Kubernetes Submit Queue 7f309f5fae Merge pull request #35471 from caesarxuchao/client-gen-multi-versions
Automatic merge from submit-queue

Let release_1_5 clientset include multiple versions of a group

Fix #35237 

This PR make versioned clientset to include multiple versions of a group. Currently only `batch` has `v1` and `v2alpha1`. The clientset interface now looks like:
```go
	BatchV2alpha1() v2alpha1batch.BatchV2alpha1Interface
	BatchV1() v1batch.BatchV1Interface
	// Deprecated: please explicitly pick a version if possible.
	Batch() v1batch.BatchV1Interface
```

Commit "update client-gen to say internalversion rather than unversioned" fixes https://github.com/kubernetes/kubernetes/issues/24481. 


cc @kubernetes/sig-api-machinery @soltysh @deads2k @nikhiljindal 



```release-note
release_1_5 clientset supports multiple versions of a group.
```
2016-10-29 15:40:13 -07:00
Kubernetes Submit Queue 7c9c8cbf28 Merge pull request #34952 from kargakis/update-observedgeneration-for-overlapping-deployments
Automatic merge from submit-queue

Make overlapping deployments deletable

@kubernetes/deployment ptal

Fixes https://github.com/kubernetes/kubernetes/issues/34466 by 1) not adding the overlapping annotation in the working deployment, 2) updates observedGeneration for overlapping deployments, and 3) updates the kubectl deployment reaper to do non-cascading deletion for deployments with the overlapping annotation.
2016-10-29 14:50:16 -07:00
Chao Xu 850729bfaf include multiple versions in clientset
update client-gen to use the term "internalversion" rather than "unversioned";
leave internal one unqualified;
cleanup client-gen
2016-10-29 13:30:47 -07:00
Janet Kuo 10aee82ae3 Rename PetSet API to StatefulSet 2016-10-27 17:25:10 -07:00
deads2k 81ae13084d handle non-generated client removal 2016-10-26 16:10:41 -04:00
Michail Kargakis 8351450a22 kubectl: do not cascade deletion for overlapping deployments 2016-10-18 17:46:34 +02:00
deads2k 519c13745f convert rest of kubectl to generated clients 2016-09-12 08:22:34 -04:00
deads2k f756e43e7f convert rolling updater to generated client 2016-09-12 07:38:34 -04:00
Jedrzej Nowak 9e2abd4b02 Fix various typos in pgk/cloudprovider,dns,kubectl 2016-08-31 18:56:52 +02:00
Michail Kargakis 4c56b8cfc5 kubectl: cast notFound error to struct 2016-08-25 10:40:44 +02:00
bprashanth 05aa040b0f Allow changes to container image for updates 2016-08-18 16:33:51 -07:00
bprashanth 30f3cb9d26 Scaler and reaper for petset 2016-08-17 17:37:56 -07:00
Chao Xu bcc1b68d47 let kubectl delete rc and rs using explicit non-orphan delete options 2016-08-11 11:30:26 -07:00
Kubernetes Submit Queue e7d01097dc Merge pull request #29971 from caesarxuchao/fix-kubectl-rolling-update-with-gc
Automatic merge from submit-queue

[GarbageCollector] Fix kubectl rolling-update to work with GC

This changes the order of the [Rename()](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/rolling_updater.go#L532) function. After the change, Rename() first deletes the old RC and orphans its pods, then creates the new RC, which will then have a chance to adopt the orphaned pods.

This also fixes the "should support rolling-update to same image" [test](https://github.com/kubernetes/kubernetes/blob/master/test/e2e/kubectl.go#L915) when the garbage collector is on.

Here is the detailed explanation on why the test would have failed:
`kubectl rolling-update` will [rename](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/rolling_updater.go#L532-L546) the RC. It first creates the an identical RC (including spec.selectors) with the new name, then it deletes the existing RC. When GC is turned on, the newly created RC cannot adopt the existing pod, because it has a controllerRef pointing to the exising RC, so the new RC will create new pods and expect to see the creation. However, the new RC and the old RC have the same selector, so sometimes the old RC, instead of the new RC, has its [expectation lowered](https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/replication/replication_controller.go#L346-L362), the new RC's expectation will stuck forever. The e2e test then times out when executing `kubectl delete newRC`, because there is the new RC will not scale down as its expectation is not fulfilled.

A side-note, we should fix [rm.getPodController()](https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/replication/replication_controller.go#L346) to respect pod's controllerref, that will prevent similar bugs.

Also note that an old version `kubectl rolling-update` will not work with the GC. We cannot fix that.
2016-08-04 20:48:10 -07:00
Chao Xu 96c84303bd fix kubectl rolling-update when GC is enabled 2016-08-03 15:57:03 -07:00
Kubernetes Submit Queue 207e8836c0 Merge pull request #29921 from andreykurilin/kubectl_typos
Automatic merge from submit-queue

Fix various typos in kubectl
2016-08-03 13:43:32 -07:00
Kubernetes Submit Queue 1ac1865dd7 Merge pull request #29484 from kargakis/fix-scaler-error
Automatic merge from submit-queue

kubectl: notfound errors should not error out

Fixes the flake in https://github.com/kubernetes/kubernetes/issues/28378#issuecomment-234677846

@pwittrock ptal
2016-08-03 03:13:19 -07:00
Andrey Kurilin 91cace347d Fix various typos in kubectl 2016-08-02 19:51:51 +03:00
Harry Zhang c495397cae Refactor uuid into its own pkg 2016-07-30 00:07:02 -04:00
Michail Kargakis 36522378f4 kubectl: notfound errors should not error out 2016-07-24 12:46:38 +02:00
Michal Fojtik 3095437300 Retry updating deployment only on update conflict error 2016-07-19 13:01:06 +02:00
Angus Salkeld eec08872c7 Move deployment utilities to there own package 2016-07-08 09:46:56 +02:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Michail Kargakis 748c71f3eb kubectl: cast scale errors to actual errors when deleting 2016-05-26 10:33:52 +02:00
Clayton Coleman fdb110c859
Fix the rest of the code 2016-04-29 17:12:10 -04:00
Maciej Szulik a3b4447305 Move internal types of job from pkg/apis/extensions to pkg/apis/batch 2016-04-25 11:03:54 +02:00
Chao Xu 3efd3c62e6 Replace ineffective DeleteOptions with nil 2016-02-24 15:06:24 -08:00
Brian Grant 0b5edab208 Merge pull request #21857 from nikhiljindal/stopDeployment
fix deployment e2e flake: Update DeploymentReaper.Stop to use ObservedGeneration
2016-02-24 14:26:23 -08:00
Brian Grant b5c6341ec9 Merge pull request #21435 from janetkuo/use-intptr
Use IntPtr
2016-02-24 13:54:21 -08:00