Commit Graph

1050 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
bdaa6bb617
Merge pull request #114776 from jsafrane/pv-secret-validation
Allow SecretReference.Name in PVs to have 253 characters
2023-01-18 10:54:34 -08:00
Kubernetes Prow Robot
696701b9fd
Merge pull request #114086 from xmcqueen/113935
block ephemeral container addition to static pods
2023-01-13 07:36:28 -08:00
TommyStarK
c242e647ae pkg/apis: Replace deprecated pointer function
Signed-off-by: TommyStarK <thomasmilox@gmail.com>
2023-01-08 13:14:37 +01:00
Kubernetes Prow Robot
e119680318
Merge pull request #114784 from TommyStarK/pkg-apis/replace-deprecated-pointer-function
pkg/apis: Replace deprecated pointer function
2023-01-05 11:08:09 -08:00
TommyStarK
f166a52573 pkg/apis: Replace deprecated pointer function
Signed-off-by: TommyStarK <thomasmilox@gmail.com>
2023-01-05 11:48:05 +01:00
Kubernetes Prow Robot
ac889a0251
Merge pull request #113581 from aimuz/verify-tls-secret
Verify that the key matches the cert
2023-01-04 14:29:58 -08:00
Jan Safranek
e743a6d14d Allow SecretReference.Name in PVs to have 253 characters
PV.Spec.CSI.*SecretReference.Name should be allowed to have up to be
limited to 253 characters (DNS1123Subdomain) and not to 63 characters
(DNS1123Label), so all possible Secrets names can be used as secrets in a
PV.

This is continuation of
https://github.com/kubernetes/kubernetes/pull/108331 / Kubernetes 1.25,
which allowed updating PVs with long secret names, if the previous PV had
long secret name too. This makes sure downgrade from 1.27 to 1.26 works well
and allows PVs created in 1.27 to be updated in 1.26.

