Commit Graph

16052 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
e2fe430da7 Merge pull request #109632 from weilaaa/recorrect_byindex_input_param
correct input params of ByIndex
2022-06-22 09:29:43 -07:00
weilaaa
9847b2eeb4 correct input params and add godoc 2022-06-22 11:26:07 +08:00
Kubernetes Prow Robot
1ceca7b139 Merge pull request #110646 from thockin/rest-init-uid-early
Initialize UID earlier in the Create process
2022-06-21 11:06:38 -07:00
Tim Hockin
5615de51f9 Initialize UID earlier in the Create process
Before:
  Create()
      BeginCreate()
      BeforeCreate()
          init UID <---------------------
          strategy code

After:
  Create()
      init UID <-------------------------
      BeginCreate()
      BeforeCreate()
          strategy code

This also wipes UID early (suggested by David) and asserts it is set in
BeforeCreate().
2022-06-18 18:47:23 -07:00
Kubernetes Prow Robot
dbb6c77de4 Merge pull request #110108 from ialidzhikov/fix/typo
Nit: Fix a typo
2022-06-17 14:52:02 -07: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
Patrick Ohly
ea3f25f49b logs: add alpha+beta feature gates
It is useful to have the ability to control whether alpha or beta features are
enabled. We can group features under LoggingAlphaOptions and LoggingBetaOptions
because the configuration is designed so that each feature individually must be
enabled via its own option.

Currently, the JSON format itself is beta (graduated in 1.23) but additional
options for it were only added in 1.23 and thus are still alpha:

  $ go run ./staging/src/k8s.io/component-base/logs/example/cmd/logger.go --logging-format=json --log-json-split-stream --log-json-info-buffer-size 1M --feature-gates LoggingBetaOptions=false
  [format: Forbidden: Log format json is BETA and disabled, see LoggingBetaOptions feature, options.json.splitStream: Forbidden: Feature LoggingAlphaOptions is disabled, options.json.infoBufferSize: Forbidden: Feature LoggingAlphaOptions is disabled]

  $ go run ./staging/src/k8s.io/component-base/logs/example/cmd/logger.go --logging-format=json --log-json-split-stream --log-json-info-buffer-size 1M
  [options.json.splitStream: Forbidden: Feature LoggingAlphaOptions is disabled, options.json.infoBufferSize: Forbidden: Feature LoggingAlphaOptions is disabled]

This is the same approach that was taken for CPUManagerPolicyAlphaOptions and
CPUManagerPolicyBetaOptions.

In order to test this without modifying the global feature gate in a test file,
ValidateKubeletConfiguration must take a feature gate as argument.
2022-06-17 20:22:13 +02:00
Patrick Ohly
1aceac797d logs: make LoggingConfiguration an unversioned API
Making the LoggingConfiguration part of the versioned component-base/config API
had the theoretic advantage that components could have offered different
configuration APIs with experimental features limited to alpha versions (for
example, sanitization offered only in a v1alpha1.KubeletConfiguration). Some
components could have decided to only use stable logging options.

In practice, this wasn't done. Furthermore, we don't want different components
to make different choices regarding which logging features they offer to
users. It should always be the same everywhere, for the sake of consistency.

This can be achieved with a saner Go API by dropping the distinction between
internal and external LoggingConfiguration types. Different stability levels of
indidividual fields have to be covered by documentation (done) and potentially
feature gates (not currently done).

Advantages:

- everything related to logging is under component-base/logs;
  previously this was scattered across different packages and
  different files under "logs" (why some code was in logs/config.go
  vs. logs/options.go vs. logs/logs.go always confused me again
  and again when coming back to the code):

  - long-term config and command line API are clearly separated
    into the "api" package underneath that

  - logs/logs.go itself only deals with legacy global flags and
    logging configuration

- removal of separate Go APIs like logs.BindLoggingFlags and
  logs.Options

- LogRegistry becomes an implementation detail, with less code
  and less exported functionality (only registration needs to
  be exported, querying is internal)
