Commit Graph

113691 Commits

Author SHA1 Message Date
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
Davanum Srinivas
1671efe7a8 Do not use a global variable for etcdURL
we are saving this information in an env variable `KUBE_INTEGRATION_ETCD_URL`

So just pick it up from there when needed. Currently when someone uses
framework.RunCustomEtcd directly, the global variable is *not* set and the
code that uses `GetEtcdURL` returns empty string.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-01-22 14:11:26 -05:00
Kubernetes Prow Robot
1e3cc23b9f Merge pull request #115143 from aojea/linger
Kubelet TCP/HTTP probes: improve network resources utilization
2023-01-22 10:00:03 -08:00
Antonio Ojea
dbf178a8d1 add scale test for probes
Change-Id: I1e49943531b569b5e02f82369750a9ca899ae726
2023-01-22 16:57:41 +00:00
Antonio Ojea
bfd8f5178e use custom dialer for http probes 2023-01-22 16:57:41 +00:00
Antonio Ojea
d21f98c6f9 use custom dialer for tcp probes
Change-Id: I323b472606eaf3242b665022afe2a79ecf3b8358
2023-01-22 16:57:41 +00:00
Antonio Ojea
1978008c8f add custom dialer optimized for probes
probe util dial set linger to 1s
2023-01-22 16:57:32 +00:00
Kubernetes Prow Robot
f09b318dda Merge pull request #115248 from thockin/codegen-12-mocks
Codegen: use ls files and pre-remove gen'ed mocks
2023-01-22 05:52:02 -08:00
Kubernetes Prow Robot
b3925d4741 Merge pull request #115250 from thockin/codegen-14-openapi
Remove openapi files before regen
2023-01-21 21:36:02 -08:00
Tim Hockin
597d52ac10 Remove openapi files before regen 2023-01-21 17:46:22 -08:00
Tim Hockin
0a8f102497 Codegen: use ls files and pre-remove gen'ed mocks 2023-01-21 17:29:13 -08:00
Kubernetes Prow Robot
600e46801d Merge pull request #115238 from thockin/codegen-8-proto-bindings
Codegen: move all proto-bindings scripts together
2023-01-21 16:54:04 -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
ac2890df45 Make protobindings gen a bit safer 2023-01-21 15:17:47 -08:00
Tim Hockin
afae402865 Add debug output for protobindings generation 2023-01-21 15:17:46 -08:00
Tim Hockin
c8ce229e64 Codegen: rm protobindings 2023-01-21 15:17:45 -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
589300dd84 Merge pull request #115198 from thockin/codegen-7-remove-genfiles-part1
Codegen: remove generated files before regenerating
2023-01-21 14:34:02 -08:00
Kubernetes Prow Robot
ae876d4f1d Merge pull request #115222 from thockin/call-go-install-instead-of-build-make
Call `go install` instead of build.sh
2023-01-21 12:14:02 -08:00
Tim Hockin
ac90c60cff Codegen: rm informer files before regen 2023-01-21 11:39:27 -08:00
Tim Hockin
9a11efa719 Codegen: rm lister files before regen 2023-01-21 11:39:09 -08:00
Tim Hockin
bb53ed4ff6 Codegen: rm client files before regen 2023-01-21 11:38:44 -08:00
Tim Hockin
b852b36555 Codegen: rm applyconfig files before regen 2023-01-21 11:38:17 -08:00
Tim Hockin
6aea6fe86b Codegen: rm openapi files before regen 2023-01-21 11:31:04 -08:00
Tim Hockin
7f87ecfb9a Codegen: rm conversion files before regen 2023-01-21 11:30:42 -08:00
Tim Hockin
e149f79d4e Codegen: rm defaults files before regen 2023-01-21 11:30:22 -08:00
Tim Hockin
3f0c3f33ca Codegen: rm prerelease files before regen 2023-01-21 11:30:05 -08:00
Tim Hockin
07f7941de6 Codegen: rm deepcopy files before regen 2023-01-21 11:29:40 -08:00
Tim Hockin
8704337395 Codegen: rm generated proto files before regen 2023-01-21 11:27:01 -08:00
Dan Winship
463153fb7c Fix ContainsIPv4Loopback() to match its caller's behavior
ContainsIPv4Loopback() claimed that "::/0" contains IPv4 loopback IPs
(on the theory that listening on "::/0" will listen on "0.0.0.0/0" as
well and thus include IPv4 loopback). But its sole caller (the
iptables proxier) doesn't use listen() to accept connections, so this
theory was completely mistaken; if you passed, eg,
`--nodeport-addresses 192.168.0.0/0,::/0`, then it would not create
any rule that accepted nodeport connections on 127.0.0.1, but it would
nonetheless end up setting route_localnet=1 because
ContainsIPv4Loopback() claimed it needed to. Fix this.
2023-01-21 14:25:08 -05:00
Dan Winship
53b24f4ddf Improve GetNodeAddresses unit test
Add names to the tests and use t.Run() (rather than having them just
be numbered, with number 9 mistakenly being used twice thus throwing
off all the later numbers...)

Remove unnecessary FakeNetwork element from the testCases struct since
it's always the same. Remove the expectedErr value since a non-nil
error is expected if and only if the returned set is nil, and there's
no reason to test the exact text of the error message.

Fix weird IPv6 subnet sizes.

Change the dual-stack tests to (a) actually have dual-stack interface
addrs, and (b) use a routable IPv6 address, not just localhost (given
that we never actually want to use IPv6 localhost for nodeports).
2023-01-21 14:25:08 -05:00
Dan Winship
fe49e3933d Move GetNodeAddresses() and ContainsIPv4Loopback() into a new file
Both sound slightly generic, but implement semantics specific to the
handling of NodePort addresses.

(No changes other than moving code.)
2023-01-21 14:25:07 -05:00
Tim Hockin
b201c08cea Simplify find in codegen
The `find` tool has hard to comprehend syntax and does not consider
things excluded by .gitignore.  I keep tripping over this in my own
repos, where I have __stuff which gets found.

This converts update-codegen to use `git ls-files` in a seemingly
equivalent way (`-cmo --exclude-standard`).  I verified it finds the
same set of files as before.

This also drops some obsolete filtering.

Also hide grep errors for not-found files, which can happen if a file is
removed but git ls-files still knows it.

Re-running update-codegen shows no diffs.

This will make subsequent changes easier.
2023-01-21 11:22:39 -08:00
Tim Hockin
04c80d0a23 Simplify verify-codegen to use worktrees 2023-01-21 11:16:15 -08:00
Tim Hockin
7c262b901f Set GOCACHE and GOMODCACHE
If these are not set, set them.  This ensures that any subsequent
scripts we call (which may call setup_env again) use the same values.
2023-01-21 11:16:14 -08:00
Tim Hockin
965d5d8608 Make boilerplate.py smarter about generated
Don't just grep for DO NOT EDIT - anchor it in something that looks like
a comment and alone on a line.

Also ignore __* dirs

Prevent it from triggering on update-generated-swagger-docs (hack, but
better than before)
2023-01-21 11:16:13 -08:00
Kubernetes Prow Robot
d9c371a2c4 Merge pull request #115207 from daman1807/master
e2e/network_policy: using Poll Immediate for intra pod connectivity probes
2023-01-20 21:18:02 -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
Abu Kashem
841311ada2 apiserver: CVE-2022-1996, validate cors-allowed-origins server option 2023-01-20 14:15:51 -05:00