Commit Graph

505 Commits

Author SHA1 Message Date
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
André Martins
c1a360b1d5 Removing IPv4 enforcement on Endpoints
Signed-off-by: André Martins <aanm90@gmail.com>
2016-04-14 16:20:00 +01:00
Paul Morie
24aade64f5 Validate that volume mountpoints are unique 2016-03-17 23:52:34 -04:00
Chao Xu
a6240c1ab8 add FullyLabeledReplicas in Replicaset Status and ReplicationController Status 2016-03-11 23:55:04 -08:00
Avesh Agarwal
427774306c Fix validation of resources (cpu, memory, storage) for limit range types. 2016-03-10 11:33:53 -05:00
Abhishek Shah
a3c00aadd5 Specify hostname, subdomain via annotation on podspec.
The hostname is a DNS A record, if the subdomain maps to a service name
in the same namespace
2016-03-04 13:28:33 -08:00
k8s-merge-robot
de72b6be1b Merge pull request #21907 from justinsb/load_balancer_source_ranges
Auto commit by PR queue bot
2016-03-03 14:10:47 -08:00
Justin Santa Barbara
cb92133dfa LB Source Ranges: Move validation into API layer
Had to move other things around too to avoid a weird api ->
cloudprovider dependency.

Also adding fixes per code reviews.

(This is a squash of the previously approved commits)
2016-03-03 10:27:17 -05:00
Tim Hockin
56be551416 Validate volume paths do not have ':' 2016-02-29 13:22:45 -08:00
derekwaynecarr
df064bd53d ResourceQuota API validation for scopes and new resource types 2016-02-26 20:34:14 -05:00
Jordan Liggitt
b502b8f6a1 Restore service port validation compatibility with 1.0/1.1 2016-02-23 21:27:44 -05:00
k8s-merge-robot
c91a79be45 Merge pull request #21199 from erictune/validation-helper
Auto commit by PR queue bot
2016-02-16 07:07:49 -08:00
derekwaynecarr
c5cb09405c Improve persistent volume claim validation 2016-02-15 15:13:53 -05:00
k8s-merge-robot
c48e94df89 Merge pull request #20956 from derekwaynecarr/cleanup_validation
Auto commit by PR queue bot
2016-02-15 11:55:54 -08:00
k8s-merge-robot
4ff418ca50 Merge pull request #21057 from davidopp/work1
Auto commit by PR queue bot
2016-02-14 20:48:17 -08:00
David Oppenheimer
66368efad5 Comment out NodeAffinity.RequiredDuringSchedulingRequiredDuringExecution
because it is not yet implemented.
2016-02-14 17:46:13 -08:00
Paul Morie
d1dc259ef2 ConfigMap volume source 2016-02-14 16:19:17 -05:00
Eric Tune
825dc470cc Add a validation helper function.
I will use this in a subsequent PR as part of #12298
2016-02-12 14:38:22 -08:00
derekwaynecarr
cc2137fccc Fixup validation for containers requests or limits to use quantity comparison 2016-02-11 15:34:00 -05:00
Jan Safranek
40c97ddd5f Remove validation of *VolumeSource.FSType.
Most volume plugins use SafeFormatAndMount, which uses ext4 by default.

