Commit Graph

115235 Commits

Author SHA1 Message Date
Wei Huang
fa86f2dce3 benchmark test to evaluate the overhead of podMatchesScopeFunc 2023-05-05 14:46:23 -07:00
Wei Huang
4a2e6971f7 Fix incorrect calculation for ResourceQuota with PriorityClass as its scope 2023-05-05 14:46:23 -07:00
Kubernetes Prow Robot
ddd031617f Merge pull request #117752 from liggitt/automated-cherry-pick-of-#117751-upstream-release-1.27
Automated cherry pick of #117751: Disable NewVolumeManagerReconstruction / SELinuxMountReadWriteOncePod feature gates
2023-05-05 13:51:17 -07:00
Kubernetes Prow Robot
108f028fe7 Merge pull request #117438 from pacoxu/automated-cherry-pick-of-#116675-upstream-release-1.27
Automated cherry pick of #116675 upstream release 1.27
2023-05-05 03:59:13 -07:00
Kubernetes Prow Robot
7352d95edc Merge pull request #117236 from cvvz/automated-cherry-pick-of-#116138-origin-release-1.27
Automated cherry pick of #116138: fix: the volume is not detached after the pod and PVC objects
2023-05-04 14:09:13 -07:00
Jordan Liggitt
7f9b3cb854 Disable NewVolumeManagerReconstruction feature gate 2023-05-04 16:42:50 -04:00
Kubernetes Prow Robot
1c7dc1a184 Merge pull request #117773 from xmudrii/go1204-127
[release-1.27] releng/go: Update images, dependencies and version to Go 1.20.4
2023-05-04 07:24:42 -07:00
Kubernetes Prow Robot
70b1a847a7 Merge pull request #117450 from alexanderConstantinescu/automated-cherry-pick-of-#117388-upstream-release-1.27
Automated cherry pick of #117388: Re-work logic in shouldSyncUpdatedNode
2023-05-04 04:49:05 -07:00
Kubernetes Prow Robot
bcd1aac164 Merge pull request #117445 from HirazawaUi/automated-cherry-pick-of-#117214-upstream-release-1.27
Automated cherry pick of #117214: add log includes pod preemption details
2023-05-04 04:48:53 -07:00
Kubernetes Prow Robot
36e6254100 Merge pull request #117298 from pohly/automated-cherry-pick-of-#117238-origin-release-1.27
Automated cherry pick of #117238: api: encode NamespacedName with lower case in JSON
2023-05-04 04:48:42 -07:00
Kubernetes Prow Robot
b54eb0d063 Merge pull request #117755 from Nordix/automated-cherry-pick-of-#117723-upstream-release-1.27
Automated cherry pick of #117723: Kube-proxy/ipvs: accept access to healthCheckNodePort on LbIP
2023-05-04 03:14:50 -07:00
Kubernetes Prow Robot
3f2a1f84ff Merge pull request #117246 from gnufied/automated-cherry-pick-of-#117216-upstream-release-1.27
Automated cherry pick of #117216: Fix azure disk e2e after migration
2023-05-04 03:14:42 -07:00
Marko Mudrinić
3324649c1c releng/go: Update images, dependencies and version to Go 1.20.4
Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
2023-05-04 10:47:48 +02:00
Kubernetes Prow Robot
23a15d098f Merge pull request #117574 from mpatlasov/automated-cherry-pick-of-#117022-upstream-release-1.27
Automated cherry pick of #117022: Fix directory mismatch for `volume.SetVolumeOwnership()`
2023-05-03 14:04:42 -07:00
Kubernetes Prow Robot
198503443b Merge pull request #117289 from tosi3k/automated-cherry-pick-of-#116950-upstream-release-1.27
Automated cherry pick of #116950: Do not look at VPC-related resources outside the cluster's
2023-05-03 13:04:41 -07:00
Lars Ekman
8af1ce5863 Kube-proxy/ipvs: accept access to healthCheckNodePort on LbIP 2023-05-03 18:38:42 +02:00
Kubernetes Prow Robot
33287eee36 Merge pull request #117369 from smarterclayton/automated-cherry-pick-of-#116995-upstream-release-1.27
Automated cherry pick of #116995: kubelet: Ensure pods that have not started track a
2023-05-03 06:48:13 -07:00
Kubernetes Prow Robot
7d93cc600f Merge pull request #117708 from Jefftree/automated-cherry-pick-of-#117705-upstream-release-1.27
Automated cherry pick of #117705: Update kube-openapi to fix race
2023-05-02 07:16:15 -07:00
Jefftree
86904a7c58 Update kube-openapi to fix race 2023-05-01 21:28:35 +00:00
Kubernetes Prow Robot
3c10a89212 Merge pull request #117433 from bobbypage/automated-cherry-pick-of-#117019-upstream-release-1.27
Automated cherry pick of #117019: kubelet: Mark new terminal pods as non-finished in pod worker
2023-05-01 12:46:11 -07:00
Kubernetes Prow Robot
ad45cea39f Merge pull request #117684 from Nordix/automated-cherry-pick-of-#115019-upstream-release-1.27
Automated cherry pick of #115019: proxy/ipvs: add a GetAllLocalAddressesExcept() function
2023-05-01 09:22:21 -07:00
Kubernetes Prow Robot
110415e329 Merge pull request #117685 from ardaguclu/automated-cherry-pick-of-#117495-upstream-release-1.27
Automated cherry pick of #117495: Use absolute path instead requestURI in openapiv3 discovery
2023-04-29 10:12:16 -07:00
Arda Güçlü
ee1d7eb5d8 Use absolute path instead requestURI in openapiv3 discovery
Currently, openapiv3 discovery uses requestURI to discover resources.
However, that does not work when the rest endpoint contains prefixes
(e.g. `http://localhost/test-endpoint/`).
Because requestURI overwrites prefixes also in rest endpoint
(e.g. `http://localhost/openapiv3/apis/apps/v1`).

