Commit Graph

107569 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
bfe649dbc0
Merge pull request #108965 from adisky/add-crdential-flag-to-ubuntu
[node e2e] prepend credential provider flags on ubuntu os also
2022-03-24 20:06:05 -07:00
Kubernetes Prow Robot
68cf2a60c6
Merge pull request #108847 from adisky/update-credential-api
Move kubelet credential provider feature flag to beta and update the api's
2022-03-24 20:05:53 -07:00
pengpeng wu
f67ec386a5 Fix: Correct spelling mistakes in cmd/kubeadm/app/cmd/phases/workflow/runner_test.go 2022-03-25 10:08:00 +08:00
Kubernetes Prow Robot
d60df5ba04
Merge pull request #108159 from pohly/logcheck
logcheck update and golangci-lint integration
2022-03-24 18:37:50 -07:00
Joe Betz
f71c4d4cf4 Add validation rule tests for transition rules 2022-03-24 21:19:50 -04:00
Tim Bannister
539b6173e9
Avoid using Docker Engine as example for container runtime
Docker Engine isn't directly compatible with recent Kubernetes.
2022-03-25 00:36:50 +00:00
Kubernetes Prow Robot
750cb93e62
Merge pull request #104736 from lauchokyip/improveFlags
Beautify kubectl help flag commands
2022-03-24 17:33:50 -07:00
Lubomir I. Ivanov
fe7af1c68b bump k8s.io/system-validators to v1.7.0
- add blkio as an optionally required cgroup
- update blang/semver to v4
- bump the min go version to 1.16
2022-03-25 02:26:01 +02:00
Tim Bannister
b803c8ebe2
Update types to be neutral about container runtime
Replace references to Docker / Docker Engine with more neutral
terminology.
2022-03-24 23:46:31 +00:00
Ben Luddy
fe38a414f8 Allow and enforce CEL CRD validation rules that reference oldSelf.
Co-authored-by: Joe Betz <jpbetz@google.com>
2022-03-24 18:20:51 -04:00
Mark Rossetti
2e036ad7c3 Fixing logic for kubelet permissions check on windows
Signed-off-by: Mark Rossetti <marosset@microsoft.com>
2022-03-24 14:57:08 -07:00
Jiahui Feng
679dc8322c do not round trip embedded v2 2022-03-24 14:44:15 -07:00
Steve Kuznetsov
2631c0a0f9
pkg/storage/etcd3: be more precise in watch test
Previously, this test assumed that:
 - a global watch would return only an event for the key in question
 - only the delete event in question would be returned

