Commit Graph

45 Commits

Author SHA1 Message Date
Eric Tune
4d090bfb09 Rename PodSecurityPolicy fields
In podSecurityPolicy:
1. Rename .seLinuxContext to .seLinux
2. Rename .seLinux.type to .seLinux.rule
3. Rename .runAsUser.type to .runAsUser.rule
4. Rename .seLinux.SELinuxOptions

1,2,3 as suggested by thockin in #22159.
I added 3 for consistency with 2.
2016-03-03 11:49:48 -08:00
Brian Grant
f5a92cc13c Merge pull request #21865 from piosz/cluster-autoscaling-cleanup
Cluster autoscaling cleanup
2016-02-26 15:25:55 -08:00
Eric Tune
875755f992 Added Selector Generation to Job.
Added selector generation to Job's
strategy.Validate, right before validation.
Can't do in defaulting since UID is not known.

Added a validation to Job to ensure that the generated
labels and selector are correct when generation was requested.
This happens right after generation, but validation is in a better
place to return an error.

Adds "manualSelector" field to batch/v1 Job to control selector generation.
Adds same field to extensions/__internal.  Conversion between those two
is automatic.

Adds "autoSelector" field to extensions/v1beta1 Job.  Used for storing batch/v1 Jobs
    - Default for v1 is to do generation.
    - Default for v1beta1 is to not do it.
    - In both cases, unset == false == do the default thing.

Release notes:
Added batch/v1 group, which contains just Job, and which is the next
version of extensions/v1beta1 Job.

The changes from the previous version are:
- Users no longer need to ensure labels on their pod template are unique to the enclosing
  job (but may add labels as needed for categorization).
- In v1beta1, job.spec.selector was defaulted from pod labels, with the user responsible for uniqueness.
  In v1, a unique label is generated and added to the pod template, and used as the selector (other
  labels added by user stay on pod template, but need not be used by selector).
- a new field called "manualSelector" field exists to control whether the new behavior is used,
  versus a more error-prone but more flexible "manual" (not generated) seletor.  Most users
  will not need to use this field and should leave it unset.

Users who are creating extensions.Job go objects and then posting them using the go client
will see a change in the default behavior.  They need to either stop providing a selector (relying on
selector generation) or else specify "spec.manualSelector" until they are ready to do the former.
2016-02-25 09:28:07 -08:00
Piotr Szczesniak
ea2075404d Removed cluster autoscaler types frome extensions/v1beta1 2016-02-24 09:45:13 +01:00
Madhusudan.C.S
ad9ba23995 Comment out DaemonSet update type fields and remove the code that depends on it.
Leaving the type fields as comments for reference and reminder. But
deleting the conversion, defaulting and validation code. They can
always be brough back from the previous PR once the types are
introduced. Because builds break without them anyway that serves as a
reminder, so there is no need to leave them commented out.
2016-02-10 15:44:01 -08:00
Madhusudan.C.S
ed7ad6dcf3 Make deployments work. 2016-02-08 21:27:49 -08:00
Madhusudan.C.S
518f08aa7c Move Deployments to ReplicaSets and switch the Deployment selector to the new LabelSelector.
Update the Deployments' API types, defaulting code, conversions, helpers
and validation to use ReplicaSets instead of ReplicationControllers and
LabelSelector instead of map[string]string for selectors.

Also update the Deployment controller, registry, kubectl subcommands,
client listers package and e2e tests to use ReplicaSets and
LabelSelector for Deployments.
2016-02-08 21:27:38 -08:00
k8s-merge-robot
e76caf43aa Merge pull request #20703 from mwielgus/hpa-cm-validation
Auto commit by PR queue bot
2016-02-06 21:16:51 -08:00
Janet Kuo
7e9fb97b7d Remove UniqueLabelKey from deployment spec 2016-02-05 16:21:44 -08:00
Prashanth Balasubramanian
c56bebf594 Basic TLS support. 2016-02-05 11:00:04 -08:00
Paul Weil
03261146b0 api 2016-02-05 08:45:50 -05:00
Marcin Wielgus
9a74a60413 Validation of HPA custom metrics annotation 2016-02-05 11:31:51 +01:00
Eric Tune
6133cb1f21 Move extensions.LabelSelector to unversioned.
Move type LabelSelector and type LabelSelectorRequirement from pkg/apis/extensions
This avoids an import loop when Job (and later DaemonSet, Deployment, ReplicaSet)
are moved out of extensions to new api groups.

