Kubernetes Prow Robot
0e6f4d3a35
Merge pull request #115271 from kevindelgado/field-validation-conformance
...
Field validation e2e tests and GA graduation
2023-01-26 09:34:26 -08:00
Kevin Delgado
b149b93189
update codegen
2023-01-26 14:31:40 +00:00
Kevin Delgado
2d5ceb9b15
drop Enabled() checks for ServerSideFieldValidation feature gate
2023-01-26 14:16:58 +00:00
Kubernetes Prow Robot
668477e994
Merge pull request #115308 from pohly/logs-goflag-example
...
logs examples
2023-01-26 02:14:26 -08:00
Kubernetes Prow Robot
eb4e2a2225
Merge pull request #115302 from alexzielenski/apiserver/discovery/lastreconciled-race
...
fix race in aggregated discovery controller
2023-01-25 23:12:24 -08:00
Kubernetes Prow Robot
fab126d7f3
Merge pull request #113121 from aramase/expiring-cache
...
kmsv2: implement expire cache with clock
2023-01-25 19:04:25 -08:00
Anish Ramasekar
4804baa011
kmsv2: implement expire cache with clock
...
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com >
2023-01-25 22:50:32 +00:00
Patrick Ohly
74885d1a1d
logs: add logger.V(5).Info example
...
This is relevant for unit tests where normally such output would be shown
when using ktesting.
2023-01-25 08:49:05 +01:00
Patrick Ohly
0a38a5e68a
logs: remove example of secret data
...
Dynamic log
sanitization (https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/1753-logs-sanitization )
got removed a while back, there's no need to have it in the example anymore.
2023-01-25 08:45:12 +01:00
Patrick Ohly
a753466fe4
logs: add examples for Go flag and unit testing
...
All examples use the same code for producing output. Only the way how logging
is configured is different.
2023-01-25 08:43:01 +01:00
Alexander Zielenski
cff4d07581
fix race in aggregated discovery handler
...
Caused by following sequence:
1. Add APIService to map
2. Begin Async Fetch
3. Remove APIService from map
4. Finish Async Fetch & stores apiservice back in map to update lastReconciled time
fixes by removing lastReconciled (only used for testing) and switching tests to just waiting until dirty queue is empty
2023-01-24 17:32:51 -08:00
Kubernetes Prow Robot
d29e3bd7aa
Merge pull request #114731 from pohly/logs-go-flagset
...
logs: add AddGoFlags
2023-01-24 16:58:21 -08:00
Kubernetes Prow Robot
df03edaf75
Merge pull request #114550 from alexzielenski/apiserver/smd/update-kube-openapi
...
update kube-openapi dependency
2023-01-24 16:58:09 -08:00
Kubernetes Prow Robot
14549722e4
Merge pull request #106379 from shivanshu1333/feature/master/105782
...
Implemented MarshalLog in namespacedname.go
2023-01-24 12:55:53 -08:00
Kevin Delgado
3b6c4d307f
Graduate field validation to GA
2023-01-24 17:48:57 +00:00
Patrick Ohly
6f3e5e30e5
logs: consolidate unit tests
...
TestFlags got superseded by TestFlagSet/pflag in
8251a63269
.
2023-01-24 14:58:37 +01:00
Patrick Ohly
d627b1686c
logs: support standard flag.FlagSet
...
This is useful for binaries that don't use pflag and cannot migrate to it
because they have to support the traditional single-dash command line
parsing. pflag is a drop-in replacement at the source code level, but the
behavior of flag parsing in the resulting binary is different.
2023-01-24 14:58:19 +01:00
Alexander Zielenski
7641ff7541
update kube-openapi
2023-01-23 15:32:33 -08:00
Kubernetes Prow Robot
674eb36f92
Merge pull request #115249 from thockin/codegen-13-proto-go-packages
...
Set go_package in all proto files
2023-01-23 12:14:07 -08:00
Kubernetes Prow Robot
cc60df9595
Merge pull request #115267 from enj/enj/i/key_id_flake
...
Prime KMS v2 key ID inline with transformer construction
2023-01-23 10:02:19 -08:00
Tim Hockin
bc1103e45f
Set proto go_package: kubelet plugin register API
...
This exposes that the hand-written code used the wrong package name.
This also creates some diff to the *.pb.go files to note that in the
"options".
You can dump the gzipped blob with the following program (thanks
StackOverflow!):
```go
package main
import (
"bytes"
"compress/gzip"
"encoding/json"
"fmt"
"os"
"io/ioutil"
proto "github.com/golang/protobuf/proto"
dpb "github.com/golang/protobuf/protoc-gen-go/descriptor"
)
func main() {
m := map[string][]byte{
"before": blobv1,
"after": blobv2,
}
arg := os.Args[1]
dump(m[arg])
}
func dump(bytes []byte) {
fd, err := decodeFileDesc(bytes)
if err != nil {
panic(err)
}
b, err := json.MarshalIndent(fd, "", " ")
if err != nil {
panic(err)
}
fmt.Println(string(b))
}
// decompress does gzip decompression.
func decompress(b []byte) ([]byte, error) {
r, err := gzip.NewReader(bytes.NewReader(b))
if err != nil {
return nil, fmt.Errorf("bad gzipped descriptor: %v", err)
}
out, err := ioutil.ReadAll(r)
if err != nil {
return nil, fmt.Errorf("bad gzipped descriptor: %v", err)
}
return out, nil
}
func decodeFileDesc(enc []byte) (*dpb.FileDescriptorProto, error) {
raw, err := decompress(enc)
if err != nil {
return nil, fmt.Errorf("failed to decompress enc: %v", err)
}
fd := new(dpb.FileDescriptorProto)
if err := proto.Unmarshal(raw, fd); err != nil {
return nil, fmt.Errorf("bad descriptor: %v", err)
}
return fd, nil
}
```
2023-01-23 09:48:39 -08:00
Tim Hockin
22ddeb02c1
Set proto go_package: kubelet deviceplugin API
...
This exposes that the hand-written code used the wrong package name.
This also creates some diff to the *.pb.go files to note that in the
"options".
You can dump the gzipped blob with the following program (thanks
StackOverflow!):
```go
package main
import (
"bytes"
"compress/gzip"
"encoding/json"
"fmt"
"os"
"io/ioutil"
proto "github.com/golang/protobuf/proto"
dpb "github.com/golang/protobuf/protoc-gen-go/descriptor"
)
func main() {
m := map[string][]byte{
"before": blobv1,
"after": blobv2,
}
arg := os.Args[1]
dump(m[arg])
}
func dump(bytes []byte) {
fd, err := decodeFileDesc(bytes)
if err != nil {
panic(err)
}
b, err := json.MarshalIndent(fd, "", " ")
if err != nil {
panic(err)
}
fmt.Println(string(b))
}
// decompress does gzip decompression.
func decompress(b []byte) ([]byte, error) {
r, err := gzip.NewReader(bytes.NewReader(b))
if err != nil {
return nil, fmt.Errorf("bad gzipped descriptor: %v", err)
}
out, err := ioutil.ReadAll(r)
if err != nil {
return nil, fmt.Errorf("bad gzipped descriptor: %v", err)
}
return out, nil
}
func decodeFileDesc(enc []byte) (*dpb.FileDescriptorProto, error) {
raw, err := decompress(enc)
if err != nil {
return nil, fmt.Errorf("failed to decompress enc: %v", err)
}
fd := new(dpb.FileDescriptorProto)
if err := proto.Unmarshal(raw, fd); err != nil {
return nil, fmt.Errorf("bad descriptor: %v", err)
}
return fd, nil
}
```
2023-01-23 09:40:26 -08:00
Tim Hockin
e4e26a7f0c
Set proto go_package: kubelet dynamic resource API
...
This package was specifying the option, but wrongly.
This also creates some diff to the *.pb.go files to note that in the
"options".
You can dump the gzipped blob with the following program (thanks
StackOverflow!):
```go
package main
import (
"bytes"
"compress/gzip"
"encoding/json"
"fmt"
"os"
"io/ioutil"
proto "github.com/golang/protobuf/proto"
dpb "github.com/golang/protobuf/protoc-gen-go/descriptor"
)
func main() {
m := map[string][]byte{
"before": blobv1,
"after": blobv2,
}
arg := os.Args[1]
dump(m[arg])
}
func dump(bytes []byte) {
fd, err := decodeFileDesc(bytes)
if err != nil {
panic(err)
}
b, err := json.MarshalIndent(fd, "", " ")
if err != nil {
panic(err)
}
fmt.Println(string(b))
}
// decompress does gzip decompression.
func decompress(b []byte) ([]byte, error) {
r, err := gzip.NewReader(bytes.NewReader(b))
if err != nil {
return nil, fmt.Errorf("bad gzipped descriptor: %v", err)
}
out, err := ioutil.ReadAll(r)
if err != nil {
return nil, fmt.Errorf("bad gzipped descriptor: %v", err)
}
return out, nil
}
func decodeFileDesc(enc []byte) (*dpb.FileDescriptorProto, error) {
raw, err := decompress(enc)
if err != nil {
return nil, fmt.Errorf("failed to decompress enc: %v", err)
}
fd := new(dpb.FileDescriptorProto)
if err := proto.Unmarshal(raw, fd); err != nil {
return nil, fmt.Errorf("bad descriptor: %v", err)
}
return fd, nil
}
```
2023-01-23 09:36:45 -08:00
Tim Hockin
a2603fdb81
Set proto go_package: podresources API
...
This creates some diff to the *.pb.go files to note that
in the "options".
You can dump the gzipped blob with the following program (thanks
StackOverflow!):
```go
package main
import (
"bytes"
"compress/gzip"
"encoding/json"
"fmt"
"os"
"io/ioutil"
proto "github.com/golang/protobuf/proto"
dpb "github.com/golang/protobuf/protoc-gen-go/descriptor"
)
func main() {
m := map[string][]byte{
"before": blobv1,
"after": blobv2,
}
arg := os.Args[1]
dump(m[arg])
}
func dump(bytes []byte) {
fd, err := decodeFileDesc(bytes)
if err != nil {
panic(err)
}
b, err := json.MarshalIndent(fd, "", " ")
if err != nil {
panic(err)
}
fmt.Println(string(b))
}
// decompress does gzip decompression.
func decompress(b []byte) ([]byte, error) {
r, err := gzip.NewReader(bytes.NewReader(b))
if err != nil {
return nil, fmt.Errorf("bad gzipped descriptor: %v", err)
}
out, err := ioutil.ReadAll(r)
if err != nil {
return nil, fmt.Errorf("bad gzipped descriptor: %v", err)
}
return out, nil
}
func decodeFileDesc(enc []byte) (*dpb.FileDescriptorProto, error) {
raw, err := decompress(enc)
if err != nil {
return nil, fmt.Errorf("failed to decompress enc: %v", err)
}
fd := new(dpb.FileDescriptorProto)
if err := proto.Unmarshal(raw, fd); err != nil {
return nil, fmt.Errorf("bad descriptor: %v", err)
}
return fd, nil
}
```
2023-01-23 09:31:20 -08:00
Tim Hockin
ab11d8a449
Set proto go_package: kms API
...
This creates some diff to the *.pb.go files to note that
in the "options".
You can dump the gzipped blob with the following program (thanks
StackOverflow!):
```go
package main
import (
"bytes"
"compress/gzip"
"encoding/json"
"fmt"
"os"
"io/ioutil"
proto "github.com/golang/protobuf/proto"
dpb "github.com/golang/protobuf/protoc-gen-go/descriptor"
)
func main() {
m := map[string][]byte{
"before": blobv1,
"after": blobv2,
}
arg := os.Args[1]
dump(m[arg])
}
func dump(bytes []byte) {
fd, err := decodeFileDesc(bytes)
if err != nil {
panic(err)
}
b, err := json.MarshalIndent(fd, "", " ")
if err != nil {
panic(err)
}
fmt.Println(string(b))
}
// decompress does gzip decompression.
func decompress(b []byte) ([]byte, error) {
r, err := gzip.NewReader(bytes.NewReader(b))
if err != nil {
return nil, fmt.Errorf("bad gzipped descriptor: %v", err)
}
out, err := ioutil.ReadAll(r)
if err != nil {
return nil, fmt.Errorf("bad gzipped descriptor: %v", err)
}
return out, nil
}
func decodeFileDesc(enc []byte) (*dpb.FileDescriptorProto, error) {
raw, err := decompress(enc)
if err != nil {
return nil, fmt.Errorf("failed to decompress enc: %v", err)
}
fd := new(dpb.FileDescriptorProto)
if err := proto.Unmarshal(raw, fd); err != nil {
return nil, fmt.Errorf("bad descriptor: %v", err)
}
return fd, nil
}
```
2023-01-23 09:31:19 -08:00
Monis Khan
345f41f8e5
Prime KMS v2 key ID inline with transformer construction
...
Signed-off-by: Monis Khan <mok@microsoft.com >
2023-01-23 10:14:46 -05:00
Patrick Ohly
bc6c7fa912
logging: fix names of keys
...
The stricter checking with the upcoming logcheck v0.4.1 pointed out these names
which don't comply with our recommendations in
https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/migration-to-structured-logging.md#name-arguments .
2023-01-23 14:24:29 +01:00
Mikhail Mazurskiy
771ab7488d
Always emit the stopped leading event
2023-01-23 21:07:45 +11:00
Kubernetes Prow Robot
91cfe7f0c3
Merge pull request #115246 from thockin/codegen-11-swagger-from-update-codegen
...
Generate swagger from update-codegen
2023-01-22 11:24:10 -08:00
Kubernetes Prow Robot
bc2fccaa96
Merge pull request #115245 from thockin/codegen-10-protobuf-from-update-codegen
...
Call update-generated-protobuf from update-codegen
2023-01-22 11:24:03 -08:00
Tim Hockin
1c466a8190
Generate swagger from update-codegen
...
Swagger "docs" are actually Go code, which is used by other codegen
tools, so if you really want to regen EVERYTHING, this is part of it and
sequence matters.
2023-01-21 16:51:25 -08:00
Tim Hockin
0ef664c278
Call update-generated-protobuf from update-codegen
...
Calling update-codegen.sh with no arguments runs all the functions in
definition order. Client-generation depends on protobuf, so protobuf
codegen needs to be near the beginning.
Also add some debug output for protobuf generation.
Also hide some old, verbose debug output.
2023-01-21 16:32:18 -08:00
Tim Hockin
4dae505d53
Call update-proto-bindings from update-codegen
...
One script to bring them all ...
2023-01-21 15:17:42 -08:00
Tim Hockin
a057f35c90
Move update-generated-runtime into common script
...
Now update-generated-proto-bindings rules all the api.pb.go generation.
Running this shows no delta on the runtime.pb.go
This exposes an issue in how protoc is called for protos that specify
`go_package` which is fixed here.
Not all of our protos specify that option (even though it is
recommended), which will be fixed subsequently.
2023-01-21 15:17:14 -08:00
Tim Hockin
e0ecccff3f
Merge 5 fragile proto-bindings scripts into 1
...
Each of these scripts is basically identical, and all were too brittle.
Now they should be more resilient and easier to manage. The script
still needs to be updated if we add new ones, which I do not love.
More cleanup to follow.
2023-01-21 15:17:13 -08:00
Kubernetes Prow Robot
4d42fbccbc
Merge pull request #115196 from thockin/codegen-5-dont-gen-clients-for-internal
...
Don't generate clients for example internal APIs
2023-01-20 19:34:10 -08:00
Kubernetes Prow Robot
92f0818cf2
Merge pull request #114609 from pohly/log-runtime-verbosity-level
...
runtime log verbosity level changes
2023-01-20 19:34:02 -08:00
Kubernetes Prow Robot
afe936fee5
Merge pull request #115191 from jkh52/zero-one-one
...
Bump konnectivity-client to v0.1.1
2023-01-20 17:56:02 -08:00
Tim Hockin
c66808333f
Don't generate clients for example internal APIs
...
Remove the generated code and the code that would generate them.
More cleanups will follow.
2023-01-20 14:09:36 -08:00
Kubernetes Prow Robot
9787f46bbf
Merge pull request #115230 from aojea/tlog_racxe
...
solve race on NewHTTPProxyHandler
2023-01-20 10:52:16 -08:00
Kubernetes Prow Robot
b0ed87078e
Merge pull request #115113 from smarterclayton/exponential_context
...
wait: ExponentialBackoffWithContext should take context-aware fn
2023-01-20 07:38:15 -08:00
Antonio Ojea
80606c895c
solve race on NewHTTPProxyHandler
...
Change-Id: I993ac447c31afa52cc2e53cd9a61069fb6d91253
2023-01-20 14:58:46 +00:00
Kubernetes Prow Robot
325bb26823
Merge pull request #115195 from pohly/log-go-flag-support
...
k8s.io/component-base/logs: match full help text in unit test
2023-01-20 01:22:16 -08:00
Kubernetes Prow Robot
49cd9f673e
Merge pull request #115211 from apelisse/remove-corev1-from-fieldmanager
...
Remove corev1 from fieldmanager
2023-01-19 15:26:15 -08:00
Kubernetes Prow Robot
60d73ba751
Merge pull request #113540 from wongearl/cleanup-client-go
...
diff.ObjectReflectDiff is DEPRECATED use cmp.Diff
2023-01-19 11:52:27 -08:00
Antoine Pelisse
bc0962ad80
fieldmanager: Use unstructured rather than built-in types to remove dependency
2023-01-19 10:48:46 -08:00
Kubernetes Prow Robot
2fba771792
Merge pull request #115186 from thockin/codegen-2-rm-deprecated-clients
...
Remove deprecated and orphaned generated code
2023-01-19 10:28:27 -08:00
Kubernetes Prow Robot
285e7969b2
Merge pull request #114544 from ritazh/kmsv2-keyid-staleness
...
[KMSv2] Use status key ID to determine staleness of encrypted data
2023-01-19 10:28:16 -08:00
Antoine Pelisse
577f3d8c9d
fieldmanager: Copy LastAppliedAnnotation to remove dependency on corev1
2023-01-19 09:38:04 -08:00
Antoine Pelisse
8d40ba73fb
fieldmanager: Move structured benchmarks to their own file
2023-01-19 09:37:20 -08:00