Commit Graph

145 Commits

Author SHA1 Message Date
Maciej Borsz
0ba519fee0 Add missing trace dependency to kubemark 2023-03-15 13:01:42 +00:00
Paco Xu
f28f40e521 remove a flag check that was introduced in #112542; address several comments
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
2022-12-13 14:00:29 +08:00
Aditi Sharma
214a0ee7b8 Migrate container runtime endpoint flag to config
Signed-off-by: Aditi Sharma <adi.sky17@gmail.com>
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
2022-12-13 14:00:29 +08:00
Kubernetes Prow Robot
da588a31d4
Merge pull request #112627 from hj-johannes-lee/fix-typo-3
Kubemark: fix typos to be HollowKubeletOptions
2022-12-09 15:43:14 -08:00
Swagat Bora
caa83c25ae Support otel tracing in cri remote image service
Signed-off-by: Swagat Bora <sbora@amazon.com>
2022-09-29 22:15:07 +00:00
Hyeongju Johannes Lee
963935ed2e Kubemark: fix typos to be HollowKubeletOptions 2022-09-20 14:44:24 +03:00
Sally O'Malley
47e7d8034f
kubelet tracing
Signed-off-by: Sally O'Malley <somalley@redhat.com>
Co-authored-by: David Ashpole <dashpole@google.com>
2022-08-01 12:55:02 -04:00
Marcel Zięba
27336259ba Add option to bootstrap kubeconfig for hollow-node 2022-02-01 11:56:02 +00:00
Wojciech Tyczyński
243f4faa6d Update kubemark to use EndpointSlices and proper user-agents 2021-11-30 11:38:08 +01:00
caozhiyuan
bad4faf1b9 migrate --register-with-taints to KubeletConfiguration 2021-11-16 19:10:36 +08:00
Neha Lohia
fa1b6765d5
move pkg/util/node to component-helpers/node/util (#105347)
Signed-off-by: Neha Lohia <nehapithadiya444@gmail.com>
2021-11-12 07:52:27 -08:00
kerthcet
722489db36 fix kubemark flushlogs not working together with os.Exit()
Signed-off-by: kerthcet <kerthcet@gmail.com>
2021-10-08 18:54:31 +08:00
Patrick Ohly
00e4a599f6 command lines: always show flags with hyphens
All Kubernetes commands should show flags with hyphens in their help text even
when the flag originally was defined with underscore. Converting a command to
this style is not breaking its command line API because the old-style parameter
with underscore is accepted as alias.

The easiest solution to achieve this is to set normalization shortly before
running the command in the new central cli.Run or the few places where that
function isn't used yet.

There may be some texts which depends on normalization at flag definition time,
like the --logging-format usage warning. Those get generated assuming that
hyphens will be used.
2021-09-30 13:46:49 +02:00
Patrick Ohly
21d1bcd6b8 initialize logging after flag parsing
It wasn't documented that InitLogs already uses the log flush frequency, so
some commands have called it before parsing (for example, kubectl in the
original code for logs.go). The flag never had an effect in such commands.

Fixing this turned into a major refactoring of how commands set up flags and
run their Cobra command:

- component-base/logs: implicitely registering flags during package init is an
  anti-pattern that makes it impossible to use the package in commands which
  want full control over their command line. Logging flags must be added
  explicitly now, something that the new cli.Run does automatically.

- component-base/logs: AddFlags would have crashed in kubectl-convert if it
  had been called because it relied on the global pflag.CommandLine. This
  has been fixed and kubectl-convert now has the same --log-flush-frequency
  flag as other commands.

- component-base/logs/testinit: an exception are tests where flag.CommandLine has
  to be used. This new package can be imported to add flags to that
  once per test program.

- Normalization of the klog command line flags was inconsistent. Some commands
  unintentionally didn't normalize to the recommended format with hyphens. This
  gets fixed for sample programs, but not for production programs because
  it would be a breaking change.

This refactoring has the following user-visible effects:

- The validation error for `go run ./cmd/kube-apiserver --logging-format=json
  --add-dir-header` now references `add-dir-header` instead of `add_dir_header`.

- `staging/src/k8s.io/cloud-provider/sample` uses flags with hyphen instead of
  underscore.

- `--log-flush-frequency` is not listed anymore in the --logging-format flag's
  `non-default formats don't honor these flags` usage text because it will also
  work for non-default formats once it is needed.

- `cmd/kubelet`: the description of `--logging-format` uses hyphens instead of
  underscores for the flags, which now matches what the command is using.

- `staging/src/k8s.io/component-base/logs/example/cmd`: added logging flags.

- `apiextensions-apiserver` no longer prints a useless stack trace for `main`
  when command line parsing raises an error.
2021-09-30 13:46:49 +02:00
Ricardo Pchevuzinske Katz
37d11bcdaf Move node and networking related helpers from pkg/util to component helpers
Signed-off-by: Ricardo Katz <rkatz@vmware.com>
2021-09-16 17:00:19 -03:00
Yuan-Junliang
2e06066bab Migrate kube-proxy to use v1 Event API 2021-06-13 18:57:52 +08:00
Mateusz Matejczyk
a4c8a2ca35 Kubemark: allow choosing image-service 2021-04-16 14:42:24 +02:00
Mateusz Matejczyk
500f8e17d4 Kubemark: print flags before start 2021-04-16 09:22:12 +02:00
Kubernetes Prow Robot
12f8466459
Merge pull request #100267 from Jeffwan/support_arbitratry_resources
Expose resources overrides and maxPods conf in kubemark
2021-04-08 20:29:12 -07:00
Jiaxin Shan
1b4dc87a1f Expose resources overrides and maxPods conf in kubemark 2021-03-17 16:31:58 -07:00
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
Bob Killen
1a9e95d672
cmd/kubemark: Remove inactive members from OWNERS
As a part of cleaning up inactive members (those with no activity within
the past 18 months) from OWNERS files, this commit moves gmarek from an
approver to an emeritus_approver.
2021-02-14 15:17:48 -05:00
lyzs90
7b3322f677 Pull hollow node images from real nodes 2021-01-09 00:12:56 +08:00
Kshitij Sharma
e4dee9cff3 Added support for register-with-taints setting #93608 2020-09-03 22:23:20 +05:30
Daniel Smith
a86afc12df update scripts 2020-09-02 10:49:40 -07:00
Daniel Smith
75f835aa08 move port definitions to a common location 2020-09-02 10:48:25 -07:00
Monis Khan
fc4f91f10b cmd/*: fail on unrecognized flags/arguments for component CLI
In case a malformed flag is passed to k8s components
such as "–foo", where "–" is not an ASCII dash character,
the components currently silently ignore the flag
and treat it as a positional argument.

Make k8s components/commands exit with an error if a positional argument
that is not empty is found. Include a custom error message for all
components except kubeadm, as cobra.NoArgs is used in a lot of
places already (can be fixed in a followup).

The kubelet already handles this properly - e.g.:
'unknown command: "–foo"'

This change affects:
- cloud-controller-manager
- kube-apiserver
- kube-controller-manager
- kube-proxy
- kubeadm {alpha|config|token|version}
- kubemark

Signed-off-by: Monis Khan <mok@vmware.com>
Signed-off-by: Lubomir I. Ivanov <lubomirivanov@vmware.com>
2020-05-28 22:06:01 +03:00
Davanum Srinivas
0608e8be25
update bazel BUILD files
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-20 10:57:47 -04:00
Davanum Srinivas
5692926914
Move packages for slightly better UX for consumers
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-20 10:57:46 -04:00
Davanum Srinivas
07d88617e5
Run hack/update-vendor.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:33 -04:00
Davanum Srinivas
442a69c3bd
switch over k/k to use klog v2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:27 -04:00
louisgong
8d54a84507 fix kubemark use fake CRI 2020-01-07 11:39:58 +08:00
louisgong
324e5ce7e3 hollow-node use remote CRI 2020-01-07 11:00:45 +08:00
Jacek Kaniuk
4303be3d9f Revert pull request #85879 "hollow-node use remote CRI" 2019-12-19 10:52:35 +01:00
louisgong
0dd468039d inject remoteRuntime to kubelet dependency 2019-12-06 14:12:08 +08:00
louisgong
b469404d97 hollow-node use remote CRI 2019-12-04 17:07:04 +08:00
Kubernetes Prow Robot
ae15368355
Merge pull request #84351 from wojtek-t/promote_node_lease_to_GA
Promote node lease to GA
2019-11-08 09:00:15 -08:00
Matt Matejczyk
14e731924a Add sig-scalability-approvers/reviewers as kubemark approvers/reviewers 2019-11-06 08:51:49 +01:00
wojtekt
ffad401b4e Promote NodeLease feature to GA 2019-11-05 09:01:12 +01:00
Krzysztof Siedlecki
4bdf48eb2a adding support for kubemark --node-labels flag 2019-10-11 11:26:42 +02:00
Cameron Wood
aae0755fdc Add version logging to kubemark 2019-09-18 10:06:29 +02:00
Han Kang
866ea74326 remove pkg/version and some of redundant copies of it
Change-Id: Ia58367c1b1274bfb49c8a4784051463abaf795de
2019-09-16 16:24:35 -07:00
Han Kang
d301e9c3a5 clean-up shared metrics code and remaining references (component-base's copy is a drop in replacement) 2019-08-30 10:41:52 -07:00
Maciej Borsz
ed41078f05 Hollow-node should use separate client for heartbeats. 2019-07-10 10:31:04 +02:00
Odin Ugedal
7caf51daa4
Remove duplicate error messages from cli commands
Since we never use the cobras "SilenceErrors" or "SilenceUsage",
a command executed with "cmd.Execute()" will never return an error
without printing it.

The current behavior results in all error messages being printed twice:

Example:

$ kubectl abc
Error: unknown command "abc" for "kubectl"
Run 'kubectl --help' for usage.
unknown command "abc" for "kubectl"

This applies to all cli commands using Cobra. To verify, follow the code
path of the Execute function:

https://github.com/spf13/cobra/blob/c439c4fa0937/command.go#L793
Signed-off-by: Odin Ugedal <odin@ugedal.com>
2019-06-27 21:55:14 +02:00
Kubernetes Prow Robot
ce3ddcd5f6
Merge pull request #76933 from xichengliudui/update-prots
Replace variables 10250 and 10255 with constants
2019-04-24 12:25:13 -07:00
aaa
220b07f2c8 Replace variables 10250 and 10255 with constants
update pull request
2019-04-21 13:01:09 -04:00
Wei Huang
51149dad31
Fixed a kubemark panic when hollow-node is morphed as proxy 2019-04-19 14:40:53 -07:00
Jeff Grafton
7a938eb541 Create work-around wrappers for pure attribute on go_binary and go_test
This enables cgo when cross-compiling certain tests and binaries to
Linux, while disabling cgo for Windows and Darwin.
2019-02-22 18:08:34 -08:00
Marek Counts
160ed26c20 autogen files to support new project structure. 2019-02-15 10:29:31 -05:00