Antonio Ojea
ef190f860a
client-go token source transport implement RoundTripperWrapper interface
2021-11-05 12:22:23 +01:00
brianpursley
0e697e19ac
Add --override-type flag to kubectl run and kubectl expose to allow the choice of using a JSON Patch or Strategic Merge Patch to apply the override to the generated output.
2021-11-05 07:10:47 -04:00
Kubernetes Prow Robot
aa964e097c
Merge pull request #106150 from pohly/log-runner-kubemark
...
kubemark: replace deprecated --log-file parameter with runner
2021-11-05 04:01:52 -07:00
Markus Thömmes
671cd6c606
Make the docker buildx check call --help
2021-11-05 09:49:07 +01:00
Patrick Ohly
21bd4ae18b
kubectl: add deprecation notice to flag usage help
...
Several klog flags were deprecated in Kubernetes 1.23, but that was not visible
in "kubectl options" because it does its own formatting without considering a
flag's deprecation string.
Now the output looks like this:
$ go run ./cmd/kubectl options
The following options can be passed to any command:
--add-dir-header=false: If true, adds the file directory to the header of the log messages (DEPRECATED: will be
removed in a future release, see
https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/2845-deprecate-klog-specific-flags-in-k8s-components )
--alsologtostderr=false: log to standard error as well as files (DEPRECATED: will be removed in a future release,
see
https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/2845-deprecate-klog-specific-flags-in-k8s-components )
--as='': Username to impersonate for the operation. User could be a regular user or a service account in a
namespace.
--as-group=[]: Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--cache-dir='/home/pohly/.kube/cache': Default cache directory
--certificate-authority='': Path to a cert file for the certificate authority
--client-certificate='': Path to a client certificate file for TLS
--client-key='': Path to a client key file for TLS
--cluster='': The name of the kubeconfig cluster to use
--context='': The name of the kubeconfig context to use
--insecure-skip-tls-verify=false: If true, the server's certificate will not be checked for validity. This will
make your HTTPS connections insecure
--kubeconfig='': Path to the kubeconfig file to use for CLI requests.
--log-backtrace-at=:0: when logging hits line file:N, emit a stack trace (DEPRECATED: will be removed in a future
release, see
https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/2845-deprecate-klog-specific-flags-in-k8s-components )
--log-dir='': If non-empty, write log files in this directory (DEPRECATED: will be removed in a future release,
see
https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/2845-deprecate-klog-specific-flags-in-k8s-components )
--log-file='': If non-empty, use this log file (DEPRECATED: will be removed in a future release, see
https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/2845-deprecate-klog-specific-flags-in-k8s-components )
--log-file-max-size=1800: Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0,
the maximum file size is unlimited. (DEPRECATED: will be removed in a future release, see
https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/2845-deprecate-klog-specific-flags-in-k8s-components )
--log-flush-frequency=5s: Maximum number of seconds between log flushes
--logtostderr=true: log to standard error instead of files (DEPRECATED: will be removed in a future release, see
https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/2845-deprecate-klog-specific-flags-in-k8s-components )
--match-server-version=false: Require server version to match client version
-n, --namespace='': If present, the namespace scope for this CLI request
--one-output=false: If true, only write logs to their native severity level (vs also writing to each lower
severity level) (DEPRECATED: will be removed in a future release, see
https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/2845-deprecate-klog-specific-flags-in-k8s-components )
--password='': Password for basic authentication to the API server
--profile='none': Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex)
--profile-output='profile.pprof': Name of the file to write the profile to
--request-timeout='0': The length of time to wait before giving up on a single server request. Non-zero values
should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests.
-s, --server='': The address and port of the Kubernetes API server
--skip-headers=false: If true, avoid header prefixes in the log messages (DEPRECATED: will be removed in a future
release, see
https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/2845-deprecate-klog-specific-flags-in-k8s-components )
--skip-log-headers=false: If true, avoid headers when opening log files (DEPRECATED: will be removed in a future
release, see
https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/2845-deprecate-klog-specific-flags-in-k8s-components )
--stderrthreshold=2: logs at or above this threshold go to stderr (DEPRECATED: will be removed in a future
release, see
https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/2845-deprecate-klog-specific-flags-in-k8s-components )
--tls-server-name='': Server name to use for server certificate validation. If it is not provided, the hostname
used to contact the server is used
--token='': Bearer token for authentication to the API server
--user='': The name of the kubeconfig user to use
--username='': Username for basic authentication to the API server
-v, --v=0: number for the log level verbosity
--vmodule=: comma-separated list of pattern=N settings for file-filtered logging
--warnings-as-errors=false: Treat warnings received from the server as errors and exit with a non-zero exit code
For comparison, pflag itself prints:
$ go run ./cmd/kubelet --help 2>&1 | grep -e --log-file
--log-file string If non-empty, use this log file (DEPRECATED: will be removed in a future release, see https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/2845-deprecate-klog-specific-flags-in-k8s-components )
--log-file-max-size uint Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited. (default 1800) (DEPRECATED: will be removed in a future release, see https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/2845-deprecate-klog-specific-flags-in-k8s-components )
2021-11-05 09:34:25 +01:00
Jian Li
2e4d7a5198
test/e2e: cleanup e2e core framework's import from sub package e2elog
2021-11-05 16:29:35 +08:00
Kubernetes Prow Robot
ed42bbd722
Merge pull request #106126 from soltysh/remove_old_cronjob
...
Remove old cronjob controller
2021-11-04 20:35:53 -07:00
Kubernetes Prow Robot
8ce440c45c
Merge pull request #105949 from robscott/topology-e2e
...
Initial Topology Hints e2e Tests
2021-11-04 17:12:04 -07:00
Kubernetes Prow Robot
adcd2feb5e
Merge pull request #104153 from cynepco3hahue/e2e_node_provide_static_kubelet_config
...
e2e node: provide static kubelet config
2021-11-04 17:11:53 -07:00
Kubernetes Prow Robot
27d3a9ec57
Merge pull request #104481 from AlexeyPerevalov/E2eIsKubeletConfiguration
...
e2e_node: Properly check for DynamicKubeletConfig
2021-11-04 16:11:53 -07:00
Mark Rossetti
ef324d6bbd
Adding kubelet metrics for started and failed to start HostProcess containers
...
Signed-off-by: Mark Rossetti <marosset@microsoft.com>
2021-11-04 14:39:57 -07:00
Kubernetes Prow Robot
508e67937e
Merge pull request #106038 from NikhilSharmaWe/betterOutputNode
...
Changed code to improve output for files under test/e2e/node
2021-11-04 14:38:23 -07:00
Kubernetes Prow Robot
451e1addd8
Merge pull request #105960 from ueokande/max-unavailable-pdb-tests
...
test: Assert max unavailable for PDB test cases
2021-11-04 13:36:22 -07:00
Dan Winship
229ae58520
proxy/iptables: fix all-vs-ready endpoints a bit
...
Filter the allEndpoints list into readyEndpoints sooner, and set
"hasEndpoints" based (mostly) on readyEndpoints, not allEndpoints (so
that, eg, we correctly generate REJECT rules for services with no
_functioning_ endpoints, even if they have unusable terminating
endpoints).
Also, write out the endpoint chains at the top of the loop when we
iterate the endpoints for the first time, rather than copying some of
the data to another set of variables and then writing them out later.
And don't write out endpoint chains that won't be used
Also, generate affinity rules only for readyEndpoints rather than
allEndpoints, so affinity gets broken correctly when an endpoint
becomes unready.
2021-11-04 16:32:08 -04:00
Dan Winship
3679639cf1
proxy/iptables: Remove a no-op check
...
There was code to deal with endpoints that have invalid/empty IP
addresses, but EndpointSlice validation already ensures that these
can't exist.
2021-11-04 16:32:08 -04:00
Dan Winship
6ab3dc6875
proxy/iptables: Add more stuff to the unit test
...
The external traffic policy terminating endpoints test was testing
LoadBalancer functionality against a NodePort service with no
nodePorts (or loadBalancer IPs). It managed to test what it wanted to
test, but it's kind of dubious (and we probably _shouldn't_ have been
generating the rules it was looking for since there was no way to
actually reach the XLB chains). So fix that.
Also make the terminating endpoints test use session affinity, to add
more testing for that. Also, remove the multiple copies of the same
identical Service that is used for all of the test cases in that test.
Also add a "Cluster traffic policy and no source ranges" test to
TestOverallIPTablesRulesWithMultipleServices since we weren't really
testing either of those.
Also add a test of --masquerade-all.
2021-11-04 16:32:08 -04:00
Dan Winship
22a951c096
proxy/iptables: Fix TestOnlyLocalNodePortsNoClusterCIDR
...
The test got broken to not actually use "no cluster CIDR" when
LocalDetector was implemented (and the old version of the unit test
didn't check enough to actually notice this).
2021-11-04 16:32:08 -04:00
Dan Winship
799c222c84
proxy/iptables: test that we create a consistent set of iptables rules
2021-11-04 16:32:08 -04:00
Dan Winship
9403bfb178
proxy/iptables: Misc improvements to unit test
...
The original tests here were very shy about looking at the iptables
output, and just relied on checks like "make sure there's a jump to
table X that also includes string Y somewhere in it" and stuff like
that. Whereas the newer tests were just like, "eh, here's a wall of
text, make sure the iptables output is exactly that". Although the
latter looks messier in the code, it's more precise, and it's easier
to update correctly when you change the rules. So just make all of the
tests do a check on the full iptables output.
(Note that I didn't double-check any of the output; I'm just assuming
that the output of the current iptables proxy code is actually
correct...)
Also, don't hardcode the expected number of rules in the metrics
tests, so that there's one less thing to adjust when rules change.
Also, use t.Run() in one place to get more precise errors on failure.
2021-11-04 16:32:06 -04:00
Dan Winship
a1a12ca1da
proxy/iptables: Improve the sorting logic in TestOverallIPTablesRulesWithMultipleServices
...
The test was sorting the iptables output so as to not depend on the
order that services get processed in, but this meant it wasn't
checking the relative ordering of rules (and in fact, the ordering of
the rules in the "expected" string was wrong, in a way that would
break things if the rules had actually been generated in that order).
Add a more complicated sorting function that sorts services
alphabetically while preserving the ordering of rules within each
service.
2021-11-04 16:31:16 -04:00
Dan Winship
08680192fb
proxy/iptables: Fix sync_proxy_rules_iptables_total metric
...
It was counting the number of lines including the "COMMIT" line at the
end, so it was off by one.
2021-11-04 16:30:12 -04:00
Patrick Ohly
c3cd9a3902
kubemark: static binary, replace deprecated --log-file parameter
...
The --log-file parameter will be deprecated as of Kubernetes 1.23 and should be
avoided. The replacement for distroless images is the image with go-runner, a
tool that handles output redirection.
For kubemark to run in that image it must be built as static binary.
2021-11-04 20:52:56 +01:00
Kubernetes Prow Robot
1d8966f4f9
Merge pull request #106140 from jonyhy96/fix-flake
...
component-base: npe when renew hiddenCollectors
2021-11-04 12:34:43 -07:00
Kubernetes Prow Robot
dc93951ad0
Merge pull request #106090 from pohly/log-v-flags
...
component-base: move v/vmodule/log-flush-frequency into LoggingConfiguration
2021-11-04 12:34:34 -07:00
Kubernetes Prow Robot
2af34cf54d
Merge pull request #105940 from dobsonj/kep-1682-ga
...
Move CSIVolumeFSGroupPolicy feature to GA
2021-11-04 12:34:23 -07:00
Kubernetes Prow Robot
ce1f5af849
Merge pull request #105541 from pohly/component-base-owners
...
component-base: avoid accumulating default labels
2021-11-04 11:22:23 -07:00
Kubernetes Prow Robot
6d30c96d4a
Merge pull request #106042 from chendave/aggregate
...
kubeadm: aggregate all the errors when the shared certs are validated
2021-11-04 10:06:15 -07:00
Kubernetes Prow Robot
c2706035f2
Merge pull request #105941 from rezakrimi/issue/105861
...
Make some scheduler metrics stable
2021-11-04 10:06:03 -07:00
Maciej Szulik
baab99d04c
Switch from arguments to an input structure for kubectl command
2021-11-04 17:29:40 +01:00
Maciej Szulik
c5aea015c3
Allow providing wrapper for client config
2021-11-04 16:28:36 +01:00
Eddie Zaneski
c9fc35d15a
Update sig-cli owners
...
Signed-off-by: Eddie Zaneski <eddiezane@gmail.com>
2021-11-04 09:16:08 -06:00
Kubernetes Prow Robot
4c659c5342
Merge pull request #105648 from kkkkun/kkkkun/fix-metric
...
GET should be transformed to watch in kube-Apiserver
2021-11-04 07:48:04 -07:00
Nikhil Sharma
0316542704
Changed code to improve output for files under test/e2e/node
2021-11-04 20:09:59 +05:30
Shin'ya UEOKA
5c76507c3f
test: Assert max unavailable for PDB test cases
2021-11-04 22:49:45 +09:00
Artyom Lukianov
50fdcdfc59
e2e_node: refactor code to use a single method to update the kubelet config
...
Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-11-04 15:44:35 +02:00
kkkkun
5f98d8f798
Fix bug: Specical GET should be transformed to WATCH
2021-11-04 21:33:30 +08:00
Artyom Lukianov
ca35bdb403
e2e_node: remove DynamicKubeletConfig tests from serial lane
...
Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-11-04 15:26:19 +02:00
Artyom Lukianov
b6211657bf
e2e_node: drop usage of DynamicKubeletConfig
...
Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-11-04 15:26:19 +02:00
Artyom Lukianov
a5ed6c824a
e2e_node: provide methods to update kubelet config via file
...
Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-11-04 15:26:19 +02:00
Maciej Szulik
5254493044
Remove old cronjob controller
2021-11-04 13:24:28 +01:00
Kubernetes Prow Robot
f1b000db7c
Merge pull request #106146 from pohly/json-output-default
...
component-base: use stderr as default output stream for JSON
2021-11-04 04:22:04 -07:00
Kubernetes Prow Robot
2f21cff49d
Merge pull request #106018 from ahrtr/replace_ioutil_with_io_os_cluster_gce_gci
...
Replace ioutil with io and os for cluster/gce/gci
2021-11-04 03:08:03 -07:00
Patrick Ohly
b4988a4259
component-base: use stderr as default output stream for JSON
...
This makes it consistent with klog's text output and avoids polluting the
programs normal output with log messages. This may become relevant for command
line tools like "kubectl".
2021-11-04 10:24:01 +01:00
Patrick Ohly
d2a8a81639
Package kube-log-runner as part of Kubernetes releases
...
kube-log-runner was formerly known as go-runner when it was originally introduced
in 393e0952e9
It was moved to kubernetes/release/images/build/go-runner later but is now
needed again in Kubernetes itself as replacement for the deprecated --log-file
klog feature: when bringing up a Windows node, kube-proxy.exe and kubelet.exe must be wrapped
with the helper binary to redirect output.
It got renamed to avoid a naming conflict with
test/conformance/image/go-runner and because the name was too vague.
Other downstream Kubernetes users may have a similar need, therefore it makes
sense to provide a prebuilt binary also in the release archives.
2021-11-04 10:00:26 +01:00
kerthcet
371eb83065
fix RequestedToCapacityRatioParam's shape can be empty
...
Signed-off-by: kerthcet <kerthcet@gmail.com>
2021-11-04 16:45:43 +08:00
Kubernetes Prow Robot
3b76c75831
Merge pull request #106108 from bobbypage/graceful-shutdown-test-fixes
...
Fixes for graceful node shutdown test
2021-11-03 23:04:04 -07:00
Carl
b3e4fed844
only apply this check if the controller is actually namespaced
...
Co-authored-by: Jordan Liggitt <jordan@liggitt.net>
2021-11-04 13:08:47 +08:00
Kubernetes Prow Robot
8facd72986
Merge pull request #106020 from ahrtr/replace_ioutil_with_io_os_hack
...
Replace ioutil with io and os for hack
2021-11-03 20:50:03 -07:00
Mengjiao Liu
275d832ce2
Upgrade preparation to verify sysctl values containing forward slashes by regex
2021-11-04 11:49:56 +08:00
haoyun
1a21a53f7e
fix: npe when renew hiddenCollectors
...
Signed-off-by: haoyun <yun.hao@daocloud.io>
2021-11-04 11:10:07 +08:00