Commit Graph

575 Commits (302eae213d611b6b8dcaa943d671dc00ef8336f2)

Author SHA1 Message Date
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 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 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
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 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
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
Dr. Stefan Schimanski 3826d2598c Move seccomp annotation validation into api/validation 2016-06-14 14:58:32 +02: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 a6dd89d797 Add Controller field to OwnerReference 2016-05-31 15:33:35 +02:00
Paul Morie faa112bad1 Add selector to PersistentVolumeClaim 2016-05-30 12:09:50 -04:00
Angus Salkeld 5dcbc7ce5b Check for an empty value in validateField
reflect.TypeOf() can take a nil (it then returns a nil), but
Kind() panics on a nil.

Fixes #20627
2016-05-30 14:12:18 +10:00
k8s-merge-robot a550cf16b9 Merge pull request #25826 from freehan/svcsourcerange
Automatic merge from submit-queue

promote sourceRange into service spec

@thockin  one more for your pile

I will add docs at `http://releases.k8s.io/HEAD/docs/user-guide/services-firewalls.md`

cc: @justinsb 

Fixes: #20392
2016-05-28 02:20:13 -07:00
Alex Robinson 294e49f8b9 Merge pull request #26121 from hpcloud/hpe/vsphere-vol-validation
Adding vSphere volume validation in api
2016-05-27 10:11:23 -07:00
Alex Mohr edda837142 Merge pull request #25599 from caesarxuchao/orphaning-finalizer
Add orphaning finalizer logic to GC
2016-05-26 13:19:19 -07:00
Minhan Xia a1bd33f510 promote sourceRange into service spec 2016-05-26 10:42:30 -07:00
Chao Xu 1665546d2d add finalizer logics to the API server and the garbage collector; handling DeleteOptions.OrphanDependents in the API server 2016-05-24 13:07:28 -07:00
Avesh Agarwal 1931931494 Downward API implementation for resources limits and requests 2016-05-24 12:22:35 -04:00
Abitha Palaniappan 66f9cd82a7 Adding vSphere volume validation in api 2016-05-23 14:39:09 -07:00
Tim Hockin 54a3efb364 Make IsDNS952Label return error strings 2016-05-19 08:57:49 -07:00
Tim Hockin 5862a60ae7 Make IsDNS1123Subdomain return error strings 2016-05-19 08:57:49 -07:00
Tim Hockin 77eff06a53 Make IsDNS1123Label return error strings 2016-05-19 08:57:49 -07:00
k8s-merge-robot 4f09f51486 Merge pull request #24800 from thockin/validation_pt8-3
Automatic merge from submit-queue

Make name validators return string slices

Part of the larger validation PR, broken out for easier review and merge.  Builds on previous PRs in the series.
2016-05-19 02:15:27 -07:00
Kevin 52fb89ff73 implement taints and tolerations 2016-05-18 15:06:23 +00:00
k8s-merge-robot e4e6e46197 Merge pull request #24799 from thockin/validation_pt8-2
Automatic merge from submit-queue

Make IsValidLabelValue return error strings

Part of the larger validation PR, broken out for easier review and merge.  Builds on previous PRs in the series.
2016-05-18 04:08:15 -07:00
Tim Hockin 152c86ab06 Make name validators return string slices 2016-05-18 00:48:01 -07:00
Tim Hockin 66d0d87829 Make IsValidLabelValue return error strings 2016-05-17 21:36:10 -07:00
Clayton Coleman 6685715c4c
API for adding init containers 2016-05-17 00:29:49 -04:00
k8s-merge-robot 4ac32179bf Merge pull request #24798 from thockin/validation_pt8-1
Automatic merge from submit-queue

Make IsQualifiedName return error strings

Part of the larger validation PR, broken out for easier review and merge.

@lavalamp FYI, but I know you're swamped, too.
2016-05-14 22:14:17 -07:00
k8s-merge-robot 5c30f983d9 Merge pull request #25018 from smarterclayton/fast_conversion
Automatic merge from submit-queue

Reduce allocations during conversion, enable new UnsafeConvertToVersion path

Cleans up the conversion path to avoid a few unnecessary allocations, then creates a new UnsafeConvertToVersion path that will allow encode/decode to bypass copying the object for performance. In that subsequent PR, ConvertToVersion will start to call Copy() and we will refactor conversions to reuse as much of the existing object as possible.

Also changes the unversioned.ObjectKind signature to not require allocations - speeds up a few common paths.
2016-05-12 14:50:01 -07:00
k8s-merge-robot 08440b5dcc Merge pull request #24836 from Clarifai/gpu-impl
Automatic merge from submit-queue