Now the long secret names are accepted during PV creation too.
2023-01-03 14:35:35 +01:00
Tim Hockin
57b9656e2b
Remove old comments about IPv6 not being ready 2022-12-23 11:06:44 -08:00
Kubernetes Prow Robot
2f2021e208
Merge pull request #114412 from thockin/api_warn_workloads_name_not_dnslabel
Issue API warnings when workload names are not DNS labels
2022-12-16 18:07:41 -08:00
Tim Hockin
276c7e860d
Change DNS Label validation to check for dots
This will produce a better error message for the more common case of
using a DNS subdomain where a label is needed.
2022-12-16 13:01:02 -08:00
Kubernetes Prow Robot
3d3a180713
Merge pull request #113942 from mengjiao-liu/remove-feature-gate-expansion
Remove volume expansion feature gates
2022-12-15 10:05:38 -08:00
Mengjiao Liu
ba9dbe3a07 Remove ExpandCSIVolumes feature gate 2022-12-15 11:43:44 +08:00
Kubernetes Prow Robot
cb03415326
Merge pull request #111802 from maaoBit/fix-labelSelectorValidate-missing
Validate labelSelector in topologySpreadConstraints
2022-12-12 18:47:44 -08:00
aimuz
4a7ab7fd75
Verify that the key matches the cert
Signed-off-by: aimuz <mr.imuz@gmail.com>
2022-12-13 10:43:58 +08:00
Tim Hockin
dd0a50336e
ServiceInternalTrafficPolicyType: s/Type//
Rename ServiceInternalTrafficPolicyType => ServiceInternalTrafficPolicy
2022-12-11 13:48:31 -08:00
Tim Hockin
d0e2b06850
ServiceExternalTrafficPolicyType: s/Type//
Rename ServiceExternalTrafficPolicyType => ServiceExternalTrafficPolicy
2022-12-11 13:48:27 -08:00
Brian McQueen
25e990f738 added validation check to block adding an ephemeral container to a static pod and test cases 2022-12-02 15:39:11 -08:00
maao
a796707396 Validate labelSelector in topologySpreadConstraints
Signed-off-by: maao <maao420691301@gmail.com>
2022-11-28 09:46:46 +08:00
Kubernetes Prow Robot
d1c0171aed
Merge pull request #111023 from pohly/dynamic-resource-allocation
dynamic resource allocation
2022-11-11 16:21:56 -08:00
Kubernetes Prow Robot
e4d46148de
Merge pull request #113826 from jsafrane/add-openstack
Add CSI migration of OpenStack Cinder volumes
2022-11-11 11:00:07 -08:00
Patrick Ohly
9683c60c05 api: generated files 2022-11-10 20:22:42 +01:00
Patrick Ohly
7d11b422e3 api: add resource claims to core API
The resource.k8s.io/ClaimTemplate only gets referenced by name, therefore the
changes to the core API are limited.
2022-11-10 20:08:24 +01:00
Jan Safranek
5b284a50b7 Revert "Remove references to openstack and cinder"
This reverts commit 9bbf01bae9.
2022-11-10 18:25:30 +01:00
Takafumi Takahashi
cb12a2bc51 Generate code 2022-11-09 21:21:52 +00:00
Takafumi Takahashi
87c1ca88d4 Add API and validation for CrossNamespaceVolumeDataSource 2022-11-09 20:58:25 +00:00
Michal Wozniak
c803892bd8 Enable the feature into beta 2022-11-09 09:02:40 +01:00
Jordan Liggitt
fc69084bf1
Update workload selector validation 2022-11-07 20:52:02 -05:00
Manjusaka
0843c4dfca
Add extra value validation for matchExpression field in LabelSelector 2022-11-07 20:48:21 -05:00
Kubernetes Prow Robot
c326b2713f
Merge pull request #113500 from kerthcet/feat/graduate-nodeInclusionPoplicy-to-beta
Graduate kube-scheduler NodeInclusionPolicy to beta
2022-11-07 16:01:08 -08:00
Kubernetes Prow Robot
68875cf4a7
Merge pull request #113047 from everpeace/improve-supplemental-groups-description
Improve the API  description of `PodSecurityContext.SupplementalGroups` to clarify its unfamiliar behavior
2022-11-07 16:01:00 -08:00
Michal Wozniak
52cd6755eb Add pod disruption conditions for kubelet initiated failures 2022-11-07 11:23:22 +01:00
Shingo Omura
ac1d5fdf37
Improve the description of PodSecurityContext.SupplementalGroups (including cri-api)
so that it explicitly describe group information defined in the
container image will be kept. This also adds e2e test case of
SupplementalGroups with pre-defined groups in the container
image to make the behaivier clearer.
2022-11-06 10:03:13 +09:00
Kubernetes Prow Robot
8c77820759
Merge pull request #113274 from Huang-Wei/kep-3521-A
[KEP-3521] Part 1: New Pod API .spec.schedulingGates
2022-11-03 21:24:25 -07:00
Wei Huang
fc831d7088
Automated codegen 2022-11-03 14:32:35 -07:00
Wei Huang
7b6293b6b6
APIs, Validation and condition enforcements
- New API field .spec.schedulingGates
- Validation and drop disabled fields
- Disallow binding a Pod carrying non-nil schedulingGates
- Disallow creating a Pod with non-nil nodeName and non-nil schedulingGates
- Adds a {type:PodScheduled, reason:WaitingForGates} condition if necessary
- New literal SchedulingGated in the STATUS column of `k get pod`
2022-11-03 14:32:34 -07:00
Andy Voltz
29f4862ed8 Promote ServiceInternalTrafficPolicy to GA 2022-11-03 13:17:03 -04:00
Kubernetes Prow Robot
c98aef484d
Merge pull request #112895 from nokia/kep-1435-GA
KEP-1435 Mixed Protocol values in LoadBalancer Service GA
2022-11-03 05:43:35 -07:00
Laszlo Janosi
82ce61afc7 KEP-1435 Mixed Protocol values in LoadBalancer Service GA
Removed the unit tests that test the cases when the MixedProtocolLBService feature flag was false - the feature flag is locked to true with GA
Added an integration test to test whether the API server accepts an LB Service with different protocols.
Added an e2e test to test whether a service which is exposed by a multi-protocol LB Service is accessible via both ports.
Removed the conditional validation that compared the new and the old Service definitions during an update - the feature flag is locked to true with GA.
2022-11-02 13:44:52 +02:00
Roman Bednar
8d48c107a7 fix unit tests 2022-11-02 10:14:58 +01:00
Mark Rossetti
498d065cc5
Promoting WindowsHostProcessContainers to stable
Signed-off-by: Mark Rossetti <marosset@microsoft.com>
2022-11-01 14:06:25 -07:00
kerthcet
8d78b37d84 Feat: graduate NodeInclusionPolicy to beta
Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-11-01 16:01:59 +08:00
Kubernetes Prow Robot
525280d285
Merge pull request #112643 from SergeyKanzhelev/removeDynamicKubeletConfig
remove DynamicKubeletConfig feature gate from the code
2022-10-12 01:33:00 -07:00
Sergey Kanzhelev
3f3bb7fd94 added limit value to the pod validation error to simplify debugging 2022-10-07 20:38:08 +00:00
Benjamin Elder
cee4ee074d emeritus fejta, Erick is inactive after leaving google for spaceX 2022-10-04 17:07:35 -07:00
RainbowMango
de09b70f69 Remove redundant type conversion.
Signed-off-by: RainbowMango <qdurenhongcai@gmail.com>
2022-09-24 15:19:35 +08:00
Sergey Kanzhelev
39e49a91d7 remove DynamicKubeletConfig feature gate from the code 2022-09-23 23:14:19 +00:00
Kubernetes Prow Robot
969d416bc4
Merge pull request #112603 from humblec/var-3
fix typos in pkg/validation and test/cmd
2022-09-21 19:11:02 -07:00
Humble Chirammal
6621db7dd1 fix typos in pkg/validation and test/cmd
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-09-20 19:12:17 +05:30
Andrew Sy Kim
525a2b183c remove +featureGate=LoadBalancerClass tag in service.spec.loadBalancerClass
Signed-off-by: Andrew Sy Kim <andrewsy@google.com>
2022-09-19 14:55:14 -04:00
Jordan Liggitt
42bb7bb458
Tolerate sub-microsecond eventTime changes on update 2022-09-01 15:47:37 -04:00
Davanum Srinivas
9bbf01bae9
Remove references to openstack and cinder
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-08-22 16:43:14 -04:00
Omer Tuchfeld
eb317ecd40 Fix capture loop vars in parallel or ginkgo tests
Fixes instances of #98213 (to ultimately complete #98213 linting is
required).