Also Move LabelSelectorAsSelector utility from pkg/apis/extensions/ to pkg/api/unversioned/
Also its test.
Also LabelSelectorOp* constants.
Also the pkg/apis/extensions/validation functions ValidateLabelSelectorRequirement and
ValidateLabelSelector move to pkg/api/unversioned

The related type in pkg/apis/extensions/v1beta1/ is staying there.  I might move
it in another PR if neccessary.
2016-02-04 13:46:34 -08:00
Janet Kuo
3396db9510 Add rollback subresource; add rollback logic to deployment controller 2016-01-30 16:00:34 -08:00
Madhusudan.C.S
559bf168ff Fix tests. 2016-01-28 22:51:58 -08:00
Madhusudan.C.S
73fb6dca62 DaemonSetSpec.Template should not be a pointer.
Pod template for DaemonSets isn't optional, like Deployments and Jobs,
so the DaemonSetSpec.Template field should not be a pointer.
2016-01-28 22:51:58 -08:00
Paul Morie
9030f16071 Move ConfigMap to main API 2016-01-28 17:07:05 -05:00
Madhusudan.C.S
572abe1c50 Introducing ReplicaSet, a new incarnation of Replication Controller.
This commit adds the API types, conversion, validation and defaulting code.
2016-01-21 00:38:42 -08:00
Madhusudan.C.S
bd3b476bbf Update types, add defaulting code, conversions and validation. 2016-01-20 10:44:19 -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
Maciej Szulik
327c104460 Added ActiveDeadlineSeconds to jobs, allowing failing a job after
exceeding allowed time.
2015-12-17 15:26:42 +01:00
Tamer Tas
c798a6ef01 ConfigMap resource and its REST implementation 2015-12-16 11:19:26 -05:00
Salvatore Dario Minonne
80575c3093 renaming PodSelector to LabelSelector 2015-12-04 09:49:08 +01: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
Tim Hockin
682f2a5a79 Stronger typing for validation ErrorList 2015-11-23 10:01:43 -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
Wojciech Tyczynski
8594c20333 Merge pull request #16677 from DirectXMan12/feature/add-scale-validator
[WIP] Add Validators for Scale Objects
2015-11-20 12:03:45 +01:00
Solly Ross
e5ef9e1406 Add Validators for Scale Objects
This commit introduces a validator for use with Scale updates.
The validator checks that we have > 0 replica count, as well
as the normal ObjectMeta checks (some of which have to be
faked since they don't exist on the Scale object).
2015-11-18 13:53:56 -05: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
Mike Danese
7a7f31ead1 move daemonset to generalized label selector 2015-11-13 10:31:50 -08:00
eulerzgy
501c2825cf Make order of fun consistent 2015-11-10 17:43:54 +08:00
Jordan Liggitt
b3157d1445 Ensure HPA has valid resource/name/subresource, validate path segments 2015-11-03 14:46:17 -05:00
Mike Danese
b0a41108af move deployment PodTemplate to be not a pointer 2015-10-28 00:13:40 -07:00
mqliang
b6f19b140e fix validation for HorizontalPodAutoscalerSpec 2015-10-16 18:32:57 +08:00
Jerzy Szczepkowski
df732f061a HorizontalPodAutoscaler API: removal of ResourceConsumption target, introduction of CPU request utilization & other cleanups. 2015-10-16 07:15:50 +02:00
Mike Danese
29c50cdc1a plumb PodSelector through the api 2015-10-15 07:42:57 -07: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
Maciej Szulik
98fa29adfd Make PodTemplateSpec for Job not a pointer, since it's a required field 2015-10-14 11:37:11 +02:00
Chao Xu
7c9f4cc42f experimental. -> extensions. 2015-10-09 15:49:10 -07:00
Chao Xu
67f316dd19 apis/experimental->apis/extensions 2015-10-09 15:04:41 -07:00
Chao Xu
983f056514 move folders 2015-10-09 14:57:44 -07:00