2022-06-17 20:22:13 +02:00
Patrick Ohly
5fe00c14be logs: move code in preparation for v1 api 2022-06-17 20:06:14 +02:00
Patrick Ohly
18bf5d23f1 logs: simplify flush daemon startup
StartFlushDaemon can be called more than once. We can take advantage of that an
eliminate the tracking of where we need to start it.
2022-06-17 20:06:14 +02:00
Swati Sehgal
22ff20a0a0 staging-readme: Document the need to add doc.go in a staging repo
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2022-06-16 13:48:13 +01:00
Kubernetes Prow Robot
549e1b4fb6 Merge pull request #110448 from twilight0620/test0608
add some uts of group_version.go
2022-06-15 18:50:48 -07:00
Kubernetes Prow Robot
4b024fc4ee Merge pull request #110459 from wangyysde/promote-pod-security-to-ga
PodSecurity: promote config and feature gate to GA
2022-06-15 14:41:22 -07:00
Kubernetes Prow Robot
349efaabf8 Merge pull request #110436 from nicks/nicks/issue-1108
client-go: fix panic in ConfirmUsable validation
2022-06-15 13:19:10 -07:00
twilight0620
94331dc71b add some uts of group_version.go 2022-06-15 09:46:00 +08:00
wangyysde
ab66a38194 PodSecurity: promote config and feature gate to GA
Signed-off-by: wangyysde <net_use@bzhy.com>
2022-06-15 09:29:47 +08:00
Kubernetes Prow Robot
e08bf9cce6 Merge pull request #110469 from prasita123/pr_branch
add missing error handling steps
2022-06-14 12:07:33 -07:00
Kubernetes Prow Robot
daac87bf99 Merge pull request #110561 from Shubham82/extend_Description
RBAC: Modify the Description for the apiGroup.
2022-06-14 10:59:44 -07:00
Kubernetes Prow Robot
de5982637a Merge pull request #110378 from lucacome/bump-grpc
Bump grpc to v1.47.0
2022-06-14 10:59:33 -07:00
Kubernetes Prow Robot
9f0be547cd Merge pull request #110516 from MikeSpreitzer/bundle-metrics-registration
Bundle metrics registration into test server creation
2022-06-14 09:09:46 -07:00
Shubham Kuchhal
b1994772ee RBAC: Modify the Description for the apiGroup. 2022-06-14 13:31:09 +05:30
Kubernetes Prow Robot
04c6c48463 Merge pull request #110551 from liggitt/fix-cert
Fix example webhook cert generation
2022-06-14 00:25:44 -07:00
Kubernetes Prow Robot
7c596b901d Merge pull request #110519 from dims/update-etcd-packages-to-v3.5.4
Update etcd packages to v3.5.4
2022-06-13 22:21:44 -07:00
Luca Comellini
51fafd7de3 Bump grpc to v1.47.0
Signed-off-by: Luca Comellini <luca.com@gmail.com>
2022-06-13 22:08:47 -07:00
Jordan Liggitt
7e8277284a Fix example webhook cert generation 2022-06-13 19:28:47 -04:00
Kubernetes Prow Robot
c0642b749e Merge pull request #110179 from Jefftree/fix_openapi_v2
Prune defaults for CRDs for OpenAPI V2
2022-06-13 13:28:12 -07:00
Kubernetes Prow Robot
474fd40e38 Merge pull request #110546 from liggitt/fix-example
Drop spurious replace
2022-06-13 12:16:23 -07:00
Kubernetes Prow Robot
0fe0dbf3fb Merge pull request #110518 from dims/switch-to-released-version-of-v3.8.0-github.com/emicklei/go-restful/v3
Switch to released version of v3.8.0 - github.com/emicklei/go-restful/v3
2022-06-13 10:30:11 -07:00
Jordan Liggitt
051f2a30b3 Drop spurious replace 2022-06-13 12:15:01 -04:00
Kubernetes Prow Robot
90834e0a11 Merge pull request #110110 from sxllwx/fix/audit-webhook-delete-codec
Fix issue that Audit Server could not correctly encode metav1.DeleteOption
2022-06-13 09:14:11 -07:00
Mike Spreitzer
5ecf5f4ad3 Make sure metrics are registered in tests
Also, include metrics registration in server construction --- for
convenience.
2022-06-13 12:07:40 -04:00
Kubernetes Prow Robot
2b14fd9fb1 Merge pull request #110515 from MikeSpreitzer/unpairvec
Remove the PairVec types
2022-06-13 08:04:24 -07:00
Kubernetes Prow Robot
661cbe6823 Merge pull request #109850 from ardaguclu/validate-nooptdefval
Define NoOptDefVal for validate flag
2022-06-13 08:04:11 -07:00
Arda Güçlü
5b27424940 Remove redundant validateFlag checks 2022-06-13 10:06:51 +03:00
Kubernetes Prow Robot
3375f5773b Merge pull request #110520 from dims/update-gopkg.in/yaml.v3-to-v3.0.1
Update gopkg.in/yaml.v3 to v3.0.1
2022-06-12 21:04:10 -07:00
Mike Spreitzer
1f1cfba2a3 Remove the PairVec types 2022-06-12 23:37:15 -04:00
Kubernetes Prow Robot
567d1a2e22 Merge pull request #108825 from ialidzhikov/nit/staging-readme
Update staging/README.md
2022-06-12 15:46:09 -07:00
Davanum Srinivas
68b414764b Update gopkg.in/yaml.v3 to v3.0.1
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-06-11 20:39:40 -04:00
Davanum Srinivas
4672bfa26f update etcd packages to v3.5.4
in e9e8be3 we updated etcd server components to 3.5.4, here let's update the vendor/ as well to match

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-06-11 17:33:43 -04:00
Davanum Srinivas
6f2889718f Switch to released version of v3.8.0 - github.com/emicklei/go-restful/v3
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-06-11 11:27:08 -04:00
Kubernetes Prow Robot
867b5cc31b Merge pull request #110513 from dims/switch-to-v1.0.2-of-github.com/chai2010/gettext-go
Switch to v1.0.2 of github.com/chai2010/gettext-go
2022-06-10 19:20:18 -07:00
Kubernetes Prow Robot
3f1a9f9f3e Merge pull request #110512 from dims/switch-to-released-tag-v1.0.0-for-github.com/daviddengcn/go-colortext
Switch to released tag v1.0.0 for github.com/daviddengcn/go-colortext
2022-06-10 18:02:18 -07:00
Kubernetes Prow Robot
48fe99a312 Merge pull request #110511 from dims/switch-to-released-tag-v0.1.0-of-github.com/pquerna/cachecontrol
Switch to released tag v0.1.0 of github.com/pquerna/cachecontrol
2022-06-10 18:02:07 -07:00
Davanum Srinivas
feca7983b7 Adapt to newer APIs
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-06-10 19:58:13 -04:00
Davanum Srinivas
1ff96ede74 Switch to v1.0.2 of github.com/chai2010/gettext-go
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-06-10 19:58:10 -04:00
Kubernetes Prow Robot
f3f50b4d7c Merge pull request #110510 from dims/switch-to-github.com/MakeNowJust/heredoc-v1.0.0-and-avoid-SHA
Switch to v1.0.0 of github.com/MakeNowJust/heredoc (avoid SHA)
2022-06-10 16:23:44 -07:00
Davanum Srinivas
8cf2ef5558 Switch to released tag v1.0.0 for github.com/daviddengcn/go-colortext
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-06-10 17:12:24 -04:00
Kubernetes Prow Robot
59644ff7bd Merge pull request #110371 from andyzhangx/upgrade-go-autorest-adal
upgrade Azure/go-autorest/autorest to v0.11.27
2022-06-10 13:19:56 -07:00
Davanum Srinivas
9e1bbfdc65 Switch to released tag v0.1.0 of github.com/pquerna/cachecontrol
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-06-10 15:52:44 -04:00
Davanum Srinivas
3990685432 Switch to v1.0.0 of github.com/MakeNowJust/heredoc (avoid SHA)
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-06-10 14:51:33 -04:00