This commit fixes a few instances of a common mistake done when writing
parallel subtests or Ginkgo tests (basically any test in which the test
closure is dynamically created in a loop and the loop doesn't wait for
the test closure to complete).

I'm developing a very specific linter that detects this king of mistake
and these are the only violations of it it found in this repo (it's not
airtight so there may be more).

In the case of Ginkgo tests, without this fix, only the last entry in
the loop iteratee is actually tested. In the case of Parallel tests I
think it's the same problem but maybe a bit different, iiuc it depends
on the execution speed.

Waiting for the CI to confirm the tests are still passing, even after
this fix - since it's likely it's the first time those test cases are
executed - they may be buggy or testing code that is buggy.

Another instance of this is in `test/e2e/storage/csi_mock_volume.go` and
is still failing so it has been left out of this commit and will be
addressed in a separate one
2022-08-15 16:28:50 +02:00
Kubernetes Prow Robot
759785ea14
Merge pull request #109090 from sarveshr7/multicidr-rangeallocator
Enhance NodeIPAM to support multiple ClusterCIDRs
2022-08-07 15:40:18 -07:00
Sarvesh Rangnekar
7093b10416 Introduce networking/v1alpha1 api, ClusterCIDR type
Introduce networking/v1alpha1 api group.

Add `ClusterCIDR` type to networking/v1alpha1 api group, this type
will enable the NodeIPAM controller to support multiple ClusterCIDRs.
2022-08-05 00:54:00 +00:00
Jonathan Dobson
0ee8fed853 Add conformance test for CSIInlineVolume feature 2022-08-04 13:06:30 -06:00
Kubernetes Prow Robot
4b6134b6dc
Merge pull request #111090 from kinvolk/rata/userns-support-2022
Add support for user namespaces phase 1 (KEP 127)
2022-08-03 13:05:47 -07:00
Rodrigo Campos
8dc98c9b8e Update autogenerated files
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2022-08-03 19:53:22 +02:00
Rodrigo Campos
cf8164bccf apis: add validation for HostUsers
This commit just adds a validation according to KEP-127. We check that
only the supported volumes for phase 1 of the KEP are accepted.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2022-08-03 19:53:22 +02:00
Giuseppe Scrivano
9e9b23fd3c
pkg/apis, staging: add HostUsers to pod spec
It is used to request that a pod runs in a unique user namespace.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
Co-authored-by: Rodrigo Campos <rodrigoca@microsoft.com>
2022-08-02 23:47:58 +02:00
Roman Bednar
caf2f41084 add tests for pvc update validation 2022-08-02 20:52:04 +02:00
Roman Bednar
f051cc7e0e allow pvc spec StorageClass name mutation if the feature is enabled 2022-08-02 20:52:04 +02:00
Roman Bednar
0f0d61f91c pass down feature gate to PVC validation opts 2022-08-02 20:52:04 +02:00
Michal Wozniak
04fcbd721c Introduction of a pod condition type indicating disruption. Its reason field indicates the reason:
- PreemptionByKubeScheduler (Pod preempted by kube-scheduler)
- DeletionByTaintManager (Pod deleted by taint manager due to NoExecute taint)
- EvictionByEvictionAPI (Pod evicted by Eviction API)
- DeletionByPodGC (an orphaned Pod deleted by PodGC)PreemptedByScheduler (Pod preempted by kube-scheduler)
2022-08-02 11:12:16 +02:00
Tim Hockin
0e1c15e099 Remove some unused functions 2022-08-01 23:52:46 -07:00
Sascha Grunert
584783ee9f
Partly remove support for seccomp annotations
We now partly drop the support for seccomp annotations which is planned
for v1.25 as part of the KEP:

