Commit Graph

99176 Commits

Author SHA1 Message Date
Francesco Romani
c44f8214db node: podresources: add GetAllocatableResources API
Extend the podresources API adding the GetAllocatableResources endpoint,
as specified in the KEP
https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/2043-pod-resource-concrete-assigments

Signed-off-by: Francesco Romani <fromani@redhat.com>
2021-03-09 13:13:36 +01:00
Francesco Romani
1375c5bdc7 node: podresources: make GetCPUs return cpuset
a upcoming patch wants to add GetAllocatableCPUs() returning a cpuset.
To make the code consistent and a bit more flexible, we change the
existing interface to also return a cpuset.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2021-03-09 13:13:36 +01:00
Francesco Romani
4e7434028c e2e: node: bootstrap podresources tests
Start e2e tests for the existing List() API.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2021-03-09 13:13:35 +01:00
Federico Paolinelli
fa963f55ae Un-skip the hostnetwork udp endpoint test.
Since the test is being fixed, we can run the test.

Signed-off-by: Federico Paolinelli <fpaoline@redhat.com>
2021-03-09 11:52:35 +01:00
Federico Paolinelli
a0ca1fd63f Network Tests: bind host network udp listeners to hostIPs
When listening on udp, the reply is sent using a src address which is
the address of the gateway interface. This means that when listening to
any, the reply can be sent out with a src ip which is different from the
request's target ip. This confuses natting and "connectionful" udp
services do not work.
Here, we force the endpoint to listen from the hostIP and from podIPs,
to cover both dual stack and legacy clusters.

Signed-off-by: Federico Paolinelli <fpaoline@redhat.com>
2021-03-09 11:52:35 +01:00
Anago GCB
9780d88cb6 CHANGELOG: Update directory for v1.21.0-beta.1 release 2021-03-09 10:24:35 +00:00
Kubernetes Prow Robot
bce3863970
Merge pull request #98635 from rkilingr/enhancement/slice-capacity-kubectl
Cleanup: Provides capacity for make slice
2021-03-09 01:54:59 -08:00
wojtekt
bd3d1e7af0 Refactor upgrade tests to share more code 2021-03-09 10:06:12 +01:00
Sung Jun Park
5f69cf74d8 fix: when newly binding pvc to a pv, adjust pvc.status.capacity to pv's annotation that denotes the pre-resize capacity of the original pvc that pv was bound to if it has one
test: confirm that pvc's status capacity is adjusted if pv has a pre-resize capacity annotation
2021-03-09 07:55:10 +00:00
wojtekt
04a196a3dc Unify masterUpgrade and nodeUpgrade signatures 2021-03-09 08:50:49 +01:00
wojtekt
d1f721b73f Cleanup upgrade functions 2021-03-09 08:36:10 +01:00
Patrick Ohly
c4311ae754 generic ephemeral volumes: refresh rbac testdata
This is the result of
  UPDATE_BOOTSTRAP_POLICY_FIXTURE_DATA=true go test k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy

Apparently enabling the GenericEphemeralVolume feature by default
affect this test. The policy that it now tests against is indeed
the one needed for the controller.
2021-03-09 08:24:52 +01:00
Patrick Ohly
25f4174148 testdata: drop the alpha EphemeralVolumeSource.ReadOnly field
This is the result of
   UPDATE_COMPATIBILITY_FIXTURE_DATA=true go test k8s.io/api
after removing the ReadOnly field from the API. The test data
for older releases must be updated because the current code
no longer supports that field.

The removal itself is okay because the struct was declared
as alpha.

Because EphemeralVolumeSource is embedded quite a lot, different types
are affected. Here is one example:

       --- FAIL: TestCompatibility/extensions.v1beta1.DaemonSet/v1.20.0 (0.04s)
            compatibility.go:476: json differs
            compatibility.go:477:   string{
                  	... // 12941 identical bytes
                  	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, //  |               }|
                  	0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, //  |.              }|
                - 	0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, // -|,.              |
                - 	0x22, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x22, 0x3a, 0x20, 0x74, 0x72, 0x75, 0x65, // -|"readOnly": true|
                  	0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, //  |.            }. |
                  	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, //  |         }.     |
                  	... // 31426 identical bytes
                  }

            compatibility.go:482: yaml differs
            compatibility.go:483:   string{
                  	... // 22893 identical bytes
                  	0x34, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x70, 0x68, 0x65, 0x6d, //  |4".        ephem|
                  	0x65, 0x72, 0x61, 0x6c, 0x3a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, //  |eral:.          |
                - 	0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x3a, 0x20, 0x74, 0x72, 0x75, 0x65, 0x0a, 0x20, // -|readOnly: true. |
                - 	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,                                           // -|         |
                  	0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x54, 0x65, 0x6d, 0x70, 0x6c, //  |volumeClaimTempl|
                  	0x61, 0x74, 0x65, 0x3a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, //  |ate:.           |
                  	... // 5965 identical bytes
                  }

            compatibility.go:488: proto differs
            compatibility.go:490:   (
                  	"""
                  	... // 459 identical lines
                  	                }
                  	              }
                - 	              2: 1
                  	            }
                  	          }
                  	... // 1083 identical lines
                  	"""
                  )

            compatibility.go:506: wrote expected compatibility data... verify, commit, and rerun tests
