Commit Graph

115488 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
e77ca49022
Merge pull request #114898 from AxeZhan/volumerestrictions
feature(volume_restrictions): return Skip in PreFilter
2023-04-11 15:35:04 -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
Kubernetes Prow Robot
eb78b75a2c
Merge pull request #114746 from yangjunmyfm192085/fixtestcase
fix test cases that may be incorrect
2023-04-11 15:34:50 -07:00
Naman Lakhwani
9c15d75f23
Migrated pod-security-admission to contextual logging (#114471)
* migrated pod-security-admission to contextual logging

Signed-off-by: Naman <namanlakhwani@gmail.com>

* updating test files for contextual logging

Signed-off-by: Naman <namanlakhwani@gmail.com>

* smalll nit

Signed-off-by: Naman <namanlakhwani@gmail.com>

* doing inline if

Signed-off-by: Naman <namanlakhwani@gmail.com>

---------

Signed-off-by: Naman <namanlakhwani@gmail.com>
2023-04-11 15:34:43 -07:00
Kubernetes Prow Robot
4e6da50c56
Merge pull request #113800 from pacoxu/patch-4
add sig/storage label for pkg/controller/volume package PR
2023-04-11 15:34:31 -07:00
Kensei Nakada
2bed67d0f1 Revert "Optimization on running prePreEnqueuePlugins before adding pods into activeQ"
This reverts commit c01fa8279d.
2023-04-11 22:28:42 +00:00
Tim Hockin
73eb7c0930
Codegen: easier to read logs for subproject output 2023-04-11 15:19:27 -07:00
Tim Hockin
bbbb695060
Codegen: subproject: chdir to the project dir
This makes it feel more like an API to be used in other repos (which is
really what it is for).
2023-04-11 15:18:08 -07:00
Tim Hockin
893ec0ca45
Codegen: simpler k8s.io/code-generator/examples
This moves the hack/ directory and scripts to the examples dir, which is
a distinct module.  This avoids some Go unpleasantness around module
boundaries and just makes more sense.
2023-04-11 14:19:45 -07:00
Kubernetes Prow Robot
5463fcd7dd
Merge pull request #116280 from thockin/codegen_no_internal_subprojects
Codegen: streamline code for subproject generation
2023-04-11 14:16:32 -07:00
Tim Hockin
af29cca6ce
Codegen: new tools will not become part of 'all' 2023-04-11 12:47:45 -07:00
Tim Hockin
5f7345deaa
Codegen subprojects: consolidate generate-*groups
They both still exist, with the same API as before, but now
generate-groups calls generate-internal-groups, which is a superset.
2023-04-11 12:46:53 -07:00
Tim Hockin
95e614b371
Codegen subprojects: deprecate "all" in scripts
Replace "all" with the historical meaning of it in the generate-groups
scripts.
2023-04-11 12:45:45 -07:00
Tim Hockin
a94ed5b8ac
Codegen metrics: include v1beta2
This is why these scripts are terrible - open-coded lists always drift.
We will have to tackle that later.
2023-04-11 12:45:45 -07:00
Tim Hockin
8b68e063e1
Codegen subprojects: regen defaulters when needed
If you manually remove generated defaults, they do not get regenerated
without this.
2023-04-11 12:45:44 -07:00
Tim Hockin
5200f4b0d3
Codegen subprojects: reify 'all' into explicit 2023-04-11 12:45:43 -07:00
Tim Hockin
201653aa87
Trivial change to reduce diffs
This just makes it easier to diff generate-groups and
generate-internal-groups
2023-04-11 12:45:42 -07:00
Hemant Kumar
901dea7307 Fix azure disk e2e after migration 2023-04-11 15:02:25 -04:00
Rodrigo Campos
d212041d51 hack/local-up-cluster.sh: Remove old dynamic certs
When running this script more than once on Debian and Ubuntu, we fail to
chown -R the CERT_DIR due to this file owned by root and the CERT_DIR
owned by the unprivileged user running the script.

Let's remove the file, that is something we can always do, before
generating the certs. This fixes the problem on Debian and Ubuntu local
setups.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-04-11 20:09:47 +02:00
Kubernetes Release Robot
ed5dd38dcd CHANGELOG: Update directory for v1.27.0 release 2023-04-11 17:27:35 +00:00
Patrick Ohly
464edfe6f6 test/integration: create nodes directly with kubernetes.io/hostname label
By generating the unique name in advance, the label also can be set to a
matching value directly in the Create request. This makes test startup in
test/integration/scheduler_perf a bit faster because the extra patching can be
avoided.

It also leads to a better label because previously, the unique label value
didn't match the node name. This is required for simulating dynamic resource
allocation, which relies on the label to track where an allocated claim is
available.
2023-04-11 16:35:37 +02:00
David Porter
d04d7ffa6e kubelet: Mark new terminal pods as non-finished in pod worker
The pod worker may recieve a new pod which is marked as terminal in
the runtime cache. This can occur if a pod is marked as terminal and the
kubelet is restarted.

The kubelet needs to drive these pods through the termination state
machine. If upon restart, the kubelet receives a pod which is terminal
based on runtime cache, it indicates that pod finished
`SyncTerminatingPod`, but it did not complete `SyncTerminatedPod`. The
pod worker needs ensure that `SyncTerminatedPod` will run on these pods.
To accomplish this, set `finished=False`, on the pod sync status, to
drive the pod through the rest of the state machine.

This will ensure that status manager and other kubelet subcomponents
(e.g. volume manager), will be aware of this pod and properly cleanup
all of the resources of the pod after the kubelet is restarted.

While making change, also update the comments to provide a bit more
background around why the kubelet needs to read the runtime pod cache
for newly synced terminal pods.

Signed-off-by: David Porter <david@porter.me>
2023-04-11 01:39:05 -07:00
David Porter
0020631985 test: Add node e2e to restart kubelet while pod is terminating
Add a regression test for https://issues.k8s.io/116925. The test
exercises the following:

1) Start a restart never pod which will exit with
   `v1.PodSucceeded` phase.
