Commit Graph

113404 Commits

Author SHA1 Message Date
Mahmoud Atwa
72d96f61d0 Decrease target value for scale up tests in HPA 2023-01-25 12:58:38 +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
David Porter
b96290c08f e2e node: Update runtime class handler skip logic
There are two runtime class tests which required the container runtime
config to include explicit configuration for `test-handler`. The current
logic skips these tests in non GCE environments. This skip is too strict
since the test is skipped in node e2e environments and in other
environments such as kind, which support running the test and also
configure `test-handler`.

Instead of skipping based on provider, add a new function
`NodeSupportsPreconfiguredRuntimeClassHandler` which examines the
underlying container runtime config and checks if the config includes
`test-handler`. The check is a bit brittle since it assumes container
runtime config paths, but it is a net improvement over skipping the test
entirely on non GCE environments.

This results in the test working in the common test environments, namely
GCE kube-up, node e2e, and kind.

Signed-off-by: David Porter <david@porter.me>
2023-01-24 14:43:24 -08:00
Kubernetes Release Robot
c865a641d3 CHANGELOG: Update directory for v1.27.0-alpha.1 release 2023-01-24 22:30:09 +00: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
Alexander Zielenski
1554e50be4 fix integration test by working around #3030
test uses kind field which is not populated for native types
2023-01-24 12:51:29 -08:00
Kevin Delgado
3b6c4d307f Graduate field validation to GA 2023-01-24 17:48:57 +00:00
Kubernetes Prow Robot
703361f381
Merge pull request #115283 from daman1807/master
e2e/network_policy: using expected==observed as condition for polling probeConnectivity
2023-01-24 09:04:17 -08: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
Kubernetes Prow Robot
c801053791
Merge pull request #115259 from MikeSpreitzer/fix115200
More carefully compose RequestURI for metrics request
2023-01-24 03:58:27 -08:00
Kubernetes Prow Robot
765f2ef7c7
Merge pull request #114981 from adisky/revert
[Test] Revert "Fix:[Flake] [sig-node] Restart [Serial] [Slow] [Disruptive] K…
2023-01-24 03:58:15 -08:00
Kubernetes Prow Robot
a12dd4189e
Merge pull request #115102 from saschagrunert/cri-unavailable
Check for all errors in CRI connection validation
2023-01-24 02:24:17 -08:00
Jurj Andrei George
8f6fa99b49 Skip failing Windows unit tests (volume)
As discussed during the SIG Testing meeting on January 10, 2023, failing
Windows unit tests are now skipped.
These changes should be reverted when the unit tests wil get fixed.
Mentioned SIG Testing meeting:
https://docs.google.com/document/d/1z8MQpr_jTwhmjLMUaqQyBk1EYG_Y_3D4y4YdMJ7V1Kk/edit#heading=h.qwblxf2uhgoo
2023-01-24 11:02:44 +02:00
Alexander Zielenski
7641ff7541 update kube-openapi 2023-01-23 15:32:33 -08:00
Daman
a832d1dbdf e2e/network_policy: using expected==observed as condition for polling in probeConnectivity function 2023-01-24 03:59:01 +05:30
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
Kevin Delgado
f45505d19a Conformance tests for server side field validation 2023-01-23 18:30:58 +00: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
Kubernetes Prow Robot
f267dd8340
Merge pull request #115060 from pohly/logcheck-update
hack: update logtools to v0.4.1
2023-01-23 10:02:11 -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
Tim Hockin
60ffa47f4f
Set proto go_package: kubelet example_plugin_apis
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:18 -08:00
Kubernetes Prow Robot
a58e899392
Merge pull request #115098 from harshanarayana/release-notes-1.27-team
update changelog approver and reviewers for v1.27
2023-01-23 07:20:10 -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
Mike Spreitzer
1d199db03e Carefully compute request path for metrics
Preserve the previx before "api/v1".
2023-01-23 09:44:21 -05:00
Kubernetes Prow Robot
a2785a4960
Merge pull request #114989 from klueska/add-bart0sh-sig-node-reviewer
Add bart0sh as a sig-node reviewer
2023-01-23 06:10:10 -08:00
Patrick Ohly
1d79a191c2 hack: update logtools to v0.4.1
Contains some bug fixes, for example allowing some additional
functions when enforcing contextual logging.
2023-01-23 14:24:29 +01: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
Kubernetes Prow Robot
f21c603417
Merge pull request #111652 from ash2k/ash2k/leader-elector-tweaks
Always emit the stopped leading event
2023-01-23 04:48:10 -08:00
Mikhail Mazurskiy
771ab7488d
Always emit the stopped leading event 2023-01-23 21:07:45 +11:00
Kubernetes Prow Robot
0fcc3dbd55
Merge pull request #115240 from thockin/codegen-9-use-ls-files
Use `git ls-files` in a few places instead of `find`
2023-01-23 00:26:21 -08:00
Kubernetes Prow Robot
aa5f462f5b
Merge pull request #115233 from pohly/kube-proxy-contextual-logging
kube-proxy: support the logging feature gates
2023-01-23 00:26:10 -08:00
Kubernetes Prow Robot
724497cda4
Merge pull request #114094 from Nanfei-Chen/master
Modifies receiver names for struct FakeProxier to make them the same.
2023-01-22 16:30:09 -08:00
Kubernetes Prow Robot
bec431642e
Merge pull request #115254 from dims/do-not-use-global-variable-for-etcd-url
Do not use a global variable for etcdURL
2023-01-22 15:26:15 -08:00
Kubernetes Prow Robot
f212d42086
Merge pull request #115244 from danwinship/nodeport-addresses-1
clean up kube-proxy nodeport address handling (part 1)
2023-01-22 15:26:08 -08:00
Tim Hockin
7229364f0a
Make generated-stable-metrics use git ls-files 2023-01-22 15:22:55 -08:00
Tim Hockin
6a49eae422
Make update-netparse-cve use ls-files 2023-01-22 15:21:37 -08:00
Tim Hockin
822745512d
Make update-gofmt use ls-files 2023-01-22 15:16:23 -08:00
Kubernetes Prow Robot
5a3540f462
Merge pull request #114825 from pohly/e2e-pod-consistently-pending
e2: fix check of "pod is consistently pending"
2023-01-22 12:56:02 -08: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