Commit Graph

106996 Commits

Author SHA1 Message Date
Joe Betz
fd5ae0451d Add stdlib of CEL functions to Kubernetes that extends the standard library provided by CEL 2022-03-02 20:27:21 -05:00
Kubernetes Prow Robot
16c9d59d2d
Merge pull request #108454 from enj/patch-3
Add enj to hack OWNERS
2022-03-02 13:29:13 -08:00
Eddie Zaneski
dfcc141c91
Improve error message for missing CRDs
Signed-off-by: Eddie Zaneski <eddiezane@gmail.com>
2022-03-02 13:59:23 -07:00
Abu Kashem
cecc563d3b
client-go: refactor retry logic for backoff, rate limiter and metric 2022-03-02 14:38:30 -05:00
Damien Grisonnet
6b368c5031 apimachinery/pkg/util/proxy: escape forwarded URI
Escape the forwarded URI set in the round-tripper to prevent any kind of
malicious injection into the "X-Forwarded-Uri" header.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2022-03-02 18:54:59 +01:00
Kubernetes Prow Robot
4fcfc58d1b
Merge pull request #108315 from Monokaix/print-getStaticPodSingleHash-err
kubeadm: improve getStaticPodSingleHash error messages
2022-03-02 09:17:14 -08:00
ialidzhikov
bdbc750129 apiserver: Remove the deprecated --target-ram-mb flag
Signed-off-by: ialidzhikov <i.alidjikov@gmail.com>
2022-03-02 18:52:46 +02:00
Davanum Srinivas
abdcbb8235
Enable specifying pause image in containerd config.toml
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-03-02 11:51:06 -05:00
Kubernetes Prow Robot
4737127b57
Merge pull request #108429 from dims/allow-env-var-to-be-remote-url
Allow KUBE_TEST_REPO_LIST to be a remote url as well
2022-03-02 08:07:16 -08:00
Mo Khan
4baefef99a
Add enj to hack OWNERS 2022-03-02 10:04:11 -05:00
Kubernetes Prow Robot
88f9728339
Merge pull request #108309 from zshihang/token
no auto-generation of secret-based service account token
2022-03-02 06:19:15 -08:00
Quan Tian
906e6d4670 Stop publishing Pod ResourceVersion in Endpoints and EndpointSlice API
The field is not used anywhere and its value may be stale as Endpoints
and EndpointSlice won't be updated if there is only Pod ResourceVersion
change..
2022-03-02 22:12:35 +08:00
ialidzhikov
ee2530ffd4 apiserver: Remove the deprecated --deserialization-cache-size flag
Signed-off-by: ialidzhikov <i.alidjikov@gmail.com>
2022-03-02 15:33:21 +02:00
Kubernetes Prow Robot
422001df8b
Merge pull request #108154 from klueska/fix-topology-manager
Update TopologyManager algorithm for selecting "best" non-preferred hint
2022-03-02 04:13:13 -08:00
Humble Chirammal
d727d7db1a csi: add validation tests for CSIVolumeSource
This commit adds the validation tests for CSIVolumeSource explictly.
Also validate driver,nodePublishSecretRef..etc

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-03-02 16:10:18 +05:30
Humble Chirammal
1f0d37c082 csi: add unit tests for {controller,node}Publish name & namespace
Extra test conditions are added in CSIPersistentVolumeSource validation
for controllerPublishSecretRef and nodePublishSecretRef name and namespace to check
whether name field or namespace field is missing from the secretRef while
validating CSI PersistentVolumeSource

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-03-02 16:10:11 +05:30
Humble Chirammal
8ae6e10fd0 csi: correct typo and use strings.Repeat func for long driver name
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-03-02 15:50:58 +05:30
Kubernetes Prow Robot
0dc83fe696
Merge pull request #108078 from tnqn/endpoints-resync
Skip updating Endpoints if no relevant fields change
2022-03-01 23:23:13 -08:00
Davanum Srinivas
08af9935a5
fix broken find command
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-03-01 22:54:31 -05:00
Kubernetes Prow Robot
7852ba093d
Merge pull request #108228 from AllenZMC/imporve_code_specification
fix defer in for loop, maybe resource leak
2022-03-01 19:27:13 -08:00
XuzhengChang
7824316e89 Print getStaticPodSingleHash err message 2022-03-02 09:34:12 +08:00
Kubernetes Prow Robot
2de37aa9fa
Merge pull request #108276 from AllenZMC/improve_util_test_coverage
improve test coverage
2022-03-01 16:57:13 -08:00
Kubernetes Prow Robot
604ab4fc6c
Merge pull request #108340 from ArangoGutierrez/misspelled/1
Fix typo in pkg/kubelet/pluginmanager/cache/actual_state_of_world
2022-03-01 15:45:55 -08:00
Kubernetes Prow Robot
5d6a793221
Merge pull request #96828 from panjf2000/opt-epoll-eventfd
kubelet/eviction: eliminate redundant allocations when handling eventfd
2022-03-01 13:59:54 -08:00
Stephen Heywood
5597b0c4fb Promote replace podtemplate e2e test to Conformance 2022-03-02 10:33:02 +13:00
Kubernetes Prow Robot
bed430d337
Merge pull request #108389 from serathius/etcd-v3.6.0-alpha.0
Start building etcd v3.6.0-alpha.0 image for scalability tests
2022-03-01 12:50:06 -08:00
Kubernetes Prow Robot
66daef4aa7
Merge pull request #108167 from jfremy/fix-107973
Fix nodes volumesAttached status not being updated
2022-03-01 12:49:54 -08:00
Davanum Srinivas
6f3765b731
Allow KUBE_TEST_REPO_LIST to be a remote url as well
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-03-01 13:44:51 -05:00
Kubernetes Prow Robot
8ab0a59394
Merge pull request #108417 from dims/log-where-we-pull-images-from
Log where we pull images from in an e2e test
2022-03-01 10:16:07 -08:00
Kubernetes Prow Robot
0e8e307567
Merge pull request #106570 from odinuge/fix-cpu-shares-on-big-systems
Fix cpu share issues on systems with large amounts of cpu
2022-03-01 10:15:55 -08:00
Kevin Klues
e370b7335c Add extensive unit testing for TopologyManager hint generation algorithm
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2022-03-01 17:30:24 +00:00
ialidzhikov
244bf1bd69 apiserver: Remove the deprecated --experimental-encryption-provider-config flag
Signed-off-by: ialidzhikov <i.alidjikov@gmail.com>
2022-03-01 19:21:18 +02:00
Kubernetes Prow Robot
c67a19dde9
Merge pull request #108408 from aojea/integration_leaks
integration framework: log number of leaked goroutines
2022-03-01 08:53:59 -08:00
Kubernetes Prow Robot
46e78c1b80
Merge pull request #108407 from kerthcet/feature/graduate-defaultPodTopologySpread-to-ga-in-kube-feature
update feature gate DefaultPodTopologySpread release note
2022-03-01 08:53:47 -08:00
Tim Hockin
bf27cad256 Build flags: use all= syntax
This has somewhat subtle implications.  For a concrete example, this
changes the `-trimpath` behavior from only affecting the named pkg to
affecting all pkgs, which broke ginkgo, which seems to try to strip its
own `pwd` prefix.  But since that runs in run-in-gopath, and not in
KUBE_ROOT, it fails to strip anything.

