Commit Graph

37 Commits (74c23bdf68391b8a6133d68fb6160c2a413d1438)

Author SHA1 Message Date
knightXun 3206f96d70 Update stateful_set_utils.go
find a syntax error,please check it.
2017-03-29 20:21:13 +08:00
Jeff Schroeder a5afdfa17f
Fix spelling of the word successfully
Auto-generated via:
    git grep -l [Ss]uccesfully  | xargs sed -ri 's/([sS])uccesfully/\1uccessfully/g'

I noticed this when running kube-scheduler with --v4 and it is annoying.
Then manually reverted changed to the vendored bits.
2017-03-22 18:33:11 -05:00
Anthony Yeh b4b8fdbca3 GC: Fix re-adoption race when orphaning dependents.
The GC expects that once it sees a controller with a non-nil
DeletionTimestamp, that controller will not attempt any adoption.
There was a known race condition that could cause a controller to
re-adopt something orphaned by the GC, because the controller is using a
cached value of its own spec from before DeletionTimestamp was set.

This fixes that race by doing an uncached quorum read of the controller
spec just before the first adoption attempt. It's important that this
read occurs after listing potential orphans. Note that this uncached
read is skipped if no adoptions are attempted (i.e. at steady state).
2017-03-17 15:39:26 -07:00
Anthony Yeh 399c19a2ad StatefulSet: Check that ControllerRef UID matches. 2017-03-06 10:36:41 -08:00
Anthony Yeh 6679a5a31f StatefulSet: Always set BlockOwnerDeletion in ControllerRef. 2017-03-06 09:46:03 -08:00
Anthony Yeh 2248187536 StatefulSet: Don't log Pod events unless some StatefulSet cares. 2017-03-06 09:46:03 -08:00
Anthony Yeh ea85a201c7 StatefulSet: Use ControllerRef to route watch events.
This is part of the completion of ControllerRef, as described here:

https://github.com/kubernetes/community/blob/master/contributors/design-proposals/controller-ref.md#watches
2017-03-06 09:46:03 -08:00
Anthony Yeh e4f67c8170 StatefulSet: Use ControllerRefManager to adopt/orphan. 2017-03-06 09:46:03 -08:00
Anthony Yeh b5dfc7b2aa StatefulSet: Add ControllerRef on all created Pods. 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 83cd403674 statefulset: wait for pvc cache sync 2017-03-01 12:16:35 -05:00
Andy Goldstein bd912f50ba statefulset: use pvc lister, replace legacylisters
Use a PVC lister instead of a client when retrieving PVCs.

Replace unit test's use of legacylisters with the generated listers.
2017-02-27 06:38:11 -05:00
Kubernetes Submit Queue b5d010d6a3 Merge pull request #40910 from justinsb/fix_35695
Automatic merge from submit-queue (batch tested with PRs 41667, 41820, 40910, 41645, 41361)

Allow multiple mounts in StatefulSet volume zone placement

We have some heuristics that ensure that volumes (and hence stateful set
pods) are spread out across zones.  Sadly they forgot to account for
multiple mounts.  This PR updates the heuristic to ignore the mount name
when we see something that looks like a statefulset volume, thus
ensuring that multiple mounts end up in the same AZ.

Fix #35695

```release-note
Fix zone placement heuristics so that multiple mounts in a StatefulSet pod are created in the same zone
```
2017-02-23 20:57:29 -08:00
Kubernetes Submit Queue 56841e84f6 Merge pull request #41993 from foxish/foxish-patch-1
Automatic merge from submit-queue

Add approvers to StatefulSet

The owners file has no approvers at the moment, adding people from workloads
2017-02-23 18:02:39 -08:00
Anirudh Ramanathan 68093d42ce Add approvers to StatefulSet 2017-02-23 11:03:09 -08:00
Andy Goldstein f6a186b1e1 Switch statefulset controller to shared informers 2017-02-22 08:53:51 -05:00
Justin Santa Barbara bba343d066 Allow multiple mounts in StatefulSet volume zone placement
We have some heuristics that ensure that volumes (and hence stateful set
pods) are spread out across zones.  Sadly they forgot to account for
multiple mounts.  This PR updates the heuristic to ignore the mount name
when we see something that looks like a statefulset volume, thus
ensuring that multiple mounts end up in the same AZ.

Fix #35695
2017-02-19 02:20:04 -05:00
Michail Kargakis 10b4ec7b47 controller: cleanup workload controllers a bit
* Switches glog.Errorf to utilruntime.HandleError in DS and RC controllers
* Drops a couple of unused variables in the DS, SS, and Deployment controllers
* Updates some comments
2017-02-12 17:52:28 +01: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
Sebastian Laskawiec 7c7ca34246 Add StatefulSets checks at Service level 2017-02-01 11:29:40 +01:00
deads2k 8a12000402 move client/record 2017-01-31 19:14:13 -05:00
deads2k 2c1c0f3f72 move workqueue to client-go 2017-01-30 09:08:21 -05:00
Dr. Stefan Schimanski 44ea6b3f30 Update generated files 2017-01-29 21:41:45 +01:00
Dr. Stefan Schimanski bc6fdd925d pkg/api/resource: move to apimachinery 2017-01-29 21:41:44 +01:00
deads2k 9488e2ba30 move testing/core to client-go 2017-01-26 13:54:40 -05:00
deads2k b0b156b381 make tools/cache authoritative 2017-01-25 08:29:45 -05:00
deads2k 5a8f075197 move authoritative client-go utils out of pkg 2017-01-24 08:59:18 -05:00
Clayton Coleman 469df12038
refactor: move ListOptions references to metav1 2017-01-23 17:52:46 -05:00
Kubernetes Submit Queue e4804a6164 Merge pull request #40237 from derekwaynecarr/remove_pet
Automatic merge from submit-queue (batch tested with PRs 40232, 40235, 40237, 40240)

Fixup pet terminology in log and user-facing events

**What this PR does / why we need it**:
Removes some user-facing strings for pet terminology.
2017-01-20 14:22:52 -08:00
deads2k 1ce0637b27 move listers out of cache to reduce import tree 2017-01-20 15:01:38 -05:00
Derek Carr 8ad16dfcab Fixup pet terminology in log and user-facing events 2017-01-20 14:47:11 -05:00
deads2k ee6752ef20 find and replace 2017-01-20 08:04:53 -05:00
deads2k c587b8a21e re-run client-gen 2017-01-20 08:02:36 -05:00
Clayton Coleman 9a2a50cda7
refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
Harry Zhang a88cbdc52d Update bazel 2017-01-17 16:55:06 +08:00
Harry Zhang b8678ad130 Use statefulset instead in controller
Rename e2e folder to statefulset
2017-01-17 10:36:37 +08:00