Commit Graph

115383 Commits

Author SHA1 Message Date
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
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
Kubernetes Prow Robot
d89d5ab268
Merge pull request #117023 from enj/enj/i/clean_boot
Clean up formatting
2023-03-30 19:53:48 -07:00
Davanum Srinivas
5662566e03
Set GOMAXPROCS explicitly
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-03-30 20:26:07 -04:00
Monis Khan
735bbc135c
Clean up formatting
Signed-off-by: Monis Khan <mok@microsoft.com>
2023-03-30 16:38:15 -04:00
mouuii
56755b8ffd fix doc mismatch
Signed-off-by: mouuii <49775493+mouuii@users.noreply.github.com>
2023-03-30 17:08:59 +08:00
Paco Xu
8e36e948ce verifyVolumeNoStatusUpdateNeeded may cause flake and so only keep the last ones 2023-03-30 10:44:45 +08:00
Anish Ramasekar
dac85fe2d3
[KMSv2] cleanup comments in v2 proto api
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2023-03-29 20:14:54 +00:00
Clayton Coleman
ed48dcd2d7
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-03-29 15:29:59 -04:00
scott
db92cc1388 ftr(etcd): add benchmarks 2023-03-29 21:52:38 +08:00
Wojciech Tyczyński
05f4e497f1 Deflake TestGetListNonRecursive 2023-03-29 13:46:49 +02:00
Rita Zhang
906f0607ef
Clean up kms test
Signed-off-by: Rita Zhang <rita.z.zhang@gmail.com>
2023-03-28 22:36:41 -07:00
HirazawaUi
397cc73dc9 delete unused functions in pkg/controller directory 2023-03-28 22:41:20 +08:00
Cecile Robert-Michon
47f8d42a6b
Add CecileRobertMichon to sig-cluster-lifecycle-leads 2023-03-27 21:46:10 +00:00
Anish Ramasekar
449f847630
[KMSv2] update ci script and add readme
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2023-03-27 20:43:37 +00:00
Kubernetes Prow Robot
c3e7eca7fd
Merge pull request #116945 from soltysh/skip_vendor
Skip vendor directory when removing generated files
2023-03-27 11:00:29 -07:00
Maciej Szulik
27ad623b3d
Skip vendor directory when removing generated files 2023-03-27 19:07:43 +02:00
Kubernetes Prow Robot
3a46f26115
Merge pull request #116948 from MadhavJivrajani/fix-verify-vendor
.*: update vendor dir and cleanup
2023-03-27 08:56:28 -07:00
Antoni Zawodny
beb329f4bf Do not look at VPC-related resources outside the cluster's network 2023-03-27 17:44:25 +02:00
Mike Spreitzer
8d92cfb131 Added conversions to/from NamespacedName
Also renamed file to something more on-point.
2023-03-27 11:22:09 -04:00
Madhav Jivrajani
63b5ca69f1 .*: update vendor dir and cleanup
Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
2023-03-27 19:18:05 +05:30
Hao Ruan
f638e2849f replaced spew.Sprintf with a util pretty print function 2023-03-27 09:24:22 +08:00
Kubernetes Prow Robot
8f15859afc
Merge pull request #116919 from dims/publishing-bot-rules-for-new-release-1.27-branch
publishing-bot rules for the new release-1.27 branch
2023-03-24 18:59:53 -07:00
Kubernetes Prow Robot
f393e7da7f
Merge pull request #116877 from enj/enj/i/validate_encrypt_resp_early
kmsv2: validate encrypt response at DEK generation time
2023-03-24 15:18:03 -07:00
Davanum Srinivas
1ad7cacba5
publishing-bot rules for the new release-1.27 branch
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-03-24 18:08:53 -04:00
Jordan Liggitt
f6fa250e30
Add API approvers 2023-03-24 16:15:55 -04:00
Kubernetes Prow Robot
0c62b122c0
Merge pull request #116857 from vinaykul/restart-free-pod-vertical-scaling-fixes
Call function that validates resize policy for in-place pod resize feature
2023-03-24 10:42:21 -07:00
Matthew Huxtable
03be789851 Fix sample-controller docs after moving to context-based cancellation
Since the stop channels were replaced in e346475, the commentary is
incorrect and confusing.
2023-03-24 15:39:20 +00:00
Kubernetes Prow Robot
0f373abb6a
Merge pull request #116906 from pacoxu/fix-deprecated-metrics
Fix deprecated metrics
2023-03-24 05:10:32 -07:00