e.g.

before this, strings in the binary would be like
    /home/user/kube/_output/local/go/src/k8s.io/kubernetes/vendor/github.com/onsi/ginkgo/...
Ginkgo would find its own root as
    /home/user/kube/_output/local/go/src/k8s.io/kubernetes/
so it would produce
    vendor/github.com/onsi/ginkgo/...
in logs.

after this, strings in the binary strip the KUBE_ROOT and be like:
    _output/local/go/src/k8s.io/kubernetes/vendor/github.com/onsi/ginkgo/...
Ginkgo would find its own root as
    /home/user/kube/_output/local/go/src/k8s.io/kubernetes/
so it would not strip anything, and produce
    _output/local/go/src/k8s.io/kubernetes/vendor/github.com/onsi/ginkgo/...
in logs.
2022-03-01 08:48:31 -08:00
Tim Hockin
ed5e549cde Makefile: Add a DBG flag to build debug binaries
Now `make DBG=1` will produce binaries with no optimizaions and no
inlining, but with symbols and DWARF information.
2022-03-01 08:47:34 -08:00
Tim Hockin
56ad63913a Make builds fail if go2make misbehaves
Rather than an obscure error.
2022-03-01 08:37:40 -08:00
Davanum Srinivas
22cef5094e
Log where we pull images from
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-03-01 09:53:19 -05:00
Kevin Klues
99c57828ce Update TopologyManager algorithm for selecting "best" non-preferred hint
For the 'single-numa' and 'restricted' TopologyManager policies, pods are only
admitted if all of their containers have perfect alignment across the set of
resources they are requesting. The best-effort policy, on the other hand, will
prefer allocations that have perfect alignment, but fall back to a non-preferred
alignment if perfect alignment can't be achieved.