2021-03-09 08:24:52 +01:00
Patrick Ohly
52b758c9b6 generic ephemeral volume: generate code
This is the result of "make update" minus the testdata update which
will be committed separately.
2021-03-09 08:22:48 +01:00
Patrick Ohly
555d4a12bf generic ephemeral volumes: drop ReadOnly field
As discussed during the alpha review, the ReadOnly field is not really
needed because volume mounts can also be read-only. It's a historical
oddity that can be avoided for generic ephemeral volumes as part
of the promotion to beta.
2021-03-09 08:22:48 +01:00
Patrick Ohly
dcce753eda generic ephemeral volumes: promote to beta 2021-03-09 08:22:48 +01:00
tanjing2020
2d79ebbe58 Log invalid scheduler-policy input instead of panic 2021-03-09 15:21:46 +08:00
wojtekt
6d4a601b72 Compute upgradeContext once in upgrade tests 2021-03-09 08:14:30 +01:00
Kubernetes Prow Robot
40a411a61a
Merge pull request #99912 from dims/capture-logs-from-containerd-installation-service
Capture logs from containerd-installation service
2021-03-08 22:53:38 -08:00
Kubernetes Prow Robot
f34b63acee
Merge pull request #99620 from jingxu97/mar/owner
Add jingxu97 to volumemanager owner
2021-03-08 22:53:31 -08:00
Kubernetes Prow Robot
c7389c1f35
Merge pull request #98999 from sladyn98/structured-logging
kubelet: migrate pkg/kubelet/cloudresource to structured logging
2021-03-08 22:53:23 -08:00
Kubernetes Prow Robot
9457a5c3d8
Merge pull request #98973 from YoyinZyc/add_context_outside_apiserver
Apply context to restclient and serviceaccount metrics
2021-03-08 22:53:11 -08:00
Kubernetes Prow Robot
45cf7e07be
Merge pull request #95775 from DangerOnTheRanger/gcp-credential-staging
Move credential provider code to staging/
2021-03-08 22:53:00 -08:00
chenyw1990
edff740386 fix json log format panic, change the flag names in flagIsSet 2021-03-09 14:14:25 +08:00
David Porter
904cb67267 Fixes after runc libcontainer and docker update
- libcontainer renamed
  `github.com/opencontainers/runc/libcontainer/configs` to
  `github.com/opencontainers/runc/libcontainer/devices` so use the new
  references

- Update `dockershim` `ContainerCreate` call after docker update to
  v20.10.2
