Commit Graph

181 Commits

Author SHA1 Message Date
Nabarun Pal
88ef5f91b0 release-1.24: update publishing bot rules
This change has been generated by the `update-rules` command in
`publishing-bot` repository. Since this is the first time we are
updating the rules using a script, there is a considerable amount of
diff, which is caused because of the YAML marshaller.

Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2022-04-20 19:40:04 +05:30
cpanato
e1a433b67c Update publishing-bot rules for Go 1.17.9
Signed-off-by: cpanato <ctadeu@gmail.com>
2022-04-13 18:41:49 +02:00
cpanato
2e9d10e8c6 Update Go to 1.18.1
Signed-off-by: cpanato <ctadeu@gmail.com>
2022-04-13 16:44:21 +02:00
Nikhita Raghunath
2f6762c924 publishing/rules: remove .gitattributes before publishing
If a staging repo has .gitattributes files containing the `export-subst`
attribute ([example](b6c06a95d7/staging/src/k8s.io/client-go/pkg/version/.gitattributes)), then git expands the specified placeholders
when git archive is used.

When a published repo is downloaded from GitHub, GitHub does a
"git archive" under the hood. This means that the placeholders get
replaced by their relevant values. This type of "git archive"
application sometimes leads to undesired values. See the example below.

- In client-go, [line 59 in `pkg/version/base.go`](b6c06a95d7/staging/src/k8s.io/client-go/pkg/version/base.go (L59))
is expanded on a git archive. This line is needed as a fallback to
inject k8s version info for client-go when this info is not provided
via ldflags during builds.

- However, when k/client-go is vendored, the line gets expanded to _the
commit of the project vendoring client-go_ -- which is not helpful at
all! This also means that the vendored client-go will now contain
different (expanded) commit shas for different projects.