2) Start a graceful deletion of the pod (set a deletion timestamp)
3) Restart the kubelet as soon as the kubelet reports the pod is
   terminal (but before the pod is deleted).
4) Verify that after kubelet restart, the pod is deleted.

As of v1.27, there is a delay between the pod being marked terminal
phaes, and the status manager deleting the pod. If the kubelet is
restarted in the middle, after starting up again, the kubelet needs to
ensure the pod will be deleted on the API server.

Signed-off-by: David Porter <david@porter.me>
2023-04-11 01:39:05 -07:00
Patrick Ohly
aa73f06e56 scheduler perf: allow creating 0 items
It makes sense to define a test where, depending on the parameters, some
operation creations zero pods, namespaces or nodes. The validation didn't allow
that previously due to the way how it was implemented although the underlying
code works fine with zero as count.
2023-04-11 09:59:16 +02:00
Patrick Ohly
49bbf7c268 scheduler_perf: fix race condition
collector.collect got called without ensuring that collector.run had
terminated, so it could have happened that collector.run adds another sample
while collector.collect is reading them.
2023-04-11 09:46:34 +02:00
Patrick Ohly
a869a89825 scheduler perf: remove cleanup func
b.Cleanup may as well get called inside the function instead
of leaving that to the caller.
2023-04-11 09:43:45 +02:00
Nikhita Raghunath
b039a2ff2c Add new contribex leads to sig-contribex-approvers 2023-04-10 12:34:03 +05:30
Sathyanarayanan Saravanamuthu
9363afc650 Fixing broken tests
Signed-off-by: Sathyanarayanan Saravanamuthu <sathyanarays@vmware.com>
2023-04-10 11:18:09 +05:30
Guy Templeton
d102a6fea5
HPA Controller - Update Owners
Move josephburnett to emeritus status
2023-04-09 22:44:20 +01:00
sarab
8d18ae6fc2 Use the generic Set in scheduler 2023-04-09 11:34:17 +05:30
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
Jongwoo Han
1dec97436c
Fix typo at job_test.go
Signed-off-by: jongwooo <jongwooo.han@gmail.com>
2023-04-09 01:47:42 +09:00
guangli.bao
046bb89256 supported version of etcd 3.5.7-0 for Kubernetes v1.27.0-rc.0
Signed-off-by: guangli.bao <guangli.bao@daocloud.io>
2023-04-08 17:56:21 +08:00
Lukasz Szaszkiewicz
f138d29bf2 watchcache: currentCapacity acquires read lock 2023-04-07 10:16:46 +02:00
Alexandru Matei
c77ad3116f kubelet: fix setup of emptyDir with sizeLimit (fsquota)
When size limit is specified subsequent invocations will fail because
ibytes is changed to -1 and stored internally in quotaSizeMap during the
first call.  Later invocation will see that the requested size doesn't
match the actual stored value and it will fail.

