Commit Graph

222 Commits

Author SHA1 Message Date
Daniel Smith
a86afc12df update scripts 2020-09-02 10:49:40 -07:00
Daniel Smith
75f835aa08 move port definitions to a common location 2020-09-02 10:48:25 -07:00
Patrick Ohly
c05c8e915b GenericEphemeralVolume: feature gate, API, documentation
As explained in
https://github.com/kubernetes/enhancements/tree/master/keps/sig-storage/1698-generic-ephemeral-volumes,
CSI inline volumes are not suitable for more "normal" kinds of storage
systems. For those a new approach is needed: "generic ephemeral inline
volumes".
2020-07-09 11:02:59 +02:00
Paulo Gomes
8976e3620f
Add seccomp enforcement and validation based on new GA fields
Adds seccomp validation.

This ensures that field and annotation values must match when present.

Co-authored-by: Sascha Grunert <sgrunert@suse.com>
2020-07-06 09:13:25 +01:00
Clayton Coleman
c6b833ac3c service: fix IPFamily validation and defaulting problems
If the dual-stack flag is enabled and the cluster is single stack IPv6,
the allocator logic for service clusterIP does not properly handle rejecting
a request for an IPv4 family. Return a 422 Invalid on the ipFamily field
when the dual stack flag is on (as it would when it hits beta) and the
cluster is configured for single-stack IPv6.

The family is now defaulted or cleared in BeforeCreate/BeforeUpdate,
and is either inherited from the previous object (if nil or unchanged),
or set to the default strategy's family as necessary. The existing
family defaulting when cluster ip is provided remains in the api
section. We add additonal family defaulting at the time we allocate
the IP to ensure that IPFamily is a consequence of the ClusterIP
and prevent accidental reversion. This defaulting also ensures that
old clients that submit a nil IPFamily for non ClusterIP services
receive a default.

To properly handle validation, make the strategy and the validation code
path condition on which configuration options are passed to service
storage. Move validation and preparation logic inside the strategy where
it belongs. Service validation is now dependent on the configuration of
the server, and as such ValidateConditionService needs to know what the
allowed families are.
2020-05-23 11:08:19 -04:00
Davanum Srinivas
442a69c3bd
switch over k/k to use klog v2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:27 -04:00
Jordan Liggitt
23e9fb1bb5 Fix podIP validation 2020-04-30 19:49:45 -04:00
Andrew Sy Kim
2e56866c97 move apparmor annotation constants to k8s.io/api/core/v1
Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
2020-04-06 10:22:04 -04:00
Kubernetes Prow Robot
98e65951dc
Merge pull request #89300 from huffmanca/expand_pvc_validation_message
Expand the PVC validation messages
2020-04-01 22:15:19 -07:00
Christian Huffman
cb230dca25 Expand the PVC validation messages 2020-03-24 16:25:37 -04:00
Odin Ugedal
19f0519b2d
Relax huge page node validation
A relaxed version was added in 1.18, and this will disable the
validation all together.
2020-03-19 14:09:13 +01:00
Kubernetes Prow Robot
264e2f1744
Merge pull request #88488 from gnufied/implement-fix-recursive-chown
Implement changes for fsgroup recursive chown
2020-03-05 21:39:30 -08:00
Hemant Kumar
f7509d277e Define new type for storing volume fsgroupchangepolicy
Address review comments for api change
2020-03-04 21:23:27 -05:00
Ben Swartzlander
e8b09d3644 Add AnyVolumeDataSource feature gate
Allow any custom resource to be the data source of a PVC, if the
AnyVolumeDataSource feature gate is enabled. This is an alpha feature.
2020-03-04 18:55:50 -05:00
Kubernetes Prow Robot
86141c0cce
Merge pull request #88503 from robscott/app-protocol
Adding AppProtocol to Service and Endpoints Ports
2020-02-26 00:20:40 -08:00
Rob Scott
6a33727632
Adding AppProtocol to Service and Endpoints Ports 2020-02-25 17:42:34 -08:00
Ed Bartosh
0eb65bd7da Implement support for multiple sizes huge pages
This implementation allows Pod to request multiple hugepage resources
of different size and mount hugepage volumes using storage medium
HugePage-<size>, e.g.