FlexVolume plugin has FSType attribute 'omitempty', so reflect it in the
description of the type.
2016-02-09 09:13:06 +01:00
Huamin Chen
d7e4b826b9 support Azure File Service volume
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-02-09 01:07:12 +00:00
k8s-merge-robot
6103b8713e Merge pull request #20648 from deads2k/fix-validation
Auto commit by PR queue bot
2016-02-06 17:13:19 -08:00
k8s-merge-robot
aac20ed69d Merge pull request #20600 from freehan/servicevalidation
Auto commit by PR queue bot
2016-02-06 10:23:18 -08:00
k8s-merge-robot
0ad6326d7f Merge pull request #20170 from pmorie/update-ads-pod
Auto commit by PR queue bot
2016-02-05 20:37:39 -08:00
Paul Morie
0b82d0b491 Allow pod.Spec.ActiveDeadlineSeconds to be updateable 2016-02-05 15:58:31 -05:00
Prashanth Balasubramanian
c56bebf594 Basic TLS support. 2016-02-05 11:00:04 -08:00
Rudi Chiarito
a2d1bb7acf Add httpHeaders to httpGet liveness probe
Also update existing documentation and try to steer users away from 'host'.
Add validation.
2016-02-05 11:20:04 -05:00
Daniel Smith
e6639de333 Merge pull request #20380 from mqliang/podcidr-validation
pod cidr validation
2016-02-04 23:16:02 -08:00
deads2k
e084578148 fix validation error path for namespace 2016-02-04 10:10:49 -05:00
Kevin
c8c82c1d8f implement Node affinity and NodeSelector 2016-02-04 01:53:14 +00:00
Minhan Xia
ec7366fc2a add service validation for mix protocol 2016-02-03 14:54:32 -08:00
k8s-merge-robot
072bfd40ca Merge pull request #18556 from mqliang/podValidation
Auto commit by PR queue bot
2016-02-02 10:26:43 -08:00
Chao Xu
90b4662d8d Add services/status path, and let the service controller uses Services.UpdateStatus() 2016-01-31 12:39:45 -08:00
mqliang
470d7af8c9 pod cidr validation 2016-01-31 11:49:31 +08:00
Paul Morie
defd1d0544 Add size limit for ConfigMap 2016-01-29 00:14:28 -05:00
Paul Morie
9030f16071 Move ConfigMap to main API 2016-01-28 17:07:05 -05:00
jhadvig
5927ad81be Additional SecretTypes 2016-01-26 14:34:12 +01:00
k8s-merge-robot
3978c76a26 Merge pull request #18790 from erictune/secret-validate
Auto commit by PR queue bot
2016-01-21 00:46:49 -08:00
k8s-merge-robot
8ed248021e Merge pull request #17650 from jsafrane/devel/cinder-format
Auto commit by PR queue bot
2016-01-20 22:18:25 -08:00
k8s-merge-robot
1c861d43ac Merge pull request #18298 from pmorie/secret-env
Auto commit by PR queue bot
2016-01-20 03:55:40 -08:00
Eric Tune
4a3d4defdf Validate kubernetes.io/dockerconfigjson secrets
Added unit test.
2016-01-19 12:35:30 -08:00
Jan Safranek
f912870784 openstack: Use common SafeFormatAndMount() for mounting.
There is no reason for OpenStack + Cinder to use it's own variant of format
& mount.
2016-01-19 09:36:38 +01:00
Matt McNaughton
90d68a53b3 Rename Positive qualifier to Nonnegative
It makes more sense for `ValidatePositiveField` and
`ValidatePositiveQuantity` methods to be named `ValidateNonnegativeField`
and `ValidateNonnegativeQuantity` as that is what is truly being
checked. This commit simply updates the method names everywhere they are
used.
2016-01-18 17:29:15 -05:00
Paul Morie
60cf252e8b Add validation for variant-type of EnvVarSource 2016-01-18 15:07:48 -05:00
Paul Morie
6cfd101251 Add support for ConfigMap keys in env vars 2016-01-13 17:00:15 -05:00
k8s-merge-robot
170c03a85f Merge pull request #16354 from mdshuai/valid-supplemental-groups
Auto commit by PR queue bot
2016-01-11 00:48:34 -08:00
mdshuai
27934da9cc Validate uids and gids for securitycontext 2016-01-11 15:17:25 +08:00
Kenneth Shelton
9e6c45c395 Updated comments
Updated documentation
Fixed e2e test
2016-01-05 20:51:21 +00:00
Kenneth Shelton
d399a8f8cc * Added UDP LB support (for GCE) 2016-01-05 20:51:21 +00:00
Tim Hockin
708fda2683 field paths are JSON-style 2015-12-31 15:37:12 -08:00
Chakravarthy Nelluri
fa76de79e5 Add support for flex volume. Flex volume adds support for thirdparty(vendor)
volumes and custom mounts.
2015-12-23 14:11:38 -08:00
Tim Hockin
0fecf965b4 Change how one-of blocks are validated
I took a hard look at error output and played until I was happier.  This now
prints JSON for structs in the error, rather than go's format.

