Commit Graph

3973 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
a776bf0462
Merge pull request #116335 from gnufied/update-api-recovery-apis
Update api recovery apis
2023-07-17 14:52:35 -07:00
Hemant Kumar
2e217e8cea Reduce duplication between helpers for checking featuregate 2023-07-17 15:34:45 -04:00
Hemant Kumar
e011187114 Update code to use new generic allocatedResourceStatus field 2023-07-17 15:30:35 -04:00
Gunju Kim
6aeff13def
Never drop the terminationGracePeriodSeconds of a probe 2023-07-18 01:34:02 +09:00
Kubernetes Prow Robot
b908e2710a
Merge pull request #113245 from pacoxu/dup-ports-warning
add warning for dup ports in containers[*].ports and service.ports
2023-07-15 00:31:15 -07:00
Paco Xu
df0d51d3b3 add some detailed message for dup container ports(steal from thockin) 2023-07-15 08:02:33 +08:00
Shiming Zhang
14b09c414a Add DownwardAPI validation for status.hostIPs 2023-07-14 09:35:31 +08:00
Shiming Zhang
dacb689002 Add dropDisabledStatusFields 2023-07-14 09:35:30 +08:00
Kubernetes Prow Robot
a9e40bd7c6
Merge pull request #114307 from rphillips/promote_probe_termination_grace_period
ProbeTerminationGracePeriod promote to GA
2023-07-13 13:41:38 -07:00
Patrick Ohly
444d23bd2f dra: generated name for ResourceClaim from template
Generating the name avoids all potential name collisions. It's not clear how
much of a problem that was because users can avoid them and the deterministic
names for generic ephemeral volumes have not led to reports from users. But
using generated names is not too hard either.

What makes it relatively easy is that the new pod.status.resourceClaimStatus
map stores the generated name for kubelet and node authorizer, i.e. the
information in the pod is sufficient to determine the name of the
ResourceClaim.

The resource claim controller becomes a bit more complex and now needs
permission to modify the pod status. The new failure scenario of "ResourceClaim
created, updating pod status fails" is handled with the help of a new special
"resource.kubernetes.io/pod-claim-name" annotation that together with the owner
reference identifies exactly for what a ResourceClaim was generated, so
updating the pod status can be retried for existing ResourceClaims.

The transition from deterministic names is handled with a special case for that
recovery code path: a ResourceClaim with no annotation and a name that follows
the Kubernetes <= 1.27 naming pattern is assumed to be generated for that pod
claim and gets added to the pod status.

There's no immediate need for it, but just in case that it may become relevant,
the name of the generated ResourceClaim may also be left unset to record that
no claim was needed. Components processing such a pod can skip whatever they
normally would do for the claim. To ensure that they do and also cover other
cases properly ("no known field is set", "must check ownership"),
resourceclaim.Name gets extended.
2023-07-11 14:23:48 +02:00
Todd Neal
ea1eb7f8f7
implement sidecar resource calculation 2023-07-08 07:26:13 +09:00
Gunju Kim
5d26bcd468 Sidecar: API changes
- Add SidecarContaienrs feature gate
- Add ContainerRestartPolicy type
- Add RestartPolicy field to the Container
- Drop RestartPolicy field if the feature is disabled
- Add validation for the SidecarContainers
- Allow restartable init containaers to have a startup probe
2023-07-07 21:39:34 +00:00
Giuseppe Scrivano
531d38e323
features: rename UserNamespacesStatelessPodsSupport
now it is called UserNamespacesSupport since all kind of volumes are
supported.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-06-22 15:19:50 +02:00
Kubernetes Prow Robot
9d90b76bd6
Merge pull request #118552 from humblec/rbd-deprecation
deprecate RBD plugin from available in-tree drivers
2023-06-20 16:50:23 -07:00
Humble Chirammal
f54c15d4e8 Change the fieldpath in the deprecated plugin response
Signed-off-by: Humble Chirammal <humble.devassy@gmail.com>
Signed-off-by: carlory <baofa.fan@daocloud.io>
2023-06-16 19:47:03 +05:30
Humble Chirammal
471fd1ae8a deprecate RBD plugin from available in-tree drivers
Based on https://groups.google.com/g/kubernetes-sig-storage/c/h5751_B5LQM, the
consensus was to start the deprecation in v1.28.

This commit start the deprecation process of RBD plugin from in-tree
drivers.