https://github.com/kubernetes/enhancements/issues/135

Pod security policies are not touched by this change and therefore we
have to keep the annotation key constants.

This means we only allow the usage of the annotations for backwards
compatibility reasons while the synchronization of the field to
annotation is no longer supported. Using the annotations for static pods
is also not supported any more.

Making the annotations fully non-functional will be deferred to a
future release.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2022-08-01 09:19:29 +02:00
Kubernetes Prow Robot
d046a58de4
Merge pull request #111506 from sanwishe/event_validation
Correct event validation messages using the core/v1 field name `reportingComponent`
2022-07-31 22:00:28 -07:00
Kubernetes Prow Robot
3902a53419
Merge pull request #111441 from denkensk/respect-topology
Respect PodTopologySpread after rolling upgrades
2022-07-30 01:40:42 -07:00
Alex Wang
86a2a85e7d code generated by script for MatchLabelKeys in TopologySpreadConstraint
Signed-off-by: Alex Wang <wangqingcan1990@gmail.com>
2022-07-30 13:24:55 +08:00
Alex Wang
e6c2bf8516 api defination for MatchLabelKeys in TopologySpreadConstraint
Signed-off-by: Alex Wang <wangqingcan1990@gmail.com>
2022-07-30 13:21:16 +08:00
Kubernetes Prow Robot
cf2800b812
Merge pull request #111402 from verb/111030-ec-ga
Promote EphemeralContainers feature to GA
2022-07-29 19:29:20 -07:00
sanwishe
e88a0478f2 correct event validation messages 2022-07-29 09:42:47 +00:00
Kubernetes Prow Robot
c06031959f
Merge pull request #111401 from verb/111028-container-validation
Improve tests and fix bugs in container validation
2022-07-28 12:43:11 -07:00
Lee Verberne
537e73601d Further cleanup of container validation 2022-07-28 19:38:59 +02:00
Davanum Srinivas
a9593d634c
Generate and format files
- Run hack/update-codegen.sh
- Run hack/update-generated-device-plugin.sh
- Run hack/update-generated-protobuf.sh
- Run hack/update-generated-runtime.sh
- Run hack/update-generated-swagger-docs.sh
- Run hack/update-openapi-spec.sh
- Run hack/update-gofmt.sh

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-07-26 13:14:05 -04:00
Lee Verberne
1dc040082c Refactor container validation
Refactor common validation into methods that validate a single container
and call these methods when iterating the three types of container
lists. Move initContainer-specific validation from validateContainers to
validateInitContainers.