Also made the error message easier to read.

Fixed tests.
2015-12-18 09:42:14 -08:00
Tim Hockin
43ed74748e Clean up and document validation strings
Also add a detail string for Required and Forbidden.  Fix tests.
2015-12-18 09:40:50 -08:00
Tim Hockin
27fc14000d audit validation errors to not double-print field names 2015-12-18 09:06:02 -08:00
k8s-merge-robot
5ac7f31064 Merge pull request #18508 from mqliang/bindingValidation
Auto commit by PR queue bot
2015-12-17 03:22:18 -08:00
mqliang
04763abbbb remove TODO:binding validation 2015-12-15 14:47:55 +08:00
harry
d94945c179 Fix empty string check inconsistency in validation.go 2015-12-13 00:11:56 +08:00
mqliang
0debeff598 remove newPod.Status = oldPod.Status in validation.go 2015-12-11 11:12:08 +08:00
Tim Hockin
7fb8f60735 Shorten names for better reading 2015-12-10 11:48:19 -08:00
Tim Hockin
87a35047dd Move FieldPath and errors to a sub-package
This makes the naming and reading a lot simpler.
2015-12-10 11:48:16 -08:00
Jordan Liggitt
7d10fd3591 Validate pod spec.nodeName 2015-12-05 11:34:09 -05:00
Tim Hockin
e6df0b1a24 Convert validation to use FieldPath
Before this change we have a mish-mash of ways to pass field names around for
error generation.  Sometimes string fieldnames, sometimes .Prefix(), sometimes
neither, often wrong names or not indexed when it should be.

Instead of that mess, this is part one of a couple of commits that will make it
more strongly typed and hopefully encourage correct behavior.  At least you
will have to think about field names, which is better than nothing.

It turned out to be really hard to do this incrementally.
2015-12-03 08:19:44 -08:00
k8s-merge-robot
b3846ea748 Merge pull request #17862 from feihujiang/ensureHeadlessServicePortEqualToTargetPort
Auto commit by PR queue bot
2015-12-02 03:35:36 -08:00
Harry Zhang
70a9c0bf56 Add directory in GitRepo and updated tests.
Update validate and gitRepo

Update generated code
2015-12-02 00:20:38 +08:00
feihujiang
81b095ee52 Ensure headless service port equal to targetPort 2015-12-01 14:37:26 +08:00
Clayton Coleman
1d592e4c28 Unversioned types should not use ambiguous go-int
All external types that are not int64 are now marked as int32,
including
IntOrString. Prober is now int32 (43 years should be enough of an initial
probe time for anyone).

Did not change the metadata fields for now.
2015-11-26 11:45:25 -05:00
Tim Hockin
ceee678b29 Rename validation 'New' funcs 2015-11-23 10:01:43 -08:00
Tim Hockin
682f2a5a79 Stronger typing for validation ErrorList 2015-11-23 10:01:43 -08:00
Tim Hockin
f8ad75df44 Clarify invalid vs not-supported 2015-11-23 08:07:17 -08:00
Tim Hockin
48b49a5cae s/ValidationErrorList/ErrorList/ 2015-11-22 20:13:20 -08:00
Tim Hockin
d64d1fbb3d s/ValidationError/Error/ 2015-11-22 20:12:46 -08:00
Tim Hockin
0ff66da346 Move fielderrors into validation 2015-11-22 20:12:20 -08:00
Tim Hockin
ba383bcfeb Refactor IntOrString into a new pkg
pkg/util/intstr is a cleaner encapsulation for this type and supporting
functions.  No behavioral change.
2015-11-16 10:57:52 -08:00
eulerzgy
501c2825cf Make order of fun consistent 2015-11-10 17:43:54 +08:00
k8s-merge-robot
4e39dd4b7d Merge pull request #16925 from mikedanese/headless-fix-1
Auto commit by PR queue bot
2015-11-07 08:03:18 -08:00
Tim St. Clair
1e88a682da Add liveness/readiness probe parameters
- PeriodSeconds - How often to probe
- SuccessThreshold - Number of successful probes to go from failure to success state
- FailureThreshold - Number of failing probes to go from success to failure state