ACTION REQUIRED:
   RBD volume plugin ( `kubernetes.io/rbd`) has been deprecated in this release
   and will be removed in a subsequent release. Alternative is to use RBD CSI driver
   (https://github.com/ceph/ceph-csi/) in your Kubernetes Cluster.

Signed-off-by: Humble Chirammal <humble.devassy@gmail.com>
2023-06-16 19:45:36 +05:30
Aldo Culquicondor
c27f9fdeb7
Add warnings for big number of completions and parallelism
Change-Id: I63e192b1ce9da7d8bb04f8be1a6e19ec6fbbfa5a
2023-06-14 10:38:42 -04:00
Kubernetes Prow Robot
d93e1e95ff
Merge pull request #118548 from thockin/remove-warn-dup-volume-names
Remove unreachable warning on volume name dup
2023-06-08 19:44:12 -07:00
Humble Chirammal
fdc49f5257 Return deprecation warning for storageOS,PhotonPD,ScaleIO..etc
Thes plugins are deprecated in earlier version of Kubernetes, however
the PVspec was not validated and provided enough warning that, these
are deprecated plugins. This commit add the warning and unit tests
for the same.

Signed-off-by: Humble Chirammal <humble.devassy@gmail.com>
2023-06-08 13:37:36 +05:30
Kubernetes Prow Robot
af99df6a6b
Merge pull request #118547 from thockin/fix-dup-env-var-warn
Fix warnings on "duplicate" env vars
2023-06-07 22:58:12 -07:00
Tim Hockin
151509fb74
Remove unreachable warning on volume name dup
Volume names are validated to be unique and always have been.  The cited
issues are all about apply getting messed up, not the aspiserver
allowing dups.

```
$ k create -f /tmp/bad.yaml
The Deployment "bad-volumes-test" is invalid: spec.template.spec.volumes[1].name: Duplicate value: "config"

$ k apply --server-side -f /tmp/bad.yaml
Error from server: failed to create typed patch object (default/bad-volumes-test; apps/v1, Kind=Deployment): .spec.template.spec.volumes: duplicate entries for key [name="config"]

$ k apply -f /tmp/bad.yaml -o json | jq '.spec.template.spec.volumes'
The Deployment "bad-volumes-test" is invalid: spec.template.spec.volumes[1].name: Duplicate value: "config"
```
2023-06-07 17:14:49 -07:00
Tim Hockin
0ddaa7f7c9
Fix warnings on "duplicate" env vars
Some use-cases are not actually wrong
2023-06-07 15:59:36 -07:00
Paco Xu
7a80d7c839 add warning for duplicate containers[*].ports with the same port, protocol, hostPort, and hostIP 2023-06-06 14:52:48 +08:00
Humble Chirammal
c009667c6c deprecate CephFS plugin from available in-tree drivers.
https://groups.google.com/a/kubernetes.io/g/dev/c/g8rwL-qnQhk
based on above, the consensus was to start the deprecation in v1.28.

This commit start the deprecation process of CephFS plugin from
in-tree drivers.

Signed-off-by: Humble Chirammal <humble.devassy@gmail.com>
2023-06-05 23:26:43 +05:30
Kubernetes Prow Robot
0bb17a88fa
Merge pull request #116741 from gjkim42/promote-expanded-dns-config-to-ga
Promote ExpandedDNSConfig feature to the GA stage
2023-05-30 18:19:56 -07:00
Paco Xu
64c9070f8d add pod containers[*].port duplicate warning 2023-05-30 10:57:04 +08:00
Kubernetes Prow Robot
2f0c2e50d4
Merge pull request #117036 from haoruan/bugfix/warning-on-deprecated-annotations
emit warning on deprecated annotation volume.beta.kubernetes.io/storage-class
2023-05-16 11:59:37 -07:00
Hao Ruan
19ae103e82 emit warning on deprecated annotation volume.beta.kubernetes.io/storage-class 2023-05-16 10:19:01 +08:00
Daniel Smith
1ffe3f467e lavalamp is taking a long break 2023-05-11 16:43:38 +00:00
Ryan Phillips
ae08fe1e19 ProbeTerminationGracePeriod promote to GA 2023-05-05 14:27:54 -05:00
Gunju Kim
b249b4ca9b
Promote ExpandedDNSConfig feature to the GA stage 2023-05-04 20:37:10 +09:00
Stephen Kitt
4911e9de4a
api: replace intstr.FromInt with intstr.FromInt32
This touches cases where FromInt() is used on numeric constants, or
values which are already int32s, or int variables which are defined
close by and can be changed to int32s with little impact.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2023-05-01 09:16:15 +02:00
Kubernetes Prow Robot
c9180e445c
Merge pull request #117025 from sanposhiho/warning-in-empty-selector
feature(pkg/api): warning for Pod with null labelSelector in PodAffinity and TopologySpread
2023-04-13 16:00:39 -07:00
Tim Hockin
bc302fa414
Replace uses of ObjectReflectDiff with cmp.Diff
ObjectReflectDiff is already a shim over cmp.Diff, so no actual output
or behavior changes
2023-04-12 08:48:03 -07:00
Tim Hockin
dd7af241c1
Replace diff.ObjectDiff with cmp.Equal
More obvious and cheaper, and ObjectDiff is already written in terms of
cmp.
2023-04-12 08:45:32 -07:00
Tim Hockin
97bab44cae
Replace apimachinery diff.StringDiff with cmp
I forced failures of most of these tests and verified readability
2023-04-12 08:45:31 -07:00
Kubernetes Prow Robot
f5401624ee
Merge pull request #117171 from brianpursley/kubectl-1110-tests
Add unit tests showing the effect of unlimited containers when calculating pod limits
2023-04-11 21:17:35 -07:00
Kubernetes Prow Robot
d0fc9d16ce
Merge pull request #114800 from haoruan/feature-8976-spew-sprintf-refactor
Capture spew.Sprintf() with all our favorite config into a util func
2023-04-11 15:34:57 -07:00
Brian Pursley
b04ca79445 Add unit tests showing the effect of unlimited containers when calculating pod limits.
This behavior is surprising to some users (see kubectl issues #1110 and #1385), who expect that an unlimited container will result in an unlimited pod, but that is not how PodLimits() works, as it ignores any containers that do not specify limits when calculating the pod limits.

This commit adds unit tests that confirm this behavior.
2023-04-08 18:55:45 -04:00
Kensei Nakada
e389d140ae fix as suggested 2023-04-01 10:34:57 +00:00
Kensei Nakada
ffcf3ee6f8 feature(pkg/api): warning for Pod with null labelSelector in PodAffinity and TopologySpread 2023-03-31 02:15:04 +00:00
Hao Ruan
f638e2849f replaced spew.Sprintf with a util pretty print function 2023-03-27 09:24:22 +08:00
Rob Scott
9e571c0424
Adding validation for topology annotations
Change-Id: I50b3b05b859c69e98daca7c8fca0d3a76024eb80
2023-03-15 18:37:02 +00:00
Kubernetes Prow Robot
9053b5dc2c
Merge pull request #116119 from vinaykul/restart-free-pod-vertical-scaling-fixes
Restructure resize policy naming and set default resize policy values
2023-03-14 19:26:42 -07:00
Patrick Ohly
29941b8d3e api: resource.k8s.io v1alpha1 -> v1alpha2
For Kubernetes 1.27, we intend to make some breaking API changes:
- rename PodScheduling -> PodSchedulingHints (https://github.com/kubernetes/kubernetes/issues/114283)
- extend ResourceClaimStatus (https://github.com/kubernetes/enhancements/pull/3802)

We need to switch from v1alpha1 to v1alpha2 for that.
2023-03-14 07:52:03 +01:00
vinay kulkarni
9a805db010 Set default resize policy only for specified resource types, rename RestartNotRequired -> NotRequired 2023-03-12 23:46:40 +00:00
vinay kulkarni
8b23497ae7 Restructure naming of resource resize restart policy 2023-03-12 23:11:32 +00:00
Kubernetes Prow Robot
3c6e419cc3
Merge pull request #116450 from vinaykul/restart-free-pod-vertical-scaling-api
Rename ContainerStatus.ResourcesAllocated to ContainerStatus.AllocatedResources
2023-03-12 16:06:40 -07:00
Kubernetes Prow Robot
0010333bdd
Merge pull request #116161 from danielvegamyhre/mutable-scheduling-directives
Mutable pod scheduling directives
2023-03-10 12:40:58 -08:00
Daniel Vega-Myhre
86f41dc012 mutable pod scheduling directives 2023-03-10 18:30:09 +00:00