Commit Graph

2229 Commits (2d6c632de2f9ac15005c188913f779a81b392c81)

Author SHA1 Message Date
Girish Kalele 3778ca196e Remove comment about empty selectors 2016-06-28 17:04:24 -07:00
k8s-merge-robot 32eccd413f Merge pull request #25562 from gtank/certificates-api-v9
Automatic merge from submit-queue

TLS bootstrap API group (alpha)

This PR only covers the new types and related client/storage code- the vast majority of the line count is codegen. The implementation differs slightly from the current proposal document based on discussions in design thread (#20439). The controller logic and kubelet support mentioned in the proposal are forthcoming in separate requests.

I submit that #18762 ("Creating a new API group is really hard") is, if anything, understating it. I've tried to structure the commits to illustrate the process.

@mikedanese @erictune @smarterclayton @deads2k

```release-note-experimental
An alpha implementation of the the TLS bootstrap API described in docs/proposals/kubelet-tls-bootstrap.md.
```

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-28 13:25:22 -07:00
George Tankersley 56a2cf40e6 tests: add certificates to existing test infrastructure 2016-06-28 12:05:40 -07:00
Clayton Coleman 1c8b928908
Handle aliases correctly in deepcopy/conversion 2016-06-27 21:42:02 -07:00
Clayton Coleman 82a9bed565
Copy reflect diff 2016-06-27 21:41:58 -07:00
Matthew Wong 3118c937be Fix pvc label selector validation error 2016-06-27 16:00:03 -04:00
k8s-merge-robot b51e5c0127 Merge pull request #26276 from deads2k/tweak-quota-validation
Automatic merge from submit-queue

make quota validation re-useable

Break quota validation into smaller functions to allow for object re-use.

@derekwaynecarr
2016-06-25 05:23:55 -07:00
k8s-merge-robot db62715c65 Merge pull request #26240 from liggitt/wrap-updated-object
Automatic merge from submit-queue

Add WrapUpdatedObjectInfo helper

This makes it easier to attach checks/transformations to the updated object in storage Update functions, while still keeping the data flow intact (so admission, patch, and other injected checks continue to work as intended), without needing to do anything tricky to get the updated object out of the UpdatedObjectInfo introduced in https://github.com/kubernetes/kubernetes/pull/25787

This is especially useful when one storage is delegating to another, but wants its checks to be run in the heart of the eventual GuaranteedUpdate call.
2016-06-25 04:44:40 -07:00
k8s-merge-robot b4c81a073a Merge pull request #25709 from asalkeld/null-deref
Automatic merge from submit-queue

Check for an empty value in validateField

```release-note
* Fix a panic when args was not supplied with any values.
```

reflect.TypeOf() can take a nil (it then returns a nil), but
Kind() panics on a nil.

Now the user gets the following output:
./kubectl.sh --server=http://localhost:8080 create -f ../../test-files/test-rc.yaml
error validating "../../test-files/test-rc.yaml": error validating data: unexpected nil value for field spec.template.spec.containers[0].args[0]; if you choose to ignore these errors, turn validation off with --validate=false

fixes #20627 and fixes #26927
2016-06-25 02:31:01 -07:00
k8s-merge-robot d36375954e Merge pull request #27733 from caesarxuchao/gc-parametercodec
Automatic merge from submit-queue

let dynamic client handle non-registered ListOptions

And register v1.ListOptions in the policy group.

Fix #27622

@lavalamp @smarterclayton @krousey
2016-06-22 17:36:16 -07:00
Chao Xu d9f07925be let dynamic client handle non-registered ListOptions;
register ListOptions for apis/policy
2016-06-22 13:18:50 -07:00
Maciej Szulik feb43c5e6d Reapply ScheduledJob tests (2ab885a53a) 2016-06-21 14:55:00 +02:00
k8s-merge-robot ec518005a8 Merge pull request #27567 from saad-ali/blockKubeletOnAttachController
Automatic merge from submit-queue

Kubelet Volume Manager Wait For Attach Detach Controller and Backoff on Error

* Closes https://github.com/kubernetes/kubernetes/issues/27483
  * Modified Attach/Detach controller to report `Node.Status.AttachedVolumes` on successful attach (unique volume name along with device path).
  * Modified Kubelet Volume Manager wait for Attach/Detach controller to report success before proceeding with attach.
* Closes https://github.com/kubernetes/kubernetes/issues/27492
  * Implemented an exponential backoff mechanism for for volume manager and attach/detach controller to prevent operations (attach/detach/mount/unmount/wait for controller attach/etc) from executing back to back unchecked.
* Closes https://github.com/kubernetes/kubernetes/issues/26679
  * Modified volume `Attacher.WaitForAttach()` methods to uses the device path reported by the Attach/Detach controller in `Node.Status.AttachedVolumes` instead of calling out to cloud providers.
2016-06-20 20:36:08 -07:00
k8s-merge-robot 60d4f2fe9d Merge pull request #27432 from jsafrane/pv-events-log
Automatic merge from submit-queue

Allow emitting PersistentVolume events.

Similarly to Nodes, PersistentVolumes are not in any namespace and we should
not block events on them. Currently, these events are rejected with
`Event "nfs.145841cf9c8cfaf0" is invalid: involvedObject.namespace: Invalid value: "": does not match involvedObject`
2016-06-20 01:02:47 -07:00
saadali e3e919ca20 Add VolumesAttached field to Node Status API 2016-06-19 23:54:02 -07:00
k8s-merge-robot ba771e7135 Merge pull request #27192 from smarterclayton/signature_change
Automatic merge from submit-queue

Remove EncodeToStream(..., []unversioned.GroupVersion)

Was not being used. Is a signature change and is necessary for post 1.3 work on Templates and other objects that nest objects.

Extracted from #26044
2016-06-19 16:13:07 -07:00
k8s-merge-robot 090e6ff660 Merge pull request #27625 from goltermann/spell2
Automatic merge from submit-queue

Fix several spelling errors in comments

What the title says
2016-06-18 23:08:28 -07:00
k8s-merge-robot 9d8e79be09 Merge pull request #27168 from smarterclayton/flatten_types
Automatic merge from submit-queue

ObjectMeta, ListMeta, and TypeMeta should implement their interfaces

Make unversioned.ListMeta implement List. Update all the *List types so they implement GetListMeta.
This helps avoid using reflection to get list information.

Remove all unnecessary boilerplate, move the interfaces to the right
places, and add a test that verifies that objects implement one, the
other, but never both.

@ncdc @lavalamp this supercedes #26964 with the boilerplate removed.  Added tests
2016-06-18 20:23:50 -07:00
k8s-merge-robot 7ee4189cf6 Merge pull request #27036 from sttts/sttts-secure-seccomp-path
Automatic merge from submit-queue

Filter seccomp profile path from malicious .. and /

Without this patch with `localhost/<some-releative-path>` as seccomp profile one can load any file on the host, e.g. `localhost/../../../../dev/mem` which is not healthy for the kubelet.

/cc @jfrazelle 

Unit tests depend on https://github.com/kubernetes/kubernetes/pull/26710.
2016-06-18 15:58:07 -07:00
goltermann 218645b346 Fix several spelling errors in comments. 2016-06-17 10:41:18 -07:00
Avesh Agarwal eac3e3d809 Fix divisor for memory resource as it should never be millibytes 2016-06-15 15:32:59 -04:00
deads2k 1388efe6bb make quota validation re-useable 2016-06-15 14:38:43 -04:00
saadali 542f2dc708 Introduce new kubelet volume manager
This commit adds a new volume manager in kubelet that synchronizes
volume mount/unmount (and attach/detach, if attach/detach controller
is not enabled).

This eliminates the race conditions between the pod creation loop
and the orphaned volumes loops. It also removes the unmount/detach
from the `syncPod()` path so volume clean up never blocks the
`syncPod` loop.
2016-06-15 09:34:08 -07:00
saadali 9b6a505f8a Rename UniqueDeviceName to UniqueVolumeName
Rename UniqueDeviceName to UniqueVolumeName and move helper functions
from attacherdetacher to volumehelper package.
Introduce UniquePodName alias
2016-06-15 09:32:12 -07:00
Jan Safranek 4ab91066d0 Allow emitting PersistentVolume events.
Similarly to Nodes, PersistentVolumes are not in any namespace and we should
not block events on them. Currently, these events are rejected with
'Event "nfs.145841cf9c8cfaf0" is invalid: involvedObject.namespace: Invalid value: "": does not match involvedObject'
2016-06-15 14:42:24 +02:00
k8s-merge-robot 49d0ba52dc Merge pull request #27181 from jsafrane/update-selector-doc
Automatic merge from submit-queue

Update PVC.Selector docs: it's ignored when VolumeName is set

@kubernetes/sig-storage
2016-06-14 21:03:30 -07:00
Dr. Stefan Schimanski 3826d2598c Move seccomp annotation validation into api/validation 2016-06-14 14:58:32 +02:00
Dawn Chen 88de86fcb9 Revert "Versioning docs and examples for v1.4.0-alpha.0."
This reverts commit cce9db3aa9.
2016-06-10 16:46:46 -07:00
Clayton Coleman 36a5ffbe2f
Remove EncodeToStream(..., []unversioned.GroupVersion)
Was not being used.
2016-06-10 18:43:12 -04:00
David McMahon cce9db3aa9 Versioning docs and examples for v1.4.0-alpha.0. 2016-06-10 14:55:35 -07:00
Andy Goldstein e3af3451c8
ObjectMeta, ListMeta, and TypeMeta should implement their interfaces
Make unversioned.ListMeta implement List. Update all the *List types so they implement GetListMeta.
This helps avoid using reflection to get list information.

Remove all unnecessary boilerplate, move the interfaces to the right
places, and add a test that verifies that objects implement one, the
other, but never both.
2016-06-10 13:28:54 -04:00
Piotr Szczesniak ba1c8a2ac5 Revert "ScheduledJob tests" 2016-06-10 16:22:04 +02:00
Jan Safranek caa09afc95 Update PVC.Selector docs: it's ignored when VolumeName is set 2016-06-10 10:08:01 +02:00
Maciej Szulik 2ab885a53a Revert commit a31ca0dc98 and move batch/v2alpha1 tests to separate group in KUBE_TEST_API_VERSIONS 2016-06-10 01:11:56 +02:00
k8s-merge-robot 54b352ae3a Merge pull request #26907 from smarterclayton/tolerate_quantity
Automatic merge from submit-queue

Resource quantity must support leading and trailing whitespace in JSON for back-compat

For backwards compatibility reasons, we must continue to support leading or trailing whitespace on Quantity values when deserialized from JSON.  We must also support numbers serialized into yaml (`cpu: 1`) and JSON (`"cpu": 1`)

Fixes #26898
2016-06-08 16:16:41 -07:00
Clayton Coleman e1dc3ef933
Remove unused deep_copies 2016-06-06 17:18:22 -04:00
Clayton Coleman 0181ac61da
DeepCopy should only generate types in k8s.io/kubernetes
Also make generation more selective (require opt in) to prevent lots of
unnecessary generated deep copies.
2016-06-06 17:18:22 -04:00
Clayton Coleman 653ddbb01e
Tolerate YAML and JSON numbers
Both YAML and JSON can contain numbers
2016-06-06 17:14:50 -04:00
Clayton Coleman 2ed3246631
Resource quantity must support leading and trailing whitespace
For backwards compatibility reasons, we must continue to support leading
or trailing whitespace on Quantity values when deserialized from JSON.
2016-06-06 16:53:42 -04:00
Huamin Chen 4b4048a084 correction on rbd volume object and defaults
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-06-06 17:27:47 +00:00
Saad Ali 9dbe943491 Attach/Detach Controller Kubelet Changes
This PR contains Kubelet changes to enable attach/detach controller control.
* It introduces a new "enable-controller-attach-detach" kubelet flag to
  enable control by controller. Default enabled.
* It removes all references "SafeToDetach" annoation from controller.
* It adds the new VolumesInUse field to the Node Status API object.
* It modifies the controller to use VolumesInUse instead of SafeToDetach
  annotation to gate detachment.
* There is a bug in node-problem-detector that causes VolumesInUse to
  get reset every 30 seconds. Issue https://github.com/kubernetes/node-problem-detector/issues/9
  opened to fix that.
2016-06-02 16:47:11 -07:00
k8s-merge-robot 5288a255f4 Merge pull request #25567 from gmarek/validate
Automatic merge from submit-queue

Add Controller field to OwnerReference

cc @davidopp
2016-05-31 14:21:38 -07:00
gmarek 778b1df717 Add Controller to api/meta 2016-05-31 20:21:05 +02:00
k8s-merge-robot 484830c763 Merge pull request #26564 from wojtek-t/fix_pod_annotations
Automatic merge from submit-queue

Fix apiservers crashes

Ref #26563
2016-05-31 10:55:48 -07:00
Wojciech Tyczynski d002cb1d63 Fix apiservers crashes 2016-05-31 17:26:35 +02:00
k8s-merge-robot 38181bb3fb Merge pull request #25917 from pmorie/pv-selector
Automatic merge from submit-queue

Add LabelSelector to PersistentVolumeClaimSpec

Implements #25413.

@kubernetes/sig-storage @bgrant0607 @thockin @jsafrane @eparis
2016-05-31 08:22:07 -07:00
gmarek a6dd89d797 Add Controller field to OwnerReference 2016-05-31 15:33:35 +02:00
Paul Morie acfcb73533 Regen for pv selector 2016-05-31 09:32:23 -04:00
Piotr Szczesniak 22dc21d703 Removed metrics api group 2016-05-31 09:48:39 +02:00
Paul Morie faa112bad1 Add selector to PersistentVolumeClaim 2016-05-30 12:09:50 -04:00