The existing algorithm of how to choose the best hint from the set of
"non-preferred" hints is fairly naive and often results in choosing a
sub-optimal hint. It works fine in cases where all resources would end up
coming from a single NUMA node (even if its not the same NUMA nodes), but
breaks down as soon as multiple NUMA nodes are required for the "best"
alignment.  We will never be able to achieve perfect alignment with these
non-preferred hints, but we should try and do something more intelligent than
simply choosing the hint with the narrowest mask.

In an ideal world, we would have the TopologyManager return a set of
"resources-relative" hints (as opposed to a common hint for all resources as is
done today). Each resource-relative hint would indicate how many other
resources could be aligned to it on a given NUMA node, and a  hint provider
would use this information to allocate its resources in the most aligned way
possible. There are likely some edge cases to consider here, but such an
algorithm would allow us to do partial-perfect-alignment of "some" resources,
even if all resources could not be perfectly aligned.

Unfortunately, supporting something like this would require a major redesign to
how the TopologyManager interacts with its hint providers (as well as how those
hint providers make decisions based on the hints they get back).

That said, we can still do better than the naive algorithm we have today, and
this patch provides a mechanism to do so.

We start by looking at the set of hints passed into the TopologyManager for
each resource and generate a list of the minimum number of NUMA nodes required
to satisfy an allocation for a given resource. Each entry in this list then
contains the 'minNUMAAffinity.Count()' for a given resources. Once we have this
list, we find the *maximum* 'minNUMAAffinity.Count()' from the list and mark
that as the 'bestNonPreferredAffinityCount' that we would like to have
associated with whatever "bestHint" we ultimately generate. The intuition being
that we would like to (at the very least) get alignment for those resources
that *require* multiple NUMA nodes to satisfy their allocation. If we can't
quite get there, then we should try to come as close to it as possible.

Once we have this 'bestNonPreferredAffinityCount', the algorithm proceeds as
follows:

If the mergedHint and bestHint are both non-preferred, then try and find a hint
whose affinity count is as close to (but not higher than) the
bestNonPreferredAffinityCount as possible. To do this we need to consider the
following cases and react accordingly:

  1. bestHint.NUMANodeAffinity.Count() >  bestNonPreferredAffinityCount
  2. bestHint.NUMANodeAffinity.Count() == bestNonPreferredAffinityCount
  3. bestHint.NUMANodeAffinity.Count() <  bestNonPreferredAffinityCount

For case (1), the current bestHint is larger than the
bestNonPreferredAffinityCount, so updating to any narrower mergeHint is
preferred over staying where we are.

For case (2), the current bestHint is equal to the
bestNonPreferredAffinityCount, so we would like to stick with what we have
*unless* the current mergedHint is also equal to bestNonPreferredAffinityCount
and it is narrower.

