Commit Graph

330 Commits

Author SHA1 Message Date
Antonio Ojea
811c2f50a1 remove apiserver limitations
Change-Id: I97b35d912ba5d86857cf82d3eddd65b648030005
2023-03-14 22:58:11 +00:00
Monis Khan
754cb3d601
kubelet/client: collapse transport wiring onto standard approach
Signed-off-by: Monis Khan <mok@microsoft.com>
2023-02-06 20:34:49 -05:00
TommyStarK
44c94f98b6 fix typo in cmd/kube-apiserver/app/options/validation_test.go
Put back test case that was dropped by mistake.

Signed-off-by: TommyStarK <thomasmilox@gmail.com>
2022-11-16 19:25:31 +01:00
TommyStarK
47fdbd97d3 cmd/kube-apiserver/app/options: Improving test coverage
Signed-off-by: TommyStarK <thomasmilox@gmail.com>
2022-11-10 16:20:20 +01:00
Andrew Sy Kim
02020b20e7 kube-apiserver: remove flags --identity-lease-duration-seconds and --identity-lease-renew-interval-seconds
Signed-off-by: Andrew Sy Kim <andrewsy@google.com>
2022-11-07 19:36:22 -05:00
SataQiu
ecfae2bebe kube-apiserver: keep the types of LeaseEndpointReconcilerType and NoneEndpointReconcilerType the same as MasterCountReconcilerType 2022-10-26 21:49:31 +08:00
Abu Kashem
6dc81c3280
update api enablement for flowcontrol v1beta3 2022-09-21 18:54:20 -04:00
Kubernetes Prow Robot
80edf6d1a4
Merge pull request #112532 from ldsdsy/modify4
Eliminate unnecessary string conversions in options.go
2022-09-19 07:53:29 -07:00
ldsdsy
bd339b9c9c Eliminate unnecessary string conversions in options.go 2022-09-17 10:01:15 +08:00
Di Jin
0b400cf6aa Add an option for aggregator 2022-09-01 15:25:26 -07:00
Tim Hockin
5f59159bfc Docs: node-port-range should not overlap ephemeral 2022-08-04 10:26:26 -07: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
Maciej Wyrzuc
b42045a64f Add additional etcd check to readyz with 2 seconds timeout. 2022-07-27 12:23:02 +00:00
Patrick Ohly
4c6338ac0f logs: replace config methods with functions
API types are only supposed to have methods related to serialization.
2022-06-17 20:22:13 +02:00
Antonio Ojea
2124f17c72 unit tests for Class E IP addresses 2022-06-08 15:29:48 +02:00
twilight0620
62298c0493 add test case TestValidateServiceNodePort for validateServiceNodePort method 2022-05-17 14:32:06 +08:00
carlory
fcc282f9f2 remove audit.k8s.io/v1[alpha|beta]1 versions 2022-03-08 14:37:26 +08:00
Antonio Ojea
5a20c425f2 apiserver: use endpoint lease reconciler as default
The apiserver owns and manages the kubernetes.default service.

It has 3 different options to reconcile the endpoints that belong to
that service:

- None: endpoints are handled by an external party.
- MasterCount: legacy, it reconciles based on the endpoints generated
and a flag specifying the number of master on the cluster.
- Lease: default since 1.11, each apiserver writes a lease in etcd
and renews periodically, the endpoints are generated based on the
existing leases.

It seems that when the default was set for the lease reconciler, the
controlplane code wasn't updated and kept using the master count
reconciler.

This also starts the deprecation of the master count reconciler in
favor of the lease reconciler.
2022-02-11 09:00:54 +01:00
Jian Zeng
9573b4a6b9
refactor(apiserver): remove the insecure flags
Signed-off-by: Jian Zeng <anonymousknight96@gmail.com>
2021-12-08 10:53:44 +08:00
Patrick Ohly
4df70dfd41 component-base: initialize logging as soon as possible
In various places log messages where emitted as part of validation or even
before it (for example, cli.PrintFlags). Those log messages did not use the
final logging configuration, for example text output instead of JSON or not the
final verbosity. The last point became more obvious after moving the setup of
verbosity into logs.Options.Apply because PrintFlags never printed anything
anymore.