This commit includes to changes in behavior:

1. InitialDelaySeconds now defaults to 10 seconds, rather than the
kubelet sync interval (although that also defaults to 10 seconds).
2. Prober only retries on probe error, not failure. To compensate, the
default FailureThreshold is set to the maxRetries, 3.
2015-11-06 10:46:40 -08:00
Mike Danese
09295cd664 Headless services should not need to declare ports 2015-11-06 09:57:41 -08:00
feihujiang
f7bfb04665 Add a comment that not return an error for rootscoped resources with namesapce 2015-11-03 11:00:01 +08:00
mqliang
ce384e62ed fix conflict after rebase 2015-10-23 14:28:09 +08:00
mqliang
57faaf4f96 refactor validation.go to avoid duplicating 2015-10-23 14:23:55 +08:00
Janet Kuo
e36121ae9b Increase the annotation size limit to 256k 2015-10-21 16:16:55 -07:00
mqliang
b6be9b9684 use string constant instead of duplicating 2015-10-19 22:00:41 +08:00
k8s-merge-robot
72235d6607 Merge pull request #15709 from derekwaynecarr/ingress_status
Auto commit by PR queue bot
2015-10-17 00:40:35 -07:00
k8s-merge-robot
f5afa634ff Merge pull request #15574 from derekwaynecarr/resource_quota_fractional
Auto commit by PR queue bot
2015-10-16 07:38:26 -07:00
derekwaynecarr
65efc784cb Fix error message in validate load balancer status 2015-10-15 11:06:41 -04:00
k8s-merge-robot
351cc2040e Merge pull request #15491 from derekwaynecarr/ingress_status
Auto commit by PR queue bot
2015-10-15 06:04:38 -07:00
derekwaynecarr
eae56c3b2d Add status subresource to Ingress 2015-10-14 14:36:29 -04:00
derekwaynecarr
62b4467c69 Resource Quota should not let fractional values for API resources 2015-10-14 09:47:38 -04:00
Chao Xu
be0754750f add common fields validation before updaing a resource; make the repair of malformed update request flippable by a flag. 2015-10-13 16:28:32 -07:00
derekwaynecarr
544b453e31 Add replication controller status subresource 2015-10-07 14:39:33 -04:00
Paul Morie
227dd82119 Add PodSecurityContext and backward compatibility tests 2015-10-05 21:05:27 -04:00
Álex González
fa39c2b032 Add flocker volume plugin
Flocker [1] is an open-source container data volume manager for
Dockerized applications.

This PR adds a volume plugin for Flocker.
The plugin interfaces the Flocker Control Service REST API [2] to
attachment attach the volume to the pod.

Each kubelet host should run Flocker agents (Container Agent and Dataset
Agent).

The kubelet will also require environment variables that contain the
host and port of the Flocker Control Service. (see Flocker architecture
[3] for more).

- `FLOCKER_CONTROL_SERVICE_HOST`
- `FLOCKER_CONTROL_SERVICE_PORT`

The contribution introduces a new 'flocker' volume type to the API with
fields:

- `datasetName`: which indicates the name of the dataset in Flocker
  added to metadata;
- `size`: a human-readable number that indicates the maximum size of the
  requested dataset.

Full documentation can be found docs/user-guide/volumes.md and examples
can be found at the examples/ folder

[1] https://clusterhq.com/flocker/introduction/
[2] https://docs.clusterhq.com/en/1.3.1/reference/api.html
[3] https://docs.clusterhq.com/en/1.3.1/concepts/architecture.html
2015-10-01 01:10:00 +01:00
Brian Grant
7bd741b93b Merge pull request #14495 from derekwaynecarr/improve_quota_validation
Ensure ResourceQuota values are non-negative
2015-09-25 11:00:19 -07:00
Chao Xu
3473212ea5 remove thirdParty API from api/v1/ and api/ 2015-09-24 16:31:00 -07:00
derekwaynecarr
b29722c728 Ensure ResourceQuota values are non-negative 2015-09-24 10:15:40 -04:00
Mike Danese
edda776b4a fix validation for notReadyAddress subsets 2015-09-22 01:08:26 -07:00
Clayton Coleman
c2e90cd154 Support extended pod logging options
Increase the supported controls on pod logging. Add validaiton to pod
log options. Ensure the Kubelet is using a consistent, structured way to
process pod log arguments.