This resolves issues where init and ephemeral containers would return
duplicate or incorrectly formatted errors for problems detected by
validateContainers.
2022-07-26 07:19:56 +02:00
Lee Verberne
dbbbf8502e Improve container validation test coverage
Adds missing tests based on KUBE_COVER and checks that errors returned
by validation are of the type and for the field expected. Fixes tests
that had multiple errors so later failures aren't masked if there's
a regression in only one of the errors.
2022-07-26 07:05:02 +02:00
Lee Verberne
4a7fd2a614 Use structs for container validation test
This introduces no changes to unit tests other than to switch from
map-based to struct-based tables in TestValidateContainers and
TestValidateInitContainers in order to make diffs for later commits
easier to read.
2022-07-26 06:47:43 +02:00
Lee Verberne
d238e67ba6 Remove EphemeralContainers feature-gate checks 2022-07-26 02:55:30 +02:00
Lee Verberne
bc3c5ae269 Remove EphemeralContainers beta disclaimer 2022-07-26 02:53:45 +02:00
Kubernetes Prow Robot
4885f4d750
Merge pull request #111229 from ravisantoshgudimetla/promote-podOS-GA
Promote pod OS  to GA
2022-07-19 10:12:19 -07:00
Kubernetes Prow Robot
b436d3e703
Merge pull request #108331 from humblec/dns
csi: validate the secretnames in CSI spec against NameIsDNSSubdomain
2022-07-19 10:12:07 -07:00
Humble Chirammal
e2ab0f93e6 Add unit tests for allowSubDomainSecret format validation
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-07-19 19:18:15 +05:30
Humble Chirammal
5c92e4b816 csi: validate the secretnames in the CSI spec against NameIsDNSSubdomain
At present the CSI spec secret name validation for ControllerPublish,
ControllerExpand, NodePublish secrets are performed against
ValidateDNS1123Label() and it causes the secret name validation
inside the CSI spec to go wrong if the secret name is more than 63 chars.

Kubernetes allow the secret object name to be on `DNS SubDomainName`
and having a secret name length between 0-253 is correct/valid. So the CSI
spec validation also has to be performed accordingly.

This commit address this issue in validation for above mentioned funcs.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-07-19 19:18:09 +05:30
Ravi Gudimetla
e9ce94edf5 api: Promote PodOS field to GA 2022-07-18 23:27:59 -04:00
Ravi Gudimetla
b79ebb8165 Promote PodOS field to GA 2022-07-18 23:27:58 -04:00
Kubernetes Prow Robot
1c1efde70d
Merge pull request #109639 from Abirdcfly/fixduplicateimport
cleanup: remove all duplicate import
2022-07-18 16:55:23 -07:00
Kubernetes Prow Robot
bd1c9c1c5b
Merge pull request #110388 from sanposhiho/graduate-mindomain-beta
Graduate MinDomains in Pod Topology Spread to beta
2022-07-18 15:36:06 -07:00
Kubernetes Prow Robot
b3057e7ccc
Merge pull request #106834 from mengjiao-liu/sysctl-allow-slashes
Add support for slash as sysctl separator to Pod securityContext field and to PodSecurityPolicy
2022-07-15 01:04:24 -07:00
Abirdcfly
00b9ead02c cleanup: remove duplicate import
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2022-07-14 11:25:19 +08:00
Kensei Nakada
c328841159 Update doc comment 2022-07-11 15:11:04 +00:00
Tim Hockin
55232e2ef7 Rename IPFamilyPolicyType => IPFamilyPolicy 2022-07-06 15:42:26 -07:00
21kyu
df168d5b5c Change reflect.Ptr to reflect.Pointer 2022-06-26 01:23:43 +09:00
Mengjiao Liu
20bb84b3f1 Pod SecurityContext and PodSecurityPolicy supports slash as sysctl separator 2022-06-22 10:24:35 +08:00
Kensei Nakada
27e7d167e6 Graduate MinDomains in Pod Topology Spread to beta 2022-06-20 06:18:45 +00:00
Antonio Ojea
2124f17c72 unit tests for Class E IP addresses 2022-06-08 15:29:48 +02:00
kerthcet
5e3df9a155 amend comment of NodeInclusionPolicy
Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-05-11 07:48:46 +08:00
kerthcet
02f0a3ee91 feat: add NodeInclusionPolicy to TopologySpreadConstraint in PodSpec
Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-05-10 12:54:49 +08:00
Kubernetes Prow Robot
7af5a7bfc5
Merge pull request #109602 from lavalamp/remove-clustername
Finish clustername removal
2022-05-07 08:01:16 -07:00
Kubernetes Prow Robot
af4dceeac2
Merge pull request #109308 from danwinship/traffic-policy-docs
Clarify ExternalTrafficPolicy/InternalTrafficPolicy definitions
2022-05-06 17:23:16 -07:00
Daniel Smith
331525670b Remove ClusterName 2022-05-05 20:12:50 +00:00