Neither of these assumptions are correct for an etcd backend as long
as any other clients are interacting with the system. This commit
makes the watch more specific and extracts the correct event.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2022-03-24 13:03:31 -08:00
Alex Zielenski
11b3a18cca
Update kube-openapi (#108895)
* upgrade k8s.io/kube-openapi

* fix open-api v3 blank aggregator output

* use keys as API group

in ./hack/update-openapi-spec.sh

* fix import grouping

* update openapiv3 integration tests
2022-03-24 14:01:01 -07:00
Kubernetes Prow Robot
bd1e7dc3cb
Merge pull request #108817 from KnVerey/kustomize_version
Expose the version of Kustomize that Kubectl embeds
2022-03-24 14:00:53 -07:00
Kubernetes Prow Robot
9bb5823b83
Merge pull request #108455 from Argh4k/race-conditions
Copy request in timeout handler
2022-03-24 14:00:41 -07:00
James Sturtevant
61af67ef10 Don't assume bash is avaliable for webhook deployment 2022-03-24 13:06:49 -07:00
Kubernetes Prow Robot
da7f184344
Merge pull request #108934 from stevekuznetsov/skuznets/time-out-test
pkg/storage/etcd3: update test to time out, not panic
2022-03-24 12:19:04 -07:00
Kubernetes Prow Robot
2161071d0b
Merge pull request #108919 from denkensk/rename-usQ
Rename unschedulableQ to unschedulablePods
2022-03-24 12:18:53 -07:00
Kubernetes Prow Robot
df790a5b06
Merge pull request #108738 from deads2k/add-eviction
allow namespace editors to evict pods
2022-03-24 12:18:41 -07:00
Hemant Kumar
ac6ef262df remove ExpandCSIVolume feature gate 2022-03-24 14:53:00 -04:00
Katrina Verey
44e63e8ff8
kubectl version should include bundled kustomize version 2022-03-24 13:31:57 -04:00
Katrina Verey
af059a0731
Colorize string test helper results 2022-03-24 13:31:57 -04:00
Aditi Sharma
ed16ef2206 Move feature flag credential provider to beta
Signed-off-by: Aditi Sharma <adi.sky17@gmail.com>
2022-03-24 22:43:38 +05:30
Marc Khouzam
c4f8c57b43 Refactor completion code into its own package
Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>
2022-03-24 12:49:01 -04:00
Kubernetes Prow Robot
221b60fb82
Merge pull request #108981 from liggitt/skip-race
Temporarily disable TestCheckRetryClosesBody
2022-03-24 09:40:52 -07:00
Kubernetes Prow Robot
28755c32b5
Merge pull request #107090 from cici37/reduceNoise
Return type instead of object
2022-03-24 09:40:41 -07:00
Hemant Kumar
13b34d9c77 Use tempdir for shutdown tests 2022-03-24 11:58:49 -04:00
Aldo Culquicondor
8776931abb Remove finalizer when orphaned
Change-Id: Id88a28755660812a274dffab2693cb8a0ef4235c
2022-03-24 11:57:51 -04:00
Aldo Culquicondor
211e33d93f Fix: Clean job tracking finalizer from orphan pods
Change-Id: I04cd70725fd1830be8daf2dca53f67bc10a379b7
2022-03-24 11:57:51 -04:00
Aldo Culquicondor
1d9e3766d2 Add test for Background delete propagation
Change-Id: I033e6fb04933c64cfe6490d1019333745d58c423
2022-03-24 11:57:51 -04:00
Aldo Culquicondor
f72173e4b4 Add integration test for orphan pods when there is GC
Change-Id: I04cd70725fd1830be8daf2dca53f67bc10a379b7
2022-03-24 11:57:49 -04:00
Hemant Kumar
cdfb841a52 remove ExpandInUsePersistentVolume feature gate 2022-03-24 11:19:42 -04:00
Steve Kuznetsov
fc33d0176a
pkg/storage/etcd3: update test to time out, not panic
Without these select statements, this test runs until the package-global
timeout and causes a panic. This change makes the test fail faster and
more legibly.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2022-03-24 07:06:22 -08:00
Maciej Wyrzuc
44705c7140 Copy request in timeout handler 2022-03-24 14:52:35 +00:00
Kubernetes Prow Robot
cc5bf4a3f4
Merge pull request #108569 from mborsz/cont
Implement page size progressing for rare selectors
2022-03-24 07:42:53 -07:00
Kubernetes Prow Robot
83ee27569e
Merge pull request #106591 from Kartik494/bumpetcd
Updated Etcd Version to 3.5.1 in go.mod
2022-03-24 07:42:41 -07:00
Hemant Kumar
966e1b6dd0 Fix code to not use the feature gate 2022-03-24 10:37:49 -04:00
Jordan Liggitt
9c13a27d18 Temporarily disable TestCheckRetryClosesBody 2022-03-24 10:11:06 -04:00
Hemant Kumar
9343cce20b remove ExpandPersistentVolume feature gate 2022-03-24 10:02:47 -04:00
Kubernetes Prow Robot
b456e70fe9
Merge pull request #108970 from nikhita/publishing-bot-gitattributes
publishing/rules: remove .gitattributes before publishing
2022-03-24 06:39:05 -07:00
Kubernetes Prow Robot
d9819f05d0
Merge pull request #108927 from wojtek-t/unify_pf_metrics
Record dropped requests in apiserver_request_total metric
2022-03-24 06:38:53 -07:00
Kubernetes Prow Robot
c956b1a2c4
Merge pull request #108553 from kerthcet/fix/race-detected-in-TestErrConnKilled
fix: race detected in TestErrConnKilled
2022-03-24 06:38:41 -07:00
Marc Khouzam
cf66f5c3cb Support completion for the <type>/<name> form
This commit teaches the shell completion logic how to handle the
<type>/<name> form for resource specification.

It also teaches the 'exec' command how to complete its '--container/-c'
flag using container names.

Also, for commands that work on pods, kubectl will now also suggest
completion choices of the form <type>/<name> for resource types that
contain pods (see below for more details).

The following commands can now have completion of the <type>/<name>
form. Commands that accept any resource type:

annotate
apply edit-last-applied
apply view-last-applied
delete
describe
edit
get
label
patch

Commands that accept a subset of resource types:

autoscale
expose
rollout history
rollout pause
rollout restart
rollout resume
rollout status
rollout undo
scale
taint

Commands that apply to resource types that contain pods:

attach
exec
logs
port-foward

For these last four commands, the possible resource types are now
included in the completion choices.  For example:
    kubectl exec d<TAB>
will suggest
    daemonsets/   deployments/

Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>
2022-03-24 08:39:02 -04:00
Carlos Eduardo Arango Gutierrez
d2f67b42b7
Fix typos under pkg/scheduler
./scheduler/framework/plugins/noderesources/most_allocated_test.go:227: negtive ==> negative
./scheduler/framework/plugins/noderesources/most_allocated_test.go:228: negtive ==> negative
./scheduler/framework/plugins/volumebinding/binder.go:402: everytime ==> every time
./scheduler/framework/preemption/preemption_test.go:67: staus ==> status
./scheduler/framework/runtime/framework_test.go:1252: followings ==> following
./scheduler/internal/cache/cache_test.go:932: datas ==> data
./scheduler/internal/cache/node_tree_test.go:471: unknow ==> unknown
./scheduler/internal/queue/scheduling_queue_test.go:442: actived ==> activated
./scheduler/internal/queue/scheduling_queue_test.go:2209: covert ==> convert

Signed-off-by: Carlos Eduardo Arango Gutierrez <carangog@redhat.com>
2022-03-24 08:01:25 -04:00
Kubernetes Prow Robot
4e8b2ff023
Merge pull request #106844 from atiratree/gc_metrics
add gc metrics and collect sync errors
2022-03-24 04:40:42 -07:00
Patrick Ohly
17e3c555c5 hack: integrate logcheck into golangci-lint
Running logcheck as part of golangci-lint has several advantages:
- faster checking because finding files and parsing is shared
  with other linters
- gets rid of the complex and buggy
  hack/verify-structured-logging.sh (https://github.com/kubernetes/kubernetes/issues/106746)
- support for // nolint:logcheck
- works with Go 1.18
2022-03-24 11:21:03 +01:00
Patrick Ohly
edffc700a4 enhance and fix log calls
Some of these changes are cosmetic (repeatedly calling klog.V instead of
reusing the result), others address real issues:

- Logging a message only above a certain verbosity threshold without
  recording that verbosity level (if klog.V().Enabled() { klog.Info... }):
  this matters when using a logging backend which records the verbosity
  level.

- Passing a format string with parameters to a logging function that
  doesn't do string formatting.

All of these locations where found by the enhanced logcheck tool from
https://github.com/kubernetes/klog/pull/297.

In some cases it reports false positives, but those can be suppressed with
source code comments.
2022-03-24 11:13:50 +01:00
Patrick Ohly
0f4d0660a7 kube-scheduler: finish conversion to structured logging
Thanks to support for multi-line string values we can now also convert
these remaining klog.Info calls without making the output unreadable
in text format.

The debug log messages intentionally don't get changed to ensure that
developers looking for it still find it.

The output now looks like this:

I0322 11:44:46.715093  458409 configfile.go:96] "Using component config" config=<
	apiVersion: kubescheduler.config.k8s.io/v1beta2
	clientConnection:
	  acceptContentTypes: ""
	  burst: 100
	  contentType: application/vnd.kubernetes.protobuf
	  kubeconfig: /var/run/kubernetes/scheduler.kubeconfig
	  qps: 50
	enableContentionProfiling: true
 ...
	  schedulerName: default-scheduler
 >

I0322 11:45:08.695649  458409 comparer.go:42] "Cache comparer started"
I0322 11:45:08.695718  458409 comparer.go:67] "Cache comparer finished"
I0322 11:45:08.695820  458409 dumper.go:52] "Dump of cached NodeInfo" nodes=<
	Node name: 127.0.0.1
	Deleted: false
	Requested Resources: &{MilliCPU:0 Memory:0 EphemeralStorage:0 AllowedPodNumber:0 ScalarResources:map[]}
	Allocatable Resources:&{MilliCPU:36000 Memory:67019448320 EphemeralStorage:181555660500 AllowedPodNumber:110 ScalarResources:map[hugepages-1Gi:0 hugepages-2Mi:0]}
	Scheduled Pods(number: 0):
 >
I0322 11:45:08.695873  458409 dumper.go:62] "Dump of scheduling queue" pods=<
	name: coredns-6874cd75d4-fv6hv, namespace: kube-system, uid: f1df106f-7fd9-460d-8403-333df61b2751, phase: Pending, nominated node:
 >
2022-03-24 11:13:50 +01:00
Kubernetes Prow Robot
efdb80dcc6
Merge pull request #108936 from stevekuznetsov/skuznets/more-correct-diff
pkg/storage/etcd3: use correct diff in tests
2022-03-24 02:59:26 -07:00