Since `absPath` keeps the prefixes in the rest endpoint,
this PR changes to absPath instead requestURI.
2023-04-29 19:18:22 +03:00
Lars Ekman
bbca939c66 proxy/ipvs: don't bind nodeips to the dummy device 2023-04-29 16:45:31 +02:00
Lars Ekman
ca1e563141 proxy/ipvs: add a GetAllLocalAddressesExcept() function 2023-04-29 16:45:31 +02:00
Kubernetes Prow Robot
237d736234 Merge pull request #117617 from tosi3k/automated-cherry-pick-of-#117594-upstream-release-1.27
Automated cherry pick of #117594: Fix scheduler performance regression after adding plugin
2023-04-28 07:24:27 -07:00
Kubernetes Prow Robot
ac15b0f4b3 Merge pull request #117310 from enj/automated-cherry-pick-of-#117258-upstream-release-1.27
Automated cherry pick of #117258: kube-aggregator: correctly use client-go TLS cache with
2023-04-28 07:24:16 -07:00
Kubernetes Prow Robot
c766f936b7 Merge pull request #117637 from seans3/automated-cherry-pick-of-#117571-origin-release-1.27
Automated cherry pick of #117571: Refactors discovery content-type and helper functions
2023-04-27 01:22:15 -07:00
Kubernetes Prow Robot
6494bc6129 Merge pull request #117596 from jpbetz/automated-cherry-pick-of-#117593-origin-release-1.27
Automated cherry pick of #117593: Fix bug where CEL listOfString.join() results in unexpected
2023-04-26 16:28:14 -07:00
Sean Sullivan
3ce0c108fe Refactors discovery content-type and helper functions 2023-04-26 19:05:06 +00:00
Antoni Zawodny
574829867a Fix scheduler performance regression after adding plugin metrics 2023-04-26 15:43:52 +02:00
Joe Betz
192e9dae31 Update staging/src/k8s.io/apiserver/pkg/cel/common/values.go
Co-authored-by: Alvaro Aleman <alvaroaleman@users.noreply.github.com>
2023-04-25 17:48:26 -04:00
Joe Betz
8d0ac2f6f8 Fix bug where CEL listOfString.join() results in unexpected error 2023-04-25 17:48:19 -04:00
Kubernetes Prow Robot
0e4269487f Merge pull request #117459 from liggitt/automated-cherry-pick-of-#117453-upstream-release-1.27
Automated cherry pick of #117453: Fix stomping os env in kubectl e2e tests
2023-04-25 09:56:16 -07:00
Kubernetes Prow Robot
667e1645fe Merge pull request #117242 from haircommander/bump-runc-1.1.6-1.27
[1.27] Bump runc to 1.1.6
2023-04-25 04:16:16 -07:00
Maxim Patlasov
57e67a91e3 Fix directory mismatch for volume.SetVolumeOwnership()
In most cases `dir` arg of `SetUpAt()` method of `volume.Mounter` interface is the same as `mounter.GetPath()` because we usually call `SetUpAt()` from `SetUp()` like this:"
```
func (ed *emptyDir) SetUp(mounterArgs volume.MounterArgs) error {
	return ed.SetUpAt(ed.GetPath(), mounterArgs)
}
```
(this example is from `volume/emptydir/empty_dir.go`, but there are plenty other examples like that in `volume/*`)

