Commit Graph

107638 Commits

Author SHA1 Message Date
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
Kubernetes Prow Robot
9a253ed042
Merge pull request #108580 from ardaguclu/remove-diff-discovery
Remove DiscoveryClient from diff command
2022-03-23 22:31:17 -07:00
Kubernetes Prow Robot
8168c68bb6
Merge pull request #108522 from SergeyKanzhelev/grpcToBeta
promote grpcProbes to beta
2022-03-23 22:31:05 -07:00
Kubernetes Prow Robot
68a0fccfb9
Merge pull request #108363 from houjun41544/20220226-kubeletvolume
Fix error logging statement to make it easier to understand
2022-03-23 22:30:52 -07:00
Kubernetes Prow Robot
7ae9615760
Merge pull request #108114 from ii/test-job-status
Write Read, Replace, Patch BatchV1NamespacedJobStatus test - +3 endpoint coverage
2022-03-23 22:30:41 -07:00
Yuvaraj Kakaraparthi
a5aa858d44 kubectl: add --support to get, patch, edit and replace commands
Co-authored-by: Nikhita Raghunath <nikitaraghunath@gmail.com>
2022-03-24 09:49:12 +05:30
Kubernetes Prow Robot
5981bfd189
Merge pull request #108950 from jpbetz/fix-cel-test
Remove flaky CEL cost tests that rely on map iteration order
2022-03-23 20:44:41 -07:00
Chok Yip Lau
1c031d4fa8 Beautify kubectl help flag commands 2022-03-23 23:30:20 -04:00
Joe Betz
363a3e33eb Remove flaky CEL cost tests that rely on map iteration order 2022-03-23 22:29:49 -04:00
Kubernetes Prow Robot
f97825e1ce
Merge pull request #107395 from alculquicondor/indexed-job
Graduate IndexedJob to stable
2022-03-23 17:44:41 -07:00
Steve Kuznetsov
8903372e8b
pkg/storage/etcd3: use correct diff in tests
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2022-03-23 14:28:41 -08:00
Kubernetes Prow Robot
324ba1324b
Merge pull request #108937 from johnbelamaric/remove-sig-net-ownership
Remove johnbelamaric as sig-network reviewer and approver
2022-03-23 14:51:19 -07:00
John Belamaric
e10638daa1 Remove johnbelamaric as sig-network reviewer and approver 2022-03-23 13:41:49 -07:00
Steve Kuznetsov
b973cdc57c
pkg/storage/etcd3: refactor "too large" resourceVersions
When tests attempt to validate behavior in the case that a client asks
for a resource version that is "too large" for the underlying storage,
the previous implementation would simply add 1 to the latest revision
seen. This is only appropriate for storage backends that
  a) provide a continuous monotonic logical clock
  b) have no other events occurring while the test runs

For instance, when using a singe etcd backend as a shared fixture for
these tests, adding 1 to a previously-seen revision is not suffcient to
ensure that the resulting revision is "too large". By instead using the
largest possible integer value, we can be certain of this.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2022-03-23 12:27:55 -08:00
Kubernetes Prow Robot
a330d3b972
Merge pull request #108928 from dims/kube-up-use-registry.k8s.io-for-containerd-related-jobs
kube-up: use registry.k8s.io for containerd-related jobs
2022-03-23 13:22:58 -07:00
Kubernetes Prow Robot
697c685187
Merge pull request #108907 from Jefftree/crd-openapi-bug
Fix OpenAPI v3 bug with #/definitions
2022-03-23 13:22:50 -07:00
Kubernetes Prow Robot
2249708b5d
Merge pull request #108862 from mmiranda96/fix/stats_summary_ubuntu
Increase timeout for stats/summary check
2022-03-23 13:22:43 -07:00
Kubernetes Prow Robot
c3d372dc47
Merge pull request #108857 from KnVerey/script_kustomize_update
Script kubectl kustomize update process
2022-03-23 13:22:34 -07:00
Kubernetes Prow Robot
3a2509b60e
Merge pull request #108841 from tengqm/fix-kubeletcfg-docstring
Fix doc strings for kubelet config APIs
2022-03-23 13:22:27 -07:00
Kubernetes Prow Robot
da88853f9d
Merge pull request #108651 from andrewsykim/node-e2e-cred-provider
test/e2e_node: add kubelet credential provider tests
2022-03-23 13:22:18 -07:00