Add ?sinceSeconds=<durationInSeconds>, &sinceTime=<RFC3339>, ?timestamps=<bool>,
?tailLines=<number>, and ?limitBytes=<number>
2015-09-21 15:39:32 -04:00
Huamin Chen
ed9a1bbd3a support fibre channel volume
Signed-off-by: Huamin Chen <hchen@redhat.com>
2015-09-18 19:15:31 -04:00
k8s-merge-robot
5577430785 Merge pull request #13852 from hurf/lr_ratio_validation
Auto commit by PR queue bot
2015-09-17 21:51:31 -07:00
feihujiang
51f59f3c78 Fix the wrong path of document 2015-09-17 20:38:08 +08:00
eulerzgy
d312c30847 fix the change of hostDir to hostPath 2015-09-16 22:31:17 +08:00
hurf
daeae81e1e Add validation to MaxLimitRequestRatio in LimitRange
MaxLimitRequestRatio should >=1
MaxLimitRequestRatio should <= max/min(if both are specified)
2015-09-16 11:41:48 +08:00
k8s-merge-robot
8189460809 Merge pull request #13844 from tummychow/label-deps-2
Auto commit by PR queue bot
2015-09-14 12:56:24 -07:00
k8s-merge-robot
86b4e777e1 Merge pull request #13834 from derekwaynecarr/more_improvements_to_limit_range_validation
Auto commit by PR queue bot
2015-09-13 17:01:56 -07:00
tummychow
a21c52a766 Move util/validation files to their own package 2015-09-13 00:46:52 -07:00
derekwaynecarr
9bc48f699d Validate LimitRange default and defaultRequest are not supported for limits of type Pod 2015-09-11 12:22:30 -04:00
k8s-merge-robot
f8804ed166 Merge pull request #13798 from hurf/lr_dup
Auto commit by PR queue bot
2015-09-10 19:11:27 -07:00
tummychow
78ce5da988 Move util.StringSet into its own package
A lot of packages use StringSet, but they don't use anything else from
the util package. Moving StringSet into another package will shrink
their dependency trees significantly.
2015-09-10 12:04:15 -07:00
hurf
f61d434e1f Remove duplicate value assginment when validating limitrange
It's unnecessary to get the quantities again from limit.
2015-09-10 21:26:53 +08:00
derekwaynecarr
ea919f6d1e Fix precision handling in validating LimitRange 2015-09-09 15:52:29 -04:00
Brendan Burns
2df5010834 Merge branch 'sdminonne-container_sidecar' 2015-09-02 10:42:08 -07:00
Salvatore Dario Minonne
f4dc0653aa adding downward api volume plugin 2015-09-01 22:23:03 +02:00
Huamin Chen
fe559f2726 implement Ceph FS volume plugin and add to e2e volume test
Signed-off-by: Huamin Chen <hchen@redhat.com>
2015-09-01 14:05:17 -04:00
Sreekanth Pothanis
f5da6b34ce Cinder Volume Plugin 2015-08-30 19:56:27 -07:00
k8s-merge-robot
e5ac413311 Merge pull request #13286 from nikhiljindal/validateDeployment
Auto commit by PR queue bot
2015-08-28 22:37:55 -07:00
nikhiljindal
92f373a4b6 Validate deployment 2015-08-28 12:47:33 -07:00
Prashanth B
52f7833cd3 Revert "Revert "LimitRange updates for Resource Requirements Requests"" 2015-08-28 09:26:36 -07:00
Mike Danese
8460e3913d move daemon controller to the experimental api 2015-08-27 11:47:35 -07:00
Piotr Szczesniak
6e05b9e3a3 Revert "LimitRange updates for Resource Requirements Requests" 2015-08-27 10:50:50 +02:00
derekwaynecarr
8fbe4645e3 Add fields to LimitRange object 2015-08-24 15:18:45 -04:00
Brendan Burns
5d664892f2 Add a storage implementation for thirdpartyresources. 2015-08-21 17:21:40 -07:00
k8s-merge-robot
44c76d5319 Merge pull request #12957 from smarterclayton/handle_terminating_pods
Auto commit by PR queue bot
2015-08-20 21:47:00 -07:00
Abhishek Shah
b6b8e99393 External IPs support. 2015-08-20 16:10:01 -07:00
Clayton Coleman
02dbb95447 Add TerminationGracePeriodSeconds to API
Set defaulting for pod spec
2015-08-20 11:03:38 -04:00
Tim Hockin
86f4535871 Check loopback and link-local multicast endpoints
Previously we just disallowed link-local (unicast).  This disallows loopback
and link-local multicast.
2015-08-18 21:50:27 -07:00
Robert Bailey
08e6a43c1d Revert "Merge pull request #9165 from smarterclayton/graceful"
This reverts commit 4f856b595d, reversing
changes made to d78525a83b.