- To ensure reproducibility of source, this commit helps remove
the .gitattributes files before publishing the staging repos.
Additionally, when client-go is used as a library, we don't care about
the line being expanded to inject version info so it is also safe to
remove these files.
2022-03-24 14:42:54 +05:30
Davanum Srinivas
d8f1da5ecb golang: Update to 1.18 from 1.18rc1
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-03-22 09:47:35 -04:00
cpanato
1ef8e9a0b4 Update publishing-bot rules for Go 1.17.8 / 1.16.15
Signed-off-by: cpanato <ctadeu@gmail.com>
2022-03-14 10:17:26 +01:00
Kubernetes Prow Robot
86945d7e74 Merge pull request #107431 from justaugustus/rel-mgr
OWNERS(releng): Reconcile existing Release Managers
2022-02-22 11:39:16 -08:00
Stephen Augustus
8ee5a237ae {build,staging/publishing}/OWNERS: Reconcile Release Managers
Signed-off-by: Stephen Augustus <foo@auggie.dev>
2022-02-21 08:37:29 -05:00
Stephen Augustus
93295000af golang: Update to go1.18rc1
Signed-off-by: Stephen Augustus <foo@auggie.dev>
2022-02-20 21:16:26 -05:00
Marko Mudrinić
b9abd5a710 Update publishing-bot rules for Go 1.17.7 / 1.16.14
Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
2022-02-14 13:04:07 +01:00
Marko Mudrinić
980406f083 Update Go to 1.17.7
Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
2022-02-12 13:06:08 +01:00
Nabarun Pal
0d21caee1c staging/publishing: update branch rules to reflect new Go versions 1.17.6 and 1.16.13
Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2022-01-22 12:46:17 -05:00
Nabarun Pal
77816bd9b1 [go] update to Go 1.17.6
Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2022-01-18 14:35:24 +05:30
Kubernetes Prow Robot
a0d638bd79 Merge pull request #104819 from justinsb/less_cmp
Use utils string-slice comparison
2022-01-05 10:34:00 -08:00
Kubernetes Prow Robot
145d05da34 Merge pull request #106944 from cpanato/pubbot
staging/publishing: Set go1.16 version to go1.16.12 and go1.17 to go1.17.5
2021-12-13 14:02:25 -08:00
Carlos Panato
62dab9f452 staging/publishing: Set go1.16 version to go1.16.12 and go1.17 to go1.17.5
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
2021-12-13 12:31:39 +01:00
Carlos Panato
4bda9697ee [go1.17] Update to go1.17.5
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
2021-12-10 16:58:29 +01:00
Davanum Srinivas
9405e9b55e Check in OWNERS modified by update-yamlfmt.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-12-09 21:31:26 -05:00
Kubernetes Prow Robot
68bd9994ae Merge pull request #106833 from cpanato/go117
[go1.17] Update to go1.17.4
2021-12-07 19:28:44 -08:00
Carlos Panato
2adf0e116c [go1.17] Update to go1.17.4
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
2021-12-06 09:40:54 +01:00
Stephen Augustus
0d38ee59c7 staging/publishing: Add release-engineering-approvers as reviewers
Signed-off-by: Stephen Augustus <foo@auggie.dev>
2021-12-04 22:19:40 -05:00
Stephen Augustus
321e3d8851 staging/publishing: Add justaugustus as approver
Signed-off-by: Stephen Augustus <foo@auggie.dev>
2021-12-04 22:15:35 -05:00
Nabarun Pal
78e1ec2e38 publishing-bot: remove rules for release-1.19
Kubernetes 1.19 is not actively maintained anymore.

Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2021-12-02 10:08:20 +05:30
Nabarun Pal
e8b177cfc1 publishing-bot: add 1.23 rules
Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2021-11-25 11:25:39 +05:30
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
Nikhita Raghunath
5deae0121e staging/publishing: fix go version for go1.16.10 2021-11-08 10:16:07 +05:30
Carlos Panato
abbf8c3bed [go1.17] Update to go1.17.3
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
2021-11-07 16:29:35 +01:00
Tim Allclair
c7cdf19cbe Add --version flag to podsecurity-webhook command 2021-10-25 10:26:05 -07:00
Alkaid
ae9ca48f01 [PodSecurity] Implement metricRecorder for admission (#104217)
* init

Signed-off-by: jyz0309 <45495947@qq.com>

go fmt

Signed-off-by: jyz0309 <45495947@qq.com>

remove useless code

Signed-off-by: jyz0309 <45495947@qq.com>

add metrics.Attributes interface

Signed-off-by: jyz0309 <45495947@qq.com>

address comment

Signed-off-by: jyz0309 <45495947@qq.com>

go fmt code

Signed-off-by: jyz0309 <45495947@qq.com>

resolve import cycle

Signed-off-by: jyz0309 <45495947@qq.com>

fix comment

Signed-off-by: jyz0309 <45495947@qq.com>

fix lints

Signed-off-by: jyz0309 <45495947@qq.com>

fix build error

Signed-off-by: jyz0309 <45495947@qq.com>

fix test

Signed-off-by: jyz0309 <45495947@qq.com>

try

Signed-off-by: jyz0309 <45495947@qq.com>

* try to compare version

Signed-off-by: jyz0309 <45495947@qq.com>

fix conflict

Signed-off-by: jyz0309 <45495947@qq.com>

remove unuse change

Signed-off-by: jyz0309 <45495947@qq.com>

* address comment

Signed-off-by: jyz0309 <45495947@qq.com>

* fix import error

Signed-off-by: jyz0309 <45495947@qq.com>

fix import

Signed-off-by: jyz0309 <45495947@qq.com>

address comment

Signed-off-by: jyz0309 <45495947@qq.com>

address comment

Signed-off-by: jyz0309 <45495947@qq.com>

* address comment

Signed-off-by: jyz0309 <45495947@qq.com>

* format code

Signed-off-by: jyz0309 <45495947@qq.com>

* remove exempt and error record

Signed-off-by: jyz0309 <45495947@qq.com>

* ignore pod

Signed-off-by: jyz0309 <45495947@qq.com>

* add decision default value

Signed-off-by: jyz0309 <45495947@qq.com>

* address comment

Signed-off-by: jyz0309 <45495947@qq.com>

* remore useless import

Signed-off-by: jyz0309 <45495947@qq.com>

* remove policy vaild check

Signed-off-by: jyz0309 <45495947@qq.com>

use init to register metric

Signed-off-by: jyz0309 <45495947@qq.com>

fix test

Signed-off-by: jyz0309 <45495947@qq.com>

remove check

Signed-off-by: jyz0309 <45495947@qq.com>

remove blank line

Signed-off-by: jyz0309 <45495947@qq.com>

add allowedImports

Signed-off-by: jyz0309 <45495947@qq.com>

Add mock recorder

Signed-off-by: jyz0309 <45495947@qq.com>

format code

Signed-off-by: jyz0309 <45495947@qq.com>

separe record into 3 function

Signed-off-by: jyz0309 <45495947@qq.com>

* fix comment

Signed-off-by: jyz0309 <45495947@qq.com>
2021-10-20 20:02:08 -07:00
Carlos Panato
5ca8ae9f35 staging/publishing: Set go1.16 version to go1.16.9
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
2021-10-14 16:23:31 +02:00
Mengjiao Liu
19e8852154 [go1.17] Update to go1.17.2 2021-10-14 16:15:51 +08: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
Kubernetes Prow Robot
9918aa1e03 Merge pull request #105026 from wojtek-t/migrate_clock_2
Unify towards k8s.io/utils/clock - part 2
2021-09-17 00:01:01 -07:00
wojtekt
b7221bc77c Update import restrictions 2021-09-16 10:52:28 +02:00
Carlos Panato
f6faa18659 staging/publishing: Set go1.16 version to go1.16.8
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
2021-09-15 14:24:04 +02:00
Carlos Panato
132c7066e0 [go1.17] Update to go1.17.1
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
2021-09-14 13:04:25 +02:00
Justin SB
c0f478a488 Use utils string-slice comparison
go-cmp/cmp is intended for tests, and is much less efficient here.
2021-09-07 14:25:14 -04:00
Stephen Augustus
e8d2bff6ba [go1.17] Update to go1.17
Signed-off-by: Stephen Augustus <foo@auggie.dev>
2021-08-24 15:47:41 -04:00
Antonio Ojea
e1e4408ab3 allow k8s.io/utils/net imports 2021-08-20 10:42:10 +02:00
Jordan Liggitt
ffed59d168 Fix allowed imports for kube-openapi 2021-08-17 11:35:44 -04:00
Stephen Augustus
85d83ebd28 staging/publishing: Set go1.15 version to go1.15.15
Signed-off-by: Stephen Augustus <foo@auggie.dev>
2021-08-08 00:53:30 -04:00
Carlos Panato
6b9dc099f8 [go1.16] Update to go1.16.7
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
2021-08-06 17:11:00 +02:00
Kubernetes Prow Robot
0a704f9e1f Merge pull request #103564 from kevindelgado/unstr-extr-poc
ExtractItems for unstructured apply configurations
2021-08-04 22:10:55 -07:00
Kevin Delgado
4edb6e01be Add kube-openapi to client-go import restrictions 2021-07-28 00:41:30 +00:00
Nikhita Raghunath
363d47c08c staging/publishing: fix rules for legacy-cloud-providers for 1.22
The mount-utils repo is a dependency but got missed from the rules.

This commit fixes the currently broken publishing bot.
2021-07-27 13:50:34 +05:30
Nabarun Pal
0aa16fae5b staging/publishing: add release-1.22 rules
Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2021-07-22 19:37:42 +05:30
Carlos Panato
83f8d1ad72 [go1.16] Update to go1.16.6
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
2021-07-13 18:05:16 +02:00
Tim Allclair
32783f7568 PodSecurity: Initial webhook implementation 2021-07-09 17:04:29 -07:00
Tim Allclair
cf6ba6096f Move pod-security-admission to an external Attributes interface 2021-07-06 15:15:15 -07:00
Jordan Liggitt
e87016cf94 PodSecurity: add ability to skip failure cases if relevant features are disabled 2021-06-30 22:05:00 -04:00