Commit Graph

462 Commits

Author SHA1 Message Date
Rodrigo Campos
568f4c2e63 Add mode permission bits to configmap, secrets and downwardAPI
This implements the proposal in:
docs/proposals/secret-configmap-downwarapi-file-mode.md

Fixes: #28317.

The mounttest image is updated so it returns the permissions of the linked file
and not the symlink itself.
2016-08-17 14:44:41 -04:00
Kubernetes Submit Queue
94fc389daa Merge pull request #29837 from thockin/validate-dotdot-in-projections
Automatic merge from submit-queue

Validate .. in projections, fix tests

I noticed this when reviewing another PR.  I fixed it but the test was beyond comprehension, so I fixed that too.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/29837)
<!-- Reviewable:end -->
2016-08-09 02:31:58 -07:00
Michael Fraenkel
b1e7e6cf46 Service names conform to RFC 1035 2016-08-02 08:42:15 -06:00
Tim Hockin
ef4bccf63e Clean up the ugliest unit test ever
This volume-validation test was a disaster.  Better now, if longer to
scroll-through.
2016-07-31 22:37:11 -07:00
Tim Hockin
54e92bbc49 minor rename for readability 2016-07-31 22:37:11 -07:00
Tim Hockin
9f2e13acca Validate that projected files do not contain ..
This was checked in the kubelet, but not at the API.
2016-07-31 22:37:11 -07:00
Wojciech Tyczynski
898a6444e3 Return pointer for Affinity in api helper 2016-07-28 16:57:28 +02:00
Ivan Shvedunov
02baa44948 Fix update validation for pods w/init containers. 2016-07-20 00:30:12 +03:00
k8s-merge-robot
8677b0c545 Merge pull request #28743 from Clarifai/gpu-impl
Automatic merge from submit-queue

Fix GPU resource validation

This fixes scheduling of pods with GPU resources. The change was never upstreamed during the 1.3 beta period, as it got lost in the noise of other changes in our fork. Ooops. I'll submit a cherry-pick request for 1.3.1 as soon as this lands in master.

Because of defaulting, requests are always set if limits are. Thus, the check can never succeed. Instead, make sure that the two values are equal.

Also, remove a few other error messages and remove unnecessary Sprintf calls.
2016-07-16 11:48:42 -07:00
Rudi Chiarito
b86dfcf60a Fix GPU resource validation
Because of defaulting, requests are always set if limits are. Thus, the check can never succeed. Instead, make sure that the two values are equal.

Also, remove a few other error messages and remove unnecessary Sprintf calls.
2016-07-13 15:05:59 -04:00
jiangyaoguo
4e91166bc6 Use PreferAvoidPods annotation to avoid pods being scheduled to specific node.
1. define PreferAvoidPods annotation
2. add PreferAvoidPodsPriority
3. validate AvoidPods in node annotations
2016-07-13 17:07:46 +08:00
markturansky
3ddb8470b9 make PVCs immutable (except volumeName) post-creation 2016-07-11 11:50:16 -04:00
k8s-merge-robot
5f2460b58c Merge pull request #21240 from thockin/validation_pt8
Automatic merge from submit-queue

Validation: Make validation func return error strings

Part of an ongoing series of validation cleanups.

This centralizes the error strings next to the code that checks the error conditions.  Future commits will refine the messages further and provide more utility validators.

I'm OK if this doesn't go into 1.2, but I am tired of rebasing :)  I suggest commit-by-commit review, which should go pretty quickly.  This was largely mechanical.

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/21240)
<!-- Reviewable:end -->
2016-07-07 14:37:11 -07:00
Michail Kargakis
93c2656d5a api: validate generation updates 2016-07-07 13:09:48 +02:00
bin liu
426fdc431a Merge branch 'master' into fix-typos 2016-07-04 11:20:47 +08:00
Tim Hockin
2f3863f53f Wrap DNS util/validation with api/validation
Simpler code and a step towards declarative validation.
2016-07-03 02:20:11 -07:00
Tim Hockin
09f1c97447 Clean up ValidateHasLabel() 2016-07-03 02:20:11 -07:00
Tim Hockin
766f44f715 Move IsSecretKey into util/validation 2016-07-03 02:19:09 -07:00
Tim Hockin
37786e0e77 Make IsHTTPHeaderName return error strings 2016-07-02 17:34:32 -07:00
Tim Hockin
3ad6c397d7 Make IsValid{User,Group}Id return error strings 2016-07-02 17:34:32 -07:00
Tim Hockin
87c1fc50a8 Make IsValidIP return error strings
Also treat 0.0.0.0 as special, like loopback and multicast.
2016-07-02 17:32:05 -07:00
Tim Hockin
14bece550f Make IsValidPortNum/Name return error strings 2016-07-02 17:32:05 -07:00
Tim Hockin
189d4a5159 Make CIdentifier return error strings 2016-07-02 17:32:05 -07:00
David McMahon
ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07: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
bin liu
fd27cd47f7 fix some typos
Signed-off-by: bin liu <liubin0329@gmail.com>
2016-06-22 18:14:26 +08: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
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
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
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