Commit Graph

115412 Commits

Author SHA1 Message Date
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
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
Damien Grisonnet
eba18d503c cluster/addons: bump metrics-server to v0.6.3
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2023-04-05 20:05:39 +02:00
Patrick Ohly
1dde8ef026 test/integration/framework: avoid race around grpclog.SetLoggerV2
grpclog.SetLoggerV is not thread-safe and may only be called before code starts
using GRPC. Calling RunCustomEtcd multiple times, for example in
k8s.io/kubernetes/test/integration/apiserver.TestWatchCacheUpdatedByEtcd,
causes a data race:

WARNING: DATA RACE
Read at 0x00000c8e8d20 by goroutine 135612:
  k8s.io/kubernetes/vendor/google.golang.org/grpc/grpclog.V()
      /home/prow/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/google.golang.org/grpc/grpclog/grpclog.go:41 +0x30
  k8s.io/kubernetes/vendor/google.golang.org/grpc/grpclog.(*componentData).V()
      /home/prow/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/google.golang.org/grpc/grpclog/component.go:103 +0x4e
  k8s.io/kubernetes/vendor/google.golang.org/grpc/internal/transport.(*loopyWriter).run.func1()
      /home/prow/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/google.golang.org/grpc/internal/transport/controlbuf.go:528 +0xf1
  runtime.deferreturn()
      /home/prow/go/src/k8s.io/kubernetes/_output/local/.gimme/versions/go1.20.2.linux.amd64/src/runtime/panic.go:476 +0x32
  k8s.io/kubernetes/vendor/google.golang.org/grpc/internal/transport.newHTTP2Client.func6()
      /home/prow/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/google.golang.org/grpc/internal/transport/http2_client.go:442 +0x112

Previous write at 0x00000c8e8d20 by goroutine 140228:
  k8s.io/kubernetes/vendor/google.golang.org/grpc/grpclog.SetLoggerV2()
      /home/prow/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/google.golang.org/grpc/grpclog/loggerv2.go:76 +0xc6a
  k8s.io/kubernetes/test/integration/framework.RunCustomEtcd()
      /home/prow/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/framework/etcd.go:153 +0xb89
  k8s.io/kubernetes/test/integration/apiserver.multiEtcdSetup()
      /home/prow/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/apiserver/watchcache_test.go:40 +0xac
  k8s.io/kubernetes/test/integration/apiserver.TestWatchCacheUpdatedByEtcd()
      /home/prow/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/apiserver/watchcache_test.go:88 +0x4a
  testing.tRunner()
      /home/prow/go/src/k8s.io/kubernetes/_output/local/.gimme/versions/go1.20.2.linux.amd64/src/testing/testing.go:1576 +0x216
  testing.(*T).Run.func1()
      /home/prow/go/src/k8s.io/kubernetes/_output/local/.gimme/versions/go1.20.2.linux.amd64/src/testing/testing.go:1629 +0x47
2023-04-05 16:08:01 +02:00
Arda Güçlü
f91518b81a Add genericiooptions in allowed list of genericclioptions 2023-04-05 17:05:37 +03:00
Arda Güçlü
b4e4db336f More migrations from genericclioptions to genericiooptions 2023-04-05 17:05:23 +03:00
Humble Chirammal
2d06601b81 RBD: e2e containers base image has been udpated to F38
This commit update the e2e test image if RBD to latest fedora
version.

Signed-off-by: Humble Chirammal <humble.devassy@gmail.com>
2023-04-05 18:03:10 +05:30
Humble Chirammal
0518dffd25 iscsi: e2e containers base image has been udpated to F38
This commit update the e2e test image if iscsi to latest fedora
version.

Signed-off-by: Humble Chirammal <humble.devassy@gmail.com>
2023-04-05 18:02:03 +05:30
Arda Güçlü
8d9386fc40 Remove genericclioptions.IOStreams struct
Since the codebase already migrates to genericiooptions.IOStreams,
external tools will automatically start consuming the new one.

This PR deletes deprecated struct because codebase does not rely on it
already. We keep `NewTestIOStreams` and `NewTestIOStreamsDiscard` functions
to provide users a smooth migration.
2023-04-05 15:03:35 +03:00
Arda Güçlü
c3497b30ac More migrations from genericclioptions to genericiooptions 2023-04-05 15:03:09 +03:00
Arda Güçlü
00c3094126 Migrate genericclioptions.IOStreams usage to genericiooptions 2023-04-05 14:07:46 +03:00
Arda Güçlü
51a7751a49 Move genericclioptions.IOStreams into genericiooptions.IOStreams
Currently, `genericclioptions` package imports `resource` package in cli-runtime
(i.e. builder_flags uses builder object in resource). Therefore, it is not allowed
that `resource` can import any package in `genericclioptions`(due to disallowed import cycles).
It is already reasonable burden except `genericclioptions.IOStreams`.

There are some cases we want to raise a warning to user in builder but
it can not be achieved due to resource package can not depend on
IOStreams. Since IOStreams solely contains go primitives, this PR
deprecates `genericclioptions.IOStreams` and adds `genericiooptions.IOStreams`.

Thanks to that, that will add capability of using IOStreams also in
builders, etc.
2023-04-05 13:07:33 +03:00
Pushkar Joglekar
e450ed9812 CVE-2023-27561: Bump runc go module v1.1.4 -> v1.1.5 2023-04-04 21:41:29 -07:00
Kubernetes Prow Robot
330b5a2b8d
Merge pull request #117088 from nckturner/public-arg-webhook
Export WebhookHandler struct because some CCMs use Run directly
2023-04-04 18:07:39 -07:00
Kubernetes Prow Robot
e7e7532a05
Merge pull request #117073 from mimowo/fix-daemonset-pod-restarts
Fix: Recreate DaemonSet pods completed with Succeeded phase
2023-04-04 13:41:39 -07:00
Michal Wozniak
b5dd5f1f3a Investigate and fix the handling of Succeeded pods in DaemonSet 2023-04-04 19:21:15 +02:00
Craig Ingram
3d3686b9cf Return error for localhost seccomp type with no localhost profile defined 2023-04-04 14:53:46 +00:00
Nick Turner
873127e3b0 Export WebhookHandler struct because some CCMs use Run directly 2023-04-04 13:25:49 +00:00
Maxim Patlasov
0a37f09c32 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-03 12:34:37 -07:00
Davanum Srinivas
bda73bd112
Refactor remote runners
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-04-02 16:51:39 -04:00
Kensei Nakada
e389d140ae fix as suggested 2023-04-01 10:34:57 +00:00
Arda Güçlü
457bb58ebb kubectl events: Support fully qualified names for --for flag
Users can pass resources into `kubectl events` command via `--for` flag,
if they have desire to only get events for the resource they specify.

However, current `kubectl events` does not support passing fully qualified
names(e.g. `replicasets.apps`, `cronjobs.v1.batch`, etc.). This PR adds support
for this.
2023-03-31 12:34:00 +03:00
David Porter
1893f639d0 test: Fix flake in node e2e mirror pod tests
The newly added `MirrorPodWithGracePeriod when create a mirror pod and
the container runtime is temporarily down during pod termination` test
is currently flaking because in some cases when it is run there are
other pods from other tests that are still in progress of being
terminated. This results in the test failing because it asserts metrics
that assume that there is only one pod running on the node.

To fix the flake, prior to starting the test, verify that no pods exist
in the api server other then the newly created mirror pod.

Signed-off-by: David Porter <david@porter.me>
2023-03-31 02:10:39 -07:00