Commit Graph

511 Commits

Author SHA1 Message Date
Michael Fraenkel
2d803afc98 ConfigMaps populate environment variables 2017-01-03 11:02:15 -05:00
Robert Rati
91931c138e [scheduling] Moved node affinity from annotations to api fields. #35518 2016-12-16 11:42:43 -05:00
Clayton Coleman
c52d510a24
refactor: generated 2016-12-10 18:05:53 -05:00
Clayton Coleman
3c72ee2189
Change references to OwnerReference 2016-12-10 18:05:36 -05:00
Clayton Coleman
3454a8d52c
refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00
Clayton Coleman
5df8cc39c9
refactor: generated 2016-12-03 19:10:46 -05:00
Kubernetes Submit Queue
1b2a4b55bb Merge pull request #36251 from screeley44/k8-immutable-scannotation
Automatic merge from submit-queue

Make pvc storage class annotation immutable after create

Fixes #34516

Added immutable check in validation.go

```
# Please edit the object below. Lines beginning with a '#' will be ignored,
# and an empty file will abort the edit. If an error occurs while saving this file will be
# reopened with the relevant failures.
#
# persistentvolumeclaims "gce-claim-storageclass" was not valid:
# * metadata.annotations.volume.beta.kubernetes.io/storage-class: Invalid value: "slow2": field is immutable
#

```
2016-12-02 18:42:32 -08:00
Minhan Xia
1c2c0c1f63 support service loadBalancerSourceRange update 2016-11-30 15:27:34 -08:00
Scott Creeley
a76854ca97 Make pvc storage class annotation immutable after create 2016-11-29 16:45:00 -05:00
Kubernetes Submit Queue
48ae0807cb Merge pull request #36449 from luksa/env.valueFrom
Automatic merge from submit-queue

