Commit Graph

113612 Commits

Author SHA1 Message Date
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
Kubernetes Prow Robot
9787f46bbf
Merge pull request #115230 from aojea/tlog_racxe
solve race on NewHTTPProxyHandler
2023-01-20 10:52:16 -08:00
Tim Hockin
8fbcad4612
Call 'go install' instead of build.sh
The env vars are needed until go workspaces lands, then it can get
simpler.

Downsides to this:
  1) If you don't call kube::golang::setup_env, it might work but will
     just splat results somewhere
  2) The resultant binaries are not in _output/bin but instead in the
     phony GOPATH/bin (which setup_env puts in PATH)
2023-01-20 10:44:02 -08:00
Patrick Ohly
66dfac3b18 kube-proxy: support the logging feature gates
When trying to bring up a cluster via kubeadm with these feature gates enabled,
kube-proxy fails because it didn't know about them:

    kind: Cluster
    apiVersion: kind.x-k8s.io/v1alpha4
    nodes:
    - role: control-plane
    - role: worker
    - role: worker
    featureGates: {"DynamicResourceAllocation":true,"ContextualLogging":true}
    runtimeConfig: {"resource.k8s.io/v1alpha1":"true"}

    =>

    2023-01-20T07:07:54.474966617Z stderr F E0120 07:07:54.474846       1 run.go:74] "command failed" err="failed complete: unrecognized feature gate: ContextualLogging"

The effect of the logging feature gates is minor for kube-proxy, supporting
them is mostly useful for the sake of consistency and to support kubeadm.
2023-01-20 19:31:57 +01: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
Daman
faee4c33de e2e/network_policy: using PollImmediate for intra pod connectivity probes 2023-01-20 20:05:28 +05:30
Kubernetes Prow Robot
02f893b6e2
Merge pull request #115125 from adisky/update-cni-version
Update CNI version to 1.2.0
2023-01-20 03:34:15 -08: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
5fe3563ad7
Merge pull request #114915 from brianwang12/master
test images: Update CudaVectorAdd test image to support arm64
2023-01-19 20:30:14 -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
56a14025b0
Merge pull request #115193 from SataQiu/update-storage-api-20230119
apiserver: update serialization version priority for policy API
2023-01-19 13:44: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
Kubernetes Prow Robot
7913e135a5
Merge pull request #112925 from SergeyKanzhelev/addValueOfLimitToErr
added limit value to the pod validation error to simplify debugging
2023-01-19 11:52:15 -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
Alexander Zielenski
b969dfec9f use typedinformer if available
reduces memory and cpu when things like configmap are used as a param

cannot be shared due to limitatoins of sharedinformerfactory
2023-01-19 10:05:48 -08:00
Alexander Zielenski
0c495cb429 use namespacedName for keys in fakeCompiler 2023-01-19 10:05:48 -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
Kubernetes Release Robot
fd83273fa5 CHANGELOG: Update directory for v1.24.10 release 2023-01-19 17:04:21 +00:00
Rita Zhang
510ac9b391
kmsv2: use status key ID to update staleness of encrypted data
Signed-off-by: Rita Zhang <rita.z.zhang@gmail.com>
2023-01-19 08:09:24 -08:00
Kubernetes Prow Robot
6b55f097bb
Merge pull request #114976 from kidddddddddddddddddddddd/python3
use python3 in hack
2023-01-19 07:24:47 -08:00
Kubernetes Prow Robot
c02b7e7a81
Merge pull request #114936 from seans3/openapi-validation-refactor
Refactor validation files into pkg/validation
2023-01-19 07:24:35 -08:00
Swati Sehgal
340db7109d node: e2e: topologymgr: add tests for topology manager metrics
Add node e2e tests to verify population of topology metrics.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-01-19 14:40:37 +00:00
Swati Sehgal
51c6a1fbe7 node: e2e: cpumgr: Rename: s/getCPUManagerMetrics/getKubeletMetrics
Since we need to gather kubelet metrics for CPU Manager and Topology
Manager, renaming this function to a more generic name.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-01-19 14:18:05 +00:00