For case (3), the current bestHint is less than bestNonPreferredAffinityCount,
so we would like to creep back up to bestNonPreferredAffinityCount as close as
we can. There are three cases to consider here:

  3a. mergedHint.NUMANodeAffinity.Count() >  bestNonPreferredAffinityCount
  3b. mergedHint.NUMANodeAffinity.Count() == bestNonPreferredAffinityCount
  3c. mergedHint.NUMANodeAffinity.Count() <  bestNonPreferredAffinityCount

For case (3a), we just want to stick with the current bestHint because choosing
a new hint that is greater than bestNonPreferredAffinityCount would be
counter-productive.

For case (3b), we want to immediately update bestHint to the current
mergedHint, making it now equal to bestNonPreferredAffinityCount.

For case (3c), we know that *both* the current bestHint and the current
mergedHint are less than bestNonPreferredAffinityCount, so we want to choose
one that brings us back up as close to bestNonPreferredAffinityCount as
possible. There are three cases to consider here:

  3ca. mergedHint.NUMANodeAffinity.Count() >  bestHint.NUMANodeAffinity.Count()
  3cb. mergedHint.NUMANodeAffinity.Count() <  bestHint.NUMANodeAffinity.Count()
  3cc. mergedHint.NUMANodeAffinity.Count() == bestHint.NUMANodeAffinity.Count()

For case (3ca), we want to immediately update bestHint to mergedHint because
that will bring us closer to the (higher) value of
bestNonPreferredAffinityCount.

For case (3cb), we want to stick with the current bestHint because choosing the
current mergedHint would strictly move us further away from the
bestNonPreferredAffinityCount.

Finally, for case (3cc), we know that the current bestHint and the current
mergedHint are equal, so we simply choose the narrower of the 2.

This patch implements this algorithm for the case where we must choose from a
set of non-preferred hints and provides a set of unit-tests to verify its
correctness.

Signed-off-by: Kevin Klues <kklues@nvidia.com>
2022-03-01 14:38:26 +00:00
Kubernetes Prow Robot
50e07c9a12
Merge pull request #108381 from thockin/add-generated-openapi
Add the last zz_generated.openapi.go file
2022-03-01 06:35:48 -08:00
Antonio Ojea
2660ac8a6d integration framework: log number of leaked goroutines 2022-03-01 15:31:13 +01:00
kerthcet
9c5898ba90 feat: update feature gate DefaultPodTopologySpread release note
Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-03-01 19:06:24 +08:00
Piotr Betkier
13c3f091a7 Small review fixes 2022-03-01 09:24:26 +01:00
Piotr Betkier
50200dc54f Add e2e test for HPA behavior: decreased downscale stabilization 2022-03-01 09:24:26 +01:00
Kubernetes Prow Robot
77f6476d34
Merge pull request #108327 from SergeyKanzhelev/unused_jenkins_files
two files not being used any longer
2022-02-28 19:43:46 -08:00
ZhangJian He
d09947a5b5 Fix typo in watch_based_manager_test 2022-03-01 10:21:17 +08:00
Kubernetes Prow Robot
bef9d807a0
Merge pull request #108325 from pacoxu/donotReturnErrWhenPauseLose
do not return err when PodSandbox not exist
2022-02-28 18:15:46 -08:00
Kubernetes Prow Robot
1cc8edb838
Merge pull request #108286 from ii/replace-pod-template
Write replaceCoreV1NamespacedPodTemplate test - +1 endpoint coverage
2022-02-28 17:11:46 -08:00
Kubernetes Prow Robot
effff78a1f
Merge pull request #107744 from Shubham82/Adding_logs-node_authorizer
Added Logs Statement for a Pod in graph_populator.
2022-02-28 16:07:58 -08:00
Kubernetes Prow Robot
e9ba9dc4e4
Merge pull request #107201 from pacoxu/add-metrics-volume-stats-cal
add VolumeStatCalDuration metrics for fsquato monitoring benchmark
2022-02-28 16:07:46 -08:00