Signed-off-by: Alexandru Matei <alexandru.matei@uipath.com>
2023-04-07 11:07:51 +03:00
Samuel Karp
ea74a2d877
cpumanager: fix typo in godoc
Signed-off-by: Samuel Karp <samuelkarp@google.com>
2023-04-06 16:48:24 -07:00
Kubernetes Release Robot
ad18954259 CHANGELOG: Update directory for v1.27.0-rc.1 release 2023-04-06 20:17:16 +00:00
Kubernetes Prow Robot
d152baf143
Merge pull request #117134 from xmudrii/pub-bot-go1198
Update publishing-bot rules for release branches to Go 1.19.8
2023-04-06 09:25:47 -07:00
John Howard
1cce3b3e2f wait: fix incorrect suggested method
Followup to https://github.com/kubernetes/kubernetes/pull/107826. The
referenced method doesn't exist.

This leads to confusing lint's with 1.27. I would recommend a backport
to 1.27 but not sure if that aligns with the release schedule.
2023-04-06 08:01:41 -07:00
Davanum Srinivas
d3ae6c2df3
Specify KUBE_ROOT for test-e2e-node/AWS to work
test-e2e-node for AWS is out-of-tree so that we won't need to vendor
in AWS related packages. For this to work, some of the scripts/golang
code need to know where the k8s tree is git cloned.

So let's add an option to lookup the env var, so that we can then,
change directory to this specified directory to run some make commands

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-04-06 10:42:17 -04:00
Arda Güçlü
d9bd22115f Alias deprecated genericclioptions.IOStreams with new one 2023-04-06 16:32:16 +03:00
Sathyanarayanan Saravanamuthu
26b35ce36a Remove endpoint related RBAC from scheduler cluster role 2023-04-06 17:40:52 +05:30
Kubernetes Prow Robot
54348233b5
Merge pull request #115036 from harche/vol_attach_log
Do not log entire pod struct while attaching the volume
2023-04-06 03:07:47 -07:00
Marko Mudrinić
4e0bc2397d
Update publishing-bot rules for release branches to Go 1.19.8
Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
2023-04-06 10:31:33 +02:00
Kubernetes Prow Robot
f28e9f6f45
Merge pull request #117126 from xmudrii/iptables-go1203
Update distroless-iptables to v0.2.3
2023-04-05 21:41:47 -07:00
Harshal Patil
1972dd1005 Do not log entire pod struct while attaching the volume
Signed-off-by: Harshal Patil <harpatil@redhat.com>
2023-04-05 20:24:12 -04:00
Marko Mudrinić
b19c362bf5
Update distroless-iptables to v0.2.3
Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
2023-04-06 01:37:14 +02:00
Kubernetes Prow Robot
20fc8a939c
Merge pull request #117125 from xmudrii/go1203
[go] Bump images, dependencies and versions to go 1.20.3
2023-04-05 16:35:50 -07:00
Marko Mudrinić
2a69edb43d
[go] Bump images, dependencies and versions to go 1.20.3
Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
2023-04-05 23:46:34 +02:00
Damien Grisonnet
08a324bf51 cluster/addons: set metrics-resolution to 15s
Align metrics-server metrics-resolution with the upstream manifests so
that scalability tests are running a similar configuration of
metrics-server as the one we are running in the e2e tests.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2023-04-05 20:07:04 +02:00