However, there is currently one exception. This is from `volume/projected/projected.go`:
```
	if err := wrapped.SetUpAt(dir, mounterArgs); err != nil {
		return err
	}
```
(see 96306f144a/pkg/volume/projected/projected.go (L203))

In this case `dir` is not equal to `wrapped.GetPath()` and `volume.SetVolumeOwnership()` fails when called from `SetUpAt()` of wrapped volume:
```
lstat /var/lib/kubelet/pods/a2f6e58f-7edf-4c48-a97c-ef1b8fd3caf6/volumes/kubernetes.io~empty-dir/wrapped_kube-api-access-knvkv: no such file or directory
```

To fix the issue let's pass `dir` arg to `volume.SetVolumeOwnership()` explicitly, and use it instead of `mounter.GetPath()`.
2023-04-24 19:10:23 -07:00
Kubernetes Prow Robot
c2612ddcda Merge pull request #117324 from dddddai/automated-cherry-pick-of-#117182-upstream-release-1.27
Automated cherry pick of #117182: use case-insensitive header keys for http probes
2023-04-24 11:35:03 -07:00
Jordan Liggitt
d0514936f3 Fix stomping os env in kubectl e2e tests 2023-04-19 09:31:28 +02:00
Alexander Constantinescu
7a6640798a KCCM: add providerID predicate to service controller 2023-04-19 00:19:34 +02:00
Alexander Constantinescu
8221a54e1e Re-work logic in shouldSyncUpdatedNode 2023-04-19 00:19:34 +02:00
HirazawaUi
a9d07f4e9e add log includes pod preemption details 2023-04-18 22:48:58 +08:00
Paco Xu
9ef90afb4f verifyVolumeNoStatusUpdateNeeded may cause flake and so only keep the last ones 2023-04-18 11:30:37 +02:00
Paco Xu
b598ea5c39 deflake: Add retry with timeout to wait for final conditions 2023-04-18 11:30:37 +02:00
David Porter
2eb94fa835 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-18 01:22:51 -07:00
David Porter
ae07535c85 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-18 01:22:51 -07:00
Kubernetes Prow Robot
523dd0297f Merge pull request #117147 from cji/automated-cherry-pick-of-#117020-upstream-release-1.27
[1.27] Automated cherry pick of #117020: Return error for localhost seccomp type with no localhost
2023-04-17 03:00:43 -07:00
Clayton Coleman
861e1935e2 kubelet: Ensure pods that have not started track a pendingUpdate
A pod that cannot be started yet (due to static pod fullname
exclusion when UIDs are reused) must be accounted for in the
pod worker since it is considered to have been admitted and will
eventually start.

Due to a bug we accidentally cleared pendingUpdate for pods that
cannot start yet which means we can't report the right metric to
users in kubelet_working_pods and in theory we might fail to start
the pod in the future (although we currently have not observed
that in tests that should catch such an error). Describe, implement,
and test the invariant that when startPodSync returns in every path
that either activeUpdate OR pendingUpdate is set on the status, but
never both, and is only nil when the pod can never start.

This bug was detected by a "programmer error" assertion we added
on metrics that were not being reported, suggesting that we should
be more aggressive on using log assertions and automating detection
in tests.
2023-04-14 14:30:14 -04:00
Kubernetes Release Robot
95feac5269 Update CHANGELOG/CHANGELOG-1.27.md for v1.27.1 2023-04-14 13:38:32 +00:00
Kubernetes Release Robot
4c9411232e Release commit for Kubernetes v1.27.1 v1.27.1 2023-04-14 13:14:41 +00:00
dddddai
2c81ecc2e2 use case-insensitive header keys for http probes 2023-04-14 11:33:13 +08:00