spec:
  containers:
    resources:
      requests:
        hugepages-2Mi: 2Mi
        hugepages-1Gi: 2Gi
    volumeMounts:
      - mountPath: /hugepages-2Mi
        name: hugepage-2mi
      - mountPath: /hugepages-1Gi
        name: hugepage-1gi
    ...
  volumes:
    - name: hugepage-2mi
      emptyDir:
        medium: HugePages-2Mi
    - name: hugepage-1gi
      emptyDir:
        medium: HugePages-1Gi

NOTE: This is an alpha feature.
      Feature gate HugePageStorageMediumSize must be enabled for it to work.
2020-02-19 18:15:40 +02:00
Kubernetes Prow Robot
95a1d5e699
Merge pull request #82820 from odinuge/hugetlb-node-multiple-size
Add support for pre-allocated hugepages with 2+ sizes
2020-01-30 21:20:18 -08:00
wojtekt
39f6c784b7 Cleanup validation for immutable secrets/configmaps 2020-01-28 09:40:12 +01:00
Odin Ugedal
6e411b6c0a
Add support for pre-allocated hugepages with 2 sizes
Remove the validation for pre-allocated hugepages on node level.
Validation is currently the only thing making it impossible to use
pre-allocated huge pages in more than one size.

We have now quite a few reports from real users that this feature is
welcome.
2020-01-23 17:38:22 +01:00
wojtekt
e612ebfdff Immutable field and validation 2020-01-12 20:51:31 +01:00
Andrew Sy Kim
aaa91ef412 service topology: remove redundant API validation for local external traffic policy
Signed-off-by: Andrew Sy Kim <kiman@vmware.com>
2019-11-15 08:57:17 -05:00
Kubernetes Prow Robot
d9be37e926
Merge pull request #72046 from m1093782566/service-topology-api
Service Topology implementation
2019-11-15 02:57:42 -08:00
Kubernetes Prow Robot
4e45328e65
Merge pull request #83123 from aramase/dualstack-downward-api
Dualstack downward api
2019-11-14 22:13:42 -08:00
Roc Chan
c9cf3f5b72 Service Topology implementation
* Implement Service Topology for ipvs and iptables proxier
* Add test files
* API validation
2019-11-15 13:36:43 +08:00
Anish Ramasekar
af4d18ccf9
add status.podIPs in downward api
add host file write for podIPs

update tests

remove import alias

update type check

update type check

remove import alias

update open api spec

add tests

update test

add tests

address review comments

update imports