2021-03-08 22:10:29 -08:00
David Porter
b5dd78da3d vendor: cadvisor v0.39.0
Main upgrades:
- github.com/opencontainers/runc v1.0.0-rc93
- github.com/containerd/containerd v1.4.4
- github.com/docker/docker v20.10.2
- github.com/mrunalp/fileutils v0.5.0
- github.com/opencontainers/selinux v1.8.0
- github.com/cilium/ebpf v0.2.0
2021-03-08 22:10:29 -08:00
Benjamin Elder
1c0a8c2987 remove unused third_party/intemp 2021-03-08 21:17:37 -08:00
Kubernetes Prow Robot
faa3a5fbd4
Merge pull request #99916 from swetharepakula/eps-ga-e2e
Promote Endpoint Slice E2E Tests to Conformance
2021-03-08 20:47:45 -08:00
Kubernetes Prow Robot
841cb4adc4
Merge pull request #99844 from minbaev/scheduler-test-perf-optimization
add if check for number of scheduled pods to be greater than 0
2021-03-08 20:47:37 -08:00
Kubernetes Prow Robot
40d8aed6f3
Merge pull request #99585 from Iceber/fix-finished-at
dockershim: fix started and finished timestamp of the container status
2021-03-08 20:47:28 -08:00
Kubernetes Prow Robot
ff3ccc58cd
Merge pull request #98946 from monopole/upgradeKustomize
Upgrade kustomize-in-kubectl to v4.0.5
2021-03-08 20:47:20 -08:00
Kubernetes Prow Robot
7eb99191a1
Merge pull request #98116 from aojea/mirror_dual
slice mirroring controller should mirror annotations (but endpoints.kubernetes.io/last-change-trigger-time annotation) and labels
2021-03-08 20:47:12 -08:00
jay vyas
c94ce8c507
Add default namespace labels to all namespaces for selectors (#96968)
* namespace by name default labelling

Co-authored-by: Jordan Liggitt <jordan@liggitt.net>
Co-authored-by: Abhishek Raut <rauta@vmware.com>

* Make some logic improvement into default namespace label

* Fix unit tests

* minor change to trigger the CI

* Correct some tests and validation behaviors

* Add Canonicalize normalization and improve validation

* Remove label validation that should be dealt by strategy

* Update defaults_test.go
add fuzzer
ns spec

* remove the finalizer thingy

* Fix integration test

* Add namespace canonicalize unit test

* Improve validation code and code comments

* move validation of labels to validateupdate

* spacex will save us all

* add comment to testget

* readablility of canonicalize

* Added namespace finalize and status update validation

* comment about ungenerated names

* correcting a missing line on storage_test

* Update the namespace validation unit test

* Add more missing unit test changes

* Let's just blast the value. Also documenting the workflow here

* Remove unnecessary validations

Co-authored-by: Jordan Liggitt <jordan@liggitt.net>
Co-authored-by: Abhishek Raut <rauta@vmware.com>
Co-authored-by: Ricardo Pchevuzinske Katz <ricardo.katz@gmail.com>
2021-03-08 20:46:59 -08:00
Kubernetes Prow Robot
6d499e6768
Merge pull request #99962 from swetharepakula/eps-describers
Add v1 describers for EndpointSlice
2021-03-08 19:24:33 -08:00
Kubernetes Prow Robot
c7e2439173
Merge pull request #99954 from deads2k/storage-beta
switch most e2e tests to storage/v1 over v1beta1
2021-03-08 19:24:26 -08:00
Kubernetes Prow Robot
761cdf33a2
Merge pull request #99952 from ii/Promote-ReplicaSet-Test
Promote ReplicaSet Replace and Patch Test +2 Endpoints
2021-03-08 19:24:18 -08:00
Kubernetes Prow Robot
0acef88b20
Merge pull request #99922 from Huang-Wei/enq-noderesources
implement EnqueueExtensions interface in noderesources
2021-03-08 19:24:09 -08:00
Kubernetes Prow Robot
b48e7f1e7b
Merge pull request #99859 from krzysiekg/replace_klog_in_pkg_kubelet_tests
Replace klog with with testing.T logging in pkg/kubelet tests
2021-03-08 19:24:02 -08:00
Kubernetes Prow Robot
8d394cda11
Merge pull request #99857 from wojtek-t/cleanup_describe_18
Stop using SIGDescribe for upgrade tests to reflect reality
2021-03-08 19:23:54 -08:00
Kubernetes Prow Robot
b85313b6dd
Merge pull request #99853 from wojtek-t/cleanup_describe_17
Cleanup the remaining multi-owned sig-node tests
2021-03-08 19:23:44 -08:00
Kubernetes Prow Robot
eacb4bc8f0
Merge pull request #99852 from wojtek-t/cleanup_describe_16
Cleanup test/e2e/upgrades directory
2021-03-08 19:23:36 -08:00
Kubernetes Prow Robot
3e5954a7e1
Merge pull request #99836 from navidshaikh/pr/slog-k-status
Migrate pkg/kubelet/status to structured logging
2021-03-08 19:23:27 -08:00
Kubernetes Prow Robot
b139db1539
Merge pull request #99573 from pandaamanda/apiserver_identity_validate
cleanup: wrap the apiserver identity validation
2021-03-08 19:23:19 -08:00
Kubernetes Prow Robot
9a1b5bb255
Merge pull request #99264 from palnabarun/structured-logging-pkg/kubelet/token
Migrate pkg/kubelet/token to structured logging
2021-03-08 19:23:11 -08:00
Kubernetes Prow Robot
5f0b88b043
Merge pull request #98791 from pacoxu/kubetest/external-ips
skip checking nodeport on external addrs in conformance tests
2021-03-08 19:22:59 -08:00
Dave Chen
20cad3b5da Move test specific option setting to the test file
Setting of "metricsRecorder" is only needed for testcase.

Signed-off-by: Dave Chen <dave.chen@arm.com>
2021-03-09 10:30:22 +08:00
monopole
ba39d22e39 until stable: pin-dependency, update-vendor, update-bazel, lint-dep 2021-03-08 16:50:43 -08:00
monopole
6c9460f0b4 Manually update kustomize attachment points. 2021-03-08 16:50:43 -08:00
monopole
073ca8b42e Delete staging/src/k8s.io/cli-runtime/pkg/kustomize 2021-03-08 16:50:43 -08:00
Kubernetes Prow Robot
0df8c69731
Merge pull request #99960 from knabben/fix-runtime-config
Enabling runtime config on E2E node tests
2021-03-08 16:28:00 -08:00