Commit Graph

104635 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
haoyun
1a21a53f7e fix: npe when renew hiddenCollectors
Signed-off-by: haoyun <yun.hao@daocloud.io>
2021-11-04 11:10:07 +08:00
Dave Chen
c85fb0e6ac Aggregate all the errors when the shared certs are validated
Instead of the individual error and return, it's better to aggregate all
the errors so that we can fix them all at once.

Take the chance to fix some comments, since kubeadm are not checking that
the certs are equal across controlplane.

Signed-off-by: Dave Chen <dave.chen@arm.com>
2021-11-04 10:12:00 +08:00
David Porter
ddd0d8a3da test: fixes for graceful node shutdown test
* Bump the pod status and node status update timeouts to avoid flakes
* Add a small delay after dbus restart to ensure dbus has enough time to
  restart to startup prior to sending shutdown signal
* Change check of pod being terminated by graceful shutdown. Previously,
  the pod phase was checked to see if it was `Failed` and the pod reason
  string matched. This logic needs to change after 1.22 graceful node
  shutdown change introduced in PR #102344 which changed behavior to no
  longer put the pods into a failed phase. Instead, the test now checks
  that containers are not ready, and the pod status message and reason
  are set appropriately.

Signed-off-by: David Porter <david@porter.me>
2021-11-03 18:40:26 -07:00
Kubernetes Prow Robot
662ea77c6a
Merge pull request #105996 from marosset/host-process-volume-mount-e2e
Adding e2e tests to validate volume mounts in HostProcessContainers on Windows
2021-11-03 17:24:05 -07:00
Kubernetes Prow Robot
904e97281f
Merge pull request #94986 from tkashem/audit-drop-managed-fields
drop managed fields from audit entries
2021-11-03 16:24:03 -07:00
Kubernetes Prow Robot
da707b6133
Merge pull request #106091 from rajansandeep/updateto1.8.6
[kube-up]: Bump coredns to 1.8.6
2021-11-03 15:24:45 -07:00
Kubernetes Prow Robot
6717bdbcd7
Merge pull request #106034 from ii/delete-service-collection
Create e2e delete service collection test - +1 endpoint
2021-11-03 15:24:39 -07:00
Kubernetes Prow Robot
8e2d7a3d64
Merge pull request #105983 from jiahuif-forks/dep/bump-smd
Upgrade sigs.k8s.io/structured-merge-diff/v4 to v4.2.0
2021-11-03 15:24:32 -07:00
Kubernetes Prow Robot
f28881de25
Merge pull request #106106 from liggitt/podsecurity-beta-webhook
PodSecurity: update webhook manifest for beta
2021-11-03 14:20:45 -07:00
Kubernetes Prow Robot
a65bb64c09
Merge pull request #104372 from astraw99/fix_label_msg
Fix `kubectl unlabel` response msg
2021-11-03 14:20:32 -07:00
Mark Rossetti
5dffdfc0d5 Adding e2e tests to validate volume mounts in HostProcessContainers on Windows
Signed-off-by: Mark Rossetti <marosset@microsoft.com>
2021-11-03 14:01:53 -07:00
Kubernetes Prow Robot
4dfd739403
Merge pull request #105997 from robscott/mirroring-selector
Fixing how EndpointSlice Mirroring handles Service selector transitions
2021-11-03 12:48:32 -07:00
Jordan Liggitt
9f92fb0d7e PodSecurity: update webhook manifest to use named port 2021-11-03 15:04:04 -04:00
Jordan Liggitt
f6456d098e PodSecurity: update webhook manifest to target linux/amd64 node 2021-11-03 15:04:04 -04:00
Jordan Liggitt
d92e0dbea6 PodSecurity: update webhook manifest to label namespace as restricted 2021-11-03 15:04:03 -04:00
Jordan Liggitt
4986780da3 PodSecurity: update webhook manifest for beta 2021-11-03 15:04:03 -04:00
Kubernetes Prow Robot
f5dd4d237f
Merge pull request #106105 from Huang-Wei/add-test
Add unit tests to cover scheduler's setup
2021-11-03 11:48:51 -07:00
Kubernetes Prow Robot
63c4a22ae9
Merge pull request #105819 from tosi3k/client-go-traces
Add more info to the ListAndWatch trace
2021-11-03 11:48:44 -07:00
Kubernetes Prow Robot
29c6e83227
Merge pull request #105201 from marosset/hostprocess-command-line-tests
HostProcess e2e tests to validate command / workingDir parameters
2021-11-03 11:48:32 -07:00
Kubernetes Prow Robot
0b8ac0c0fc
Merge pull request #106121 from wojtek-t/pf_watch_10
P&F fix watch tracker bug
2021-11-03 10:43:34 -07:00
Kubernetes Prow Robot
2904aae970
Merge pull request #106118 from liggitt/podsecurity-trimpath
PodSecurity: trim path when building webhook binary
2021-11-03 10:43:23 -07:00
Kubernetes Prow Robot
a2960dc277
Merge pull request #106120 from jsafrane/fix-test-name
Fix ephemeral test description
2021-11-03 09:11:25 -07:00
Reza Karimi
bb15f02039 issue#105861: making scheduler metrics stable 2021-11-03 15:34:50 +00:00