WIP v0 NVIDIA GPU support

```release-note
* Alpha support for scheduling pods on machines with NVIDIA GPUs whose kubelets use the `--experimental-nvidia-gpus` flag, using the alpha.kubernetes.io/nvidia-gpu resource 
```

Implements part of #24071 for  #23587

I am not familiar with the scheduler enough to know what to do with the scores. Mostly punting for now.

Missing items from the implementation plan: limitranger, rkt support, kubectl
support and docs

cc @erictune @davidopp @dchen1107 @vishh @Hui-Zhi @gopinatht
2016-05-12 14:04:15 -07:00
Clayton Coleman a84e62d9e6
Change ObjectKind signature to avoid allocations
We don't need to pass a pointer into SetGroupKindVersion() - a
struct works just as well.
2016-05-12 10:10:35 -04:00
Tim Hockin 72955770f3 Make IsQualifiedName return error strings 2016-05-10 11:23:23 -07:00
Phillip Wittrock 680b2b9d09 Kubectl support for validating nested objects with different ApiGroups (e.g. Lists containing objects in different api groups). Closes #24089 2016-05-09 19:38:40 -07:00
Rudi Chiarito 362c763fca WIP v0 NVIDIA GPU support
Implements part of #24071

I am not familiar with the scheduler enough to know what to do with the scores. Punting for now.

Missing items from the implementation plan: limitranger, rkt support, kubectl
support and user docs
2016-05-09 19:20:05 -04:00
k8s-merge-robot f2f3b49f58 Merge pull request #22575 from MikaelCluseau/wip-issue-20466
Automatic merge from submit-queue

Add subPath to mount a child dir or file of a volumeMount

Allow users to specify a subPath in Container.volumeMounts so they can use a single volume for many mounts instead of creating many volumes. For instance, a user can now use a single PersistentVolume to store the Mysql database and the document root of an Apache server of a LAMP stack pod by mapping them to different subPaths in this single volume.

Also solves https://github.com/kubernetes/kubernetes/issues/20466.
2016-05-08 08:45:15 -07:00
Kevin 82ba4f077e implement inter pod topological affinity and anti-affinity 2016-05-06 06:46:23 +00:00
Mikaël Cluseau 06900a934d Introduce subPath in VolumeMount 2016-05-06 15:08:41 +11:00
Chao Xu a46b7775fc API changes for finalizers and system-wide garbage collector 2016-05-04 21:54:55 -07:00
Clayton Coleman fdb110c859
Fix the rest of the code 2016-04-29 17:12:10 -04:00
k8s-merge-robot ad67363c12 Merge pull request #24362 from ArtfulCoder/hostname-field
Automatic merge from submit-queue

Promote Pod Hostname & Subdomain to fields (were annotations)

Deprecating the podHostName, subdomain and PodHostnames annotations and created corresponding new fields for them on PodSpec and Endpoints types.

Annotation doc: #22564
Annotation code: #20688
2016-04-29 01:06:45 -07:00
Abhishek Shah 8a3ed48808 Added Hostname and Subdomain field to Pod.Spec 2016-04-28 10:56:56 -07:00
Jordan Liggitt 1e5815872e Validate deletion timestamp doesn't change on update 2016-04-28 11:50:48 -04:00
k8s-merge-robot 09adffb318 Merge pull request #23317 from aanm/removing-ipv4-enforcement
Automatic merge from submit-queue

Remove requirement that Endpoints IPs be IPv4

Signed-off-by: André Martins <aanm90@gmail.com>

Release Note: The `Endpoints` API object now allows IPv6 addresses to be stored.  Other components of the system are not ready for IPv6 yet, and many cloud providers are not IPv6 compatible, but installations that use their own controller logic can now store v6 endpoints.
2016-04-21 03:34:50 -07:00
k8s-merge-robot 6a7dcde2d5 Merge pull request #23955 from fejta/pkg-validation
Automatic merge from submit-queue

Use tagged gcr.io redis image for pkg/api tests

Migrate pkg/api/validation/testdata redis images to use tagged gcr.io version for https://github.com/kubernetes/kubernetes/issues/13288 and https://github.com/kubernetes/kubernetes/issues/20836
2016-04-19 16:37:13 -07:00
nikhiljindal 6eae11e166 Updating the schema validation code 2016-04-14 18:07:00 -07:00
Erick Fejta eb0352cf2d Use fake images for pkg/api/validation unit tests 2016-04-14 17:13:15 -07:00