remove todo and import alias
2019-10-25 09:18:49 -07:00
Mahendra Kariya
3698100224 Fix golint errors in pkg/apis/core (#82919)
* Fix lint errors related to receiver name

Ref #68026

* Fix lint errors related to comments

Ref #68026

* Fix package name in comments

Ref #68026

* Rename Cpu to CPU

Ref #68026

* Fix lint errors related to naming convention

Ref #68026

* Remove deprecated field

DoNotUse_ExternalID has been deprecated and is not in use anymore.
It has been removed to fix lint errors related to underscores in field
names.

Ref #68026, #61966

* Include pkg/apis/core in golint check

Ref #68026

* Rename var to fix lint errors

Ref #68026

* Revert "Remove deprecated field"

This reverts commit 75e9bfc168077fcb9346e334b59d60a2c997735b.

Ref #82919

* Remove math from godoc

Ref #82919, #68026

* Remove underscore from var name

Ref #68026

* Rename var in staging core api type

Ref #68026
2019-09-25 11:06:51 -07:00
Kubernetes Prow Robot
caeda2112a
Merge pull request #82759 from sttts/sttts-pvc-negative-resource-error-message
validations: for negative PVC storage size don't report "must be >= 0"
2019-09-16 18:06:35 -07:00
Dr. Stefan Schimanski
473f49435c validations: for negative PVC storage size don't report "must be >= 0" 2019-09-16 19:03:30 +02:00
Kubernetes Prow Robot
afa979c295
Merge pull request #82133 from bclau/windows/run-as-username-fix
api: Loosens RunAsUserName validation
2019-08-30 09:40:43 -07:00
Matthias Bertschy
e4d26f845e startupProbe: API changes 2019-08-30 00:40:26 +02:00
Claudiu Belu
cafbfbea9a api: Loosens RunAsUserName validation
Currently, the character limit for the usernames set in the RunAsUserName is 20,
which is too low, considering that "ContainerAdministrator" is a valid username and
it is longer than 20 characters. A user should be able to run containers as
Administrator, if needed.

According to [1], Logon names can be up to 104 characters. The previous limit
only applies to local user accounts for the local system.

[1] https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-2000-server/bb726984(v=technet.10)
2019-08-28 13:03:44 -07:00
Khaled Henidak(Kal)
5e8ccda71c phase 2: api types + defaulting + validation + disabled fields handling 2019-08-28 15:59:43 +00:00
Kubernetes Prow Robot
7a6e9fd8a9
Merge pull request #80512 from casusbelli/bugfix_80332
Removes conflicting Quobyte tenant test from API validation
2019-08-16 17:02:08 -07:00
Silvan Kaiser
a11e6a80a1 Removes conflicting Quobyte tenant test error from API validation 2019-08-16 14:06:25 +02:00
Kubernetes Prow Robot
6c0c167829
Merge pull request #80395 from Huang-Wei/cleanup-eps-validation
Optimize logic in EvenPodsSpread API validation
2019-08-07 20:09:41 -07:00
Jordan Liggitt
2e604bedc8 Make Overhead validation unconditional 2019-08-02 20:09:52 -04:00
Jordan Liggitt
802e765444 Preserve existing ephemeral containers on update, validate unconditionally 2019-08-02 20:00:01 -04:00
Wei Huang
cfd97ba070
Optimize logic in EvenPodsSpread API validation 2019-07-23 16:27:39 -07:00
Lee Verberne
013f049ce0 Add Ephemeral Containers to the Kubernetes core API 2019-07-22 11:19:22 +00:00
Wei Huang
49da505a9a
EvenPodsSpread: api changes 2019-07-18 17:34:26 -07:00
James Sturtevant
e8b369ff3c Windows: Adds RunAsUserName field in WindowsOptions
Adds the field RunAsUserName in the WindowsSecurityContextOptions type,
which is used in PodSecurityContext and SecurityContext.

This field needs to allow for a valid set of usernames allowed for
Windows containers. It must have the format "U

This commit also validates the runAsUserName field, making sure that it valid,
having the format DOMAIN\USER (case insensitive), where DOMAIN\ is optional and
has to be a valid NetBios or DNS domain name.

For more information about the restrictions on the DOMAIN and USER parts, look here: [1] [2]

Adds the WindowsRunAsUserName alpha feature gate. By default, it is disabled.
If the feature gate is not enabled, the WindowsOptions.RunAsUserName field
will be dropped from both the PodSecurityContext and container
SecurityContext.

Co-Authored-By: Claudiu Belu <cbelu@cloudbasesolutions.com>

[1] https://support.microsoft.com/en-us/help/909264/naming-conventions-in-active-directory-for-computers-domains-sites-and
[2] https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.localaccounts/new-localuser?view=powershell-5.1
2019-07-17 15:03:04 +00:00
Khaled Henidak(Kal)
54d42e6a65 types modifications + conversion + conversion testing 2019-07-02 15:39:05 +00:00
Ted Yu
cf7c164ae3 Restore early return for podSpecHasContainer 2019-06-26 14:17:13 +08:00
Lee Verberne
ee821e2a04 Create helpers for iterating containers in a pod 2019-06-21 08:32:04 +00:00
Eric Ernst
d0b0c0ae45 pod-overhead: add Overhead to PodSpec internal type
Update internal PodSpec to make use of Overhead field. Add validation
and validation tests.

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-06-18 08:05:35 -07:00
Kubernetes Prow Robot
b7fa33ec15
Merge pull request #77703 from ddebroy/inline-mig-1
API changes to support migration of inline in-tree volumes to CSI
2019-05-31 12:23:19 -07:00
j-griffith
123f1bac35 Enable PVC as DataSource for PVC creation
This enables the ability to specify and existing PVC as a DataSource in
a new PVC Spec (eg "clone" and existing volume).
2019-05-31 06:06:44 -06:00
wangqingcan
52f3380ef3 change preempting to PreemptionPolicy 2019-05-31 12:42:05 +08:00
Deep Debroy
c34309acdf API changes to support CSI migration of inline volumes
Signed-off-by: Deep Debroy <ddebroy@docker.com>
2019-05-30 09:34:47 +00:00