In order to force applications to deal with logging as soon as possible, the
Options.Validate and Options.Apply methods are now private. Applications should
use the new Options.ValidateAndApply directly after parsing.
2021-11-03 11:55:54 +01: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
Khaled Henidak (Kal)
a53e2eaeab
move IPv6DualStack feature to stable. (#104691)
* kube-proxy

* endpoints controller

* app: kube-controller-manager

* app: cloud-controller-manager

* kubelet

* app: api-server

* node utils + registry/strategy

* api: validation (comment removal)

* api:pod strategy (util pkg)

* api: docs

* core: integration testing

* kubeadm: change feature gate to GA

* service registry and rest stack

* move feature to GA

* generated
2021-09-24 16:30:22 -07:00
Abu Kashem
e2b8701545
apf: ebable v1beta2 2021-09-09 08:28:53 -04:00
Stephen Augustus
481cf6fbe7
generated: Run hack/update-gofmt.sh
Signed-off-by: Stephen Augustus <foo@auggie.dev>
2021-08-24 15:47:49 -04:00
Antonio Ojea
0cd75e8fec run hack/update-netparse-cve.sh 2021-08-20 10:42:09 +02:00
David Ashpole
79550ed40c Add distributed tracing to the apiserver using OpenTelemetry 2021-06-25 05:20:27 -07:00
David Eads
84590fe27c remove --ssh- options, deprecated 13 releases, that only work on GCE 2021-06-03 13:54:35 -04:00
Shihang Zhang
925900317e allow multiple of --service-account-issuer 2021-04-19 09:54:11 -07:00
dcwbq
5d186d0d0c This flag will be removed in 1.22
Signed-off-by: dcwbq <biqiang.wu@daocloud.io>
2021-04-16 11:20:52 +08:00
Kubernetes Prow Robot
5c5aa98215
Merge pull request #99578 from pandaamanda/remove_duplicate_apiserverServiceRange_validation
remove duplicated validation for service-cluster-ip-range
2021-04-09 01:18:48 -07:00
Kubernetes Prow Robot
26fba1403b
Merge pull request #99528 from pandaamanda/apiserver_validation_code_optimization
fix log message and optimize log format check logic
2021-04-08 14:28:34 -07:00
xiongzhongliang
e6d6409cf8 remove duplicated validation for service-cluster-ip-range 2021-03-19 11:17:07 +08:00
chenyw1990
edff740386 fix json log format panic, change the flag names in flagIsSet 2021-03-09 14:14:25 +08:00
Kubernetes Prow Robot
b139db1539
Merge pull request #99573 from pandaamanda/apiserver_identity_validate
cleanup: wrap the apiserver identity validation
2021-03-08 19:23:19 -08:00
Swetha Repakula
108fd44f7c Graduate EndpointSlice feature gate to GA 2021-03-06 15:58:47 -08:00
xiongzhongliang
c7bf5506ee cleanup: wrap the apiserver identity validation 2021-03-06 00:57:02 +08:00
xiongzhongliang
4a24a08f93 Optimize some codes 2021-03-05 18:23:39 +08:00
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
Khaled (Kal) Henidak
3e56ddae67 upgrade IPv6DualStack feature to beta and turn on by default 2021-02-10 23:14:05 +00:00
Ling Samuel
c8db72c38c
api-server add --lease-max-object-count
Signed-off-by: Ling Samuel <lingsamuelgrace@gmail.com>
2021-02-01 18:20:59 +08:00
Kubernetes Prow Robot
1f5c1b6d91
Merge pull request #96722 from adtac/apfvalidation
APF: make command-line args validation error more descriptive
2021-01-11 18:38:37 -08:00
Ling Samuel
7e9fe39cd7
apiserver add metric etcd_lease_object_counts
Signed-off-by: Ling Samuel <lingsamuelgrace@gmail.com>
2021-01-11 21:22:07 +08:00
Antonio Ojea
2e4aed2d4a bind-address flag usage 2020-12-11 18:47:24 +01:00
Ling Samuel
c99567005d
apiserver add --lease-reuse-duration-seconds to config lease reuse duration
Signed-off-by: Ling Samuel <lingsamuelgrace@gmail.com>
2020-12-04 19:19:49 +08:00
Adhityaa Chandrasekar
39fb8ced93 APF: make command-line args validation error more descriptive
Signed-off-by: Adhityaa Chandrasekar <adtac@google.com>
2020-11-19 20:37:06 +00:00
yue9944882
849be447f5 APF: graduate API and types to beta
Signed-off-by: Adhityaa Chandrasekar <adtac@google.com>
2020-11-13 23:20:39 +00:00
Kubernetes Prow Robot
281866b35c
Merge pull request #95533 from roycaihw/apiserver-lease-controller
Add kube-apiserver lease controller
2020-11-06 18:09:37 -08:00
Haowei Cai
3761a00e5b add kube-apiserver-lease-controller poststart hook 2020-11-06 13:33:08 -08:00
Kubernetes Prow Robot
8d6829fe1e
Merge pull request #95896 from zshihang/flag
make flags of TokenRequest required
2020-11-05 18:36:50 -08:00
Shihang Zhang
a5021a4ddf make flags of TokenRequest required 2020-11-05 10:40:56 -08:00