Conflicts:
	pkg/kubelet/status_manager.go
2015-08-18 17:34:49 -07:00
Clayton Coleman
89f1f3b1b8 Alter graceful deletion to not use TTL
Avoid TTL by deleting pods immediately when they aren't
scheduled, and letting the Kubelet delete them otherwise.

Ensure the Kubelet uses pod.Spec.TerminationGracePeriodSeconds
when no pod.DeletionGracePeriodSeconds is available.
2015-08-18 09:08:43 -04:00
Clayton Coleman
b842a7dd15 Revert "Revert "Gracefully delete pods from the Kubelet""
This reverts commit 98115facfd.
2015-08-18 08:57:02 -04:00
Clayton Coleman
01f3785426 Add status.podIP as a valid downward API target
Getting the public IP a container is supposed to use is O(hard),
and usually involves ugly gyrations in python or with interfaces.
Using the downward API means that the IP Kube is announcing to
other endpoints is also visible inside the container for pods to
identify themselves.
2015-08-14 17:51:55 -04:00
Brendan Burns
b29311ba2b Merge pull request #11781 from brendandburns/schema-api
RFC: Add initial plugin schema types.
2015-08-14 09:44:12 -07:00
Brendan Burns
1055eed9b6 Add initial storage types to the Kubernetes API 2015-08-13 09:25:02 -07:00
Jordan Liggitt
d7a50c4778 Limit field errors to a single field name 2015-08-12 14:10:26 -04:00
Veres Lajos
9f77e49109 typofix - https://github.com/vlajos/misspell_fixer 2015-08-08 22:31:48 +01:00
Satnam Singh
bee48f4ce5 Merge pull request #12035 from AnanyaKumar/requests
Add support for request
2015-08-07 14:27:34 -07:00
AnanyaKumar
d9b85652ae Add Daemon API 2015-08-06 13:15:19 -07:00
Dawn Chen
536313c82c Merge pull request #9472 from deads2k/expose-name-validation
expose common name validation methods
2015-08-06 10:51:51 -07:00
Ananya Kumar
ef1e576810 Add support for request 2015-08-05 19:00:19 -07:00
Mike Danese
8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
Manan Saraf
b2ebfeef25 Fixed empty name error and also changed tests 2015-08-04 14:09:42 -07:00
Chao Xu
18d32751fd improve the error message of update pod 2015-08-02 13:41:53 -07:00
deads2k
d73faa8272 expose common name validation methods 2015-07-27 13:12:28 -04:00
markturansky
0a0af48e51 added validation for AccessModes 2015-07-27 13:02:16 -04:00
Brendan Burns
a8f02e5472 Automatically open a firewall when creating a GCE load balancer. 2015-07-10 14:35:29 -07:00
Marek Biskup
88c70d2ae0 correct typo 2015-06-30 11:23:48 +02:00
Tim Hockin
08f66f04d6 Fix error message 2015-06-28 14:49:38 -07:00