Commit Graph

107448 Commits

Author SHA1 Message Date
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
Kubernetes Prow Robot
4e6000a40c
Merge pull request #108935 from stevekuznetsov/skuznets/too-large-rv
pkg/storage/etcd3: refactor "too large" resourceVersions
2022-03-24 02:59:18 -07:00
Kubernetes Prow Robot
190f974dd8
Merge pull request #108902 from kolyshkin/bump-golangci-lint
Fix verify:* after go 1.18 upgrade
2022-03-24 02:59:06 -07:00
Kubernetes Prow Robot
8bd198260e
Merge pull request #107978 from brianpursley/config-cleanup
kubectl config subcommand cleanup: set-cluster, set-context, set-credentials
2022-03-24 02:58:54 -07:00
Kubernetes Prow Robot
22db936de3
Merge pull request #107750 from shiftstack/issues/cloud-provider/56
Prefer user-provided node IP
2022-03-24 02:58:42 -07:00
Alex Wang
8a5df1302a rename unschedulableQ to unschedulablePods
Signed-off-by: Alex Wang <wangqingcan1990@gmail.com>
2022-03-24 17:38:49 +08:00
Kun Zhang
6f8e9aa05d Fixes exited messages when leaderelection lost 2022-03-24 17:33:16 +08:00
Nikhita Raghunath
2f6762c924 publishing/rules: remove .gitattributes before publishing
If a staging repo has .gitattributes files containing the `export-subst`
attribute ([example](b6c06a95d7/staging/src/k8s.io/client-go/pkg/version/.gitattributes)), then git expands the specified placeholders
when git archive is used.

When a published repo is downloaded from GitHub, GitHub does a
"git archive" under the hood. This means that the placeholders get
replaced by their relevant values. This type of "git archive"
application sometimes leads to undesired values. See the example below.

- In client-go, [line 59 in `pkg/version/base.go`](b6c06a95d7/staging/src/k8s.io/client-go/pkg/version/base.go (L59))
is expanded on a git archive. This line is needed as a fallback to
inject k8s version info for client-go when this info is not provided
via ldflags during builds.

- However, when k/client-go is vendored, the line gets expanded to _the
commit of the project vendoring client-go_ -- which is not helpful at
all! This also means that the vendored client-go will now contain
different (expanded) commit shas for different projects.

- To ensure reproducibility of source, this commit helps remove
the .gitattributes files before publishing the staging repos.
Additionally, when client-go is used as a library, we don't care about
the line being expanded to inject version info so it is also safe to
remove these files.
2022-03-24 14:42:54 +05:30
Aditi Sharma
51cd36cf80 prepend credential provider flags on ubuntu also 2022-03-24 14:08:41 +05:30
Kubernetes Prow Robot
56f45c5c81
Merge pull request #108725 from pohly/klog-flush-and-exit
klog v2.60.1
2022-03-24 01:22:41 -07:00
Kubernetes Prow Robot
e3982ce472
Merge pull request #108820 from mozillazg/remove-kubectl-deprecated-flags
kubectl: Remove deprecated run flags
2022-03-24 00:14:50 -07:00
Kubernetes Prow Robot
96aa41513e
Merge pull request #107859 from ravisantoshgudimetla/promote-PodOS-beta
Promote PodOS field to beta
2022-03-24 00:14:41 -07:00
Kubernetes Prow Robot
99e36a93b2
Merge pull request #108781 from SergeyKanzhelev/conformanceruntimeClass
RuntimeClass and PodOverhead tests promotion to Conformance
2022-03-23 22:31:41 -07:00
Kubernetes Prow Robot
bb67b5e9e8
Merge pull request #108717 from lavalamp/remove-clustername
Remove ClusterName
2022-03-23 22:31:33 -07:00
Kubernetes Prow Robot
2786b78b5a
Merge pull request #108701 from denkensk/add-preemptionPolicy
support preemptionPolicy in describe PriorityClass
2022-03-23 22:31:24 -07:00