Improved validation error message when env.valueFrom contains no (or …

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

**What this PR does / why we need it**:
A misleading error message is shown if the user mistypes (or forgets to specify) a field under env.valueFrom. This is the error message: "may not have more than one field specified at a time". But there is only one (misspelled) field specified.


**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```
Improved error message for missing/misspelled field under env.valueFrom
```
2016-11-29 07:32:27 -08:00
Clayton Coleman
35a6bfbcee
generated: refactor 2016-11-23 22:30:47 -06:00
Marko Luksa
d8ec7181b4 Improved validation error message when env.valueFrom contains no (or misspelled) ref 2016-11-15 10:08:47 +01:00
Zihong Zheng
924432f2dc Allows user to change service type when sourceRanges is declared 2016-11-14 18:24:02 -08:00
Kubernetes Submit Queue
73e497fb44 Merge pull request #35437 from markturansky/loosen_pvc_limit_range_validation
Automatic merge from submit-queue

Loosened validation on PVC LimitRanger

This PR loosens validation on PVC LimitRanger so that either Min or Max are required, but not both.

Per @derekwaynecarr  https://github.com/openshift/origin/pull/11396#discussion_r84533061
2016-11-09 02:01:52 -08:00
Miao Luo
b22ccc6780 Support persistent volume on Photon Controller platform
1. Enable Photon Controller as cloud provider
2. Support Photon persistent disk as volume source/persistent volume
source
2016-11-08 09:36:16 -08:00
Jitendra Bhurat
66a1ef25e0
Fixing Volumes on Windows 2016-11-01 15:48:37 -04:00
Connor Doyle
c93646e8da Support opaque integer resource accounting.
- Prevents kubelet from overwriting capacity during sync.
- Handles opaque integer resources in the scheduler.
  - Adds scheduler predicate tests for opaque resources.
- Validates opaque int resources:
  - Ensures supplied opaque int quantities in node capacity,
    node allocatable, pod request and pod limit are integers.
  - Adds tests for new validation logic (node update and pod spec).
- Added e2e tests for opaque integer resources.
2016-10-28 10:15:13 -07:00
markturansky
a3f4d8a506 loosened validation on pvc limitranger 2016-10-24 11:01:18 -04:00
Maciej Kwiek
7df1afe71f Deny ClusterIP update for services using it
If the service is of the type using the ClusterIP (ClusterIP, NodePort,
LoadBalancer), the update of ClusterIP is prohibited.
2016-10-21 09:53:39 +02:00
bprashanth
5029bb06e9 Validation 2016-10-19 14:51:57 -07:00
pweil-
49e14744db support seccomp in psp 2016-10-17 14:49:02 -04:00
markturansky
0d40104c1d add pvc storage to LimitRange 2016-10-05 17:31:15 -04:00
Maciej Kwiek
9e1c886a80 Validate None Service ClusterIP against LB type
If the Service is a Load Balancer, it should not have None Cluster IP.
If it does, Service validation fails.
2016-09-29 10:17:29 +02:00
Michail Kargakis
f7c232b8c6 extensions: add minReadySeconds/availableReplicas to replica sets 2016-09-28 11:06:40 +02:00
Christian Simon
1c11047ffb Adds datasetUUID for referencing flocker datasets
* flocker datasets should be attached using an unique identifier. This
  is not the case for the name metadata used by datasetName
* allow only one of datasetUUID / datasetName specified
2016-09-27 13:19:22 +00:00
Minhan Xia
ba45a3f74e disallow user to update loadbalancerSourceRanges 2016-09-22 19:04:02 -07:00
Chao Xu
c5e1decc13 add validation rule to prevent adding finalizers if the object is being deleted 2016-09-09 15:29:08 -07:00
Ivan Shvedunov
1c9ee74987 Allow IP addresses to be used as node names
Fixes #32050
2016-09-05 02:37:00 +03:00
Girish Kalele
db95798b39 Enforce EndpointAddress.NodeName validation + added unit tests 2016-08-30 13:40:19 -07:00
Jedrzej Nowak
a6c0e23fd2 Fix various typos in pkg/api 2016-08-29 11:31:16 +02:00
Kubernetes Submit Queue
cefc4c3027 Merge pull request #31473 from timstclair/aa-gate
Automatic merge from submit-queue

Add AppArmor feature gate

Add option to disable AppArmor via a feature gate. This PR treats AppArmor as Beta, and thus depends on https://github.com/kubernetes/kubernetes/pull/31471 (I will remove `do-not-merge` once that merges).

Note that disabling AppArmor means that pods with AppArmor annotations will be rejected in validation. It does not mean that the components act as though AppArmor was never implemented. This is by design, because we want to make it difficult to accidentally run a Pod with an AppArmor annotation without AppArmor protection.

/cc @dchen1107
2016-08-26 21:04:42 -07:00
Kubernetes Submit Queue
8e93fec7fa Merge pull request #31146 from pmorie/recycle-hostpath-slash
Automatic merge from submit-queue

Add validation preventing recycle of / in a hostPath PV

Adds a validation that prevents a user from recycling `/` when it is used in a hostPath PV

cc @kubernetes/sig-storage
2016-08-26 18:09:32 -07:00
Kubernetes Submit Queue
4dc5d44879 Merge pull request #30304 from screeley44/k8-validate-pv
Automatic merge from submit-queue

add validation for PV spec to ensure correct values are used for ReclaimPolicy on initial create

k8 currently allows invalid values for ReclaimPolicy (i.e. "scotto") - this allows the PV to be created and even bound, however, when the pvc or pod is deleted and the recycler is triggered, an error is thrown

```
Events:
  FirstSeen	LastSeen	Count	From				SubobjectPath	Type		Reason				Message
  ---------	--------	-----	----				-------------	--------	------				-------
  36s		36s		1	{persistentvolume-controller }			Warning		VolumeUnknownReclaimPolicy	Volume has unrecognized PersistentVolumeReclaimPolicy
```

New behavior will not allow the user to create the PV:

```
[root@k8dev nfs]# kubectl create -f nfs-pv-bad.yaml 
The PersistentVolume "pv-gce" is invalid: spec.persistentVolumeReclaimPolicy: Unsupported value: "scotto": supported values: Delete, Recycle, Retain
```
2016-08-26 16:24:25 -07:00
Tim St. Clair
9bde6f0770
Add AppArmor feature gate 2016-08-25 17:40:18 -07:00
Dominika Hodovska
bea189e9c9 Add sysctl api, validation & Docker support 2016-08-25 13:22:01 +02:00
Scott Creeley
9e078d7393 add validation for PV spec to ensure correct values are used for ReclaimPolicy 2016-08-24 12:18:22 -04:00
Huamin Chen
dea4b0226d support Azure data disk volume
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-08-23 13:23:07 +00:00
jianhuiz
7be20b0dac add ClusterName field to ObjectMeta 2016-08-22 21:09:57 -07:00
Paul Morie
d22ffb0402 Add validation preventing recycle of / in a hostPath PV 2016-08-22 23:20:20 -04:00
Tim St. Clair
839034b46b
Validate AppArmor annotations in the API server 2016-08-21 20:59:11 -07:00
Clayton Coleman
e1ebde9f92
Add spec.nodeName and spec.serviceAccountName to downward env var
The serviceAccountName is occasionally useful for clients running on
Kube that need to know who they are when talking to other components.

The nodeName is useful for PetSet or DaemonSet pods that need to make
calls back to the API to fetch info about their node.

Both fields are immutable, and cannot easily be retrieved in another
way.
2016-08-20 15:50:36 -04:00
Kubernetes Submit Queue
e9947d9ad7 Merge pull request #30813 from bprashanth/kubectl_petset
Automatic merge from submit-queue

Basic scaler/reaper for petset

Currently scaling or upgrading a petset is more complicated than it should be. Would be nice if this made code freeze on friday. I'm planning on a follow up change with generation number and e2es post freeze.
2016-08-20 10:51:07 -07:00
Rudi Chiarito
88fdb96bfb Add ExternalName to ServiceSpec
ExternalName allows kubedns to return CNAME records for external
services. No proxying is involved.

See original issue at
https://github.com/kubernetes/kubernetes/issues/13748

Feature tracking at
https://github.com/kubernetes/features/issues/33
2016-08-19 11:30:57 -07:00
Kubernetes Submit Queue
0bef4243cd Merge pull request #30386 from derekwaynecarr/fix-pvc-validation
Automatic merge from submit-queue

Fix pvc requests.storage validation

A `PersistentVolumeClaim` should not be able to request a negative amount of storage.

/cc @kubernetes/sig-storage @kubernetes/rh-cluster-infra @deads2k
2016-08-19 07:46:03 -07:00
Kubernetes Submit Queue
40367df750 Merge pull request #30590 from kevin-wangzefeng/taint-unique-by-key-effect
Automatic merge from submit-queue

make taints unique by <key, effect> on a node

closes #29362
2016-08-19 04:58:12 -07:00
bprashanth
05aa040b0f Allow changes to container image for updates 2016-08-18 16:33:51 -07:00
Johannes Scheuermann
eed42380f9 Initial Quobyte support 2016-08-18 17:13:50 +02:00
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
Kevin
1e2d560253 make taints unique by <key, effect> on a node 2016-08-17 15:40:33 +08:00
derekwaynecarr
cebb038935 Fix pvc requests.storage validation 2016-08-15 09:56:04 -04:00