The underlying implementation has both. Exposing that in the result of
Discovery() makes it easier for consumers to call the WithContext methods
because they don't need to wrap with ToDiscoveryInterfaceWithContext().
This is a breaking Go API change because tests which implement
the interface have to be updated.
Make the kube-proxy bindAddress defaulting warnings address-family aware
by emitting two distinct, independent warnings:
- warn when the bindAddress IP family differs from the API server
advertise address family (a single-stack cluster would otherwise be
unreachable on the other family).
- warn when the bindAddress is not the recommended wildcard default for
its own IP family, recommending the per-family default (0.0.0.0 / ::).
This removes the previous contradictory warning that recommended the
other family solely based on the advertise address.
It is a new file, so it should use the yearless copyright boilerplate
(hack/boilerplate/boilerplate.go.txt) instead of a fixed year.
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
These cAdvisor flags were registered with the kubelet by mistake and marked
deprecated back in 2018: application_metrics_count_limit, boot_id_file,
container_hints, containerd, enable_load_reader, event_storage_age_limit,
event_storage_event_limit, global_housekeeping_interval, log_cadvisor_usage,
machine_id_file, the storage_driver_* family, and containerd-namespace. They
are well past the standard CLI deprecation timeline, so stop registering them.
housekeeping_interval is the only flag the kubelet still exposes (node e2e
relies on it). With the deprecated flags gone, registerDeprecated and the
blank imports that existed only to register those flags on the global flag
set are no longer needed; the cadvisor manager import still provides
housekeeping_interval.
Moved the CloudNodeLifecycleController configuration fields out of the
KubeCloudSharedConfiguration, and created a dedicated component-specific
config package. Also moved the node-monitor-period, while keeping the
old flag (with deprecation message). No new flag for node-monitor-period
was added, due to
https://kubernetes.io/docs/reference/using-api/deprecation-policy/#deprecating-a-flag-or-cli-argument.
- Introduces a new flag --cloud-node-lifecycle-monitor-nodes-workers to CloudControllerManager.
- Updates unit tests and v1alpha1 API with default value of 1.
- Regenerates conversion and OpenAPI code.
addCadvisorFlags ranged over cadvisorflags.Kept(), so a cAdvisor release that
adds a name to that list would silently expose a new kubelet flag. Bind
HousekeepingInterval explicitly and test that Kept() still includes it.
Add import-boss .import-restrictions so the lean github.com/google/cadvisor/lib module is allowed only in the directories that consume it -- pkg/kubelet, cmd/kubelet/app, and pkg/proxy/conntrack -- and forbidden everywhere else. The repo-root .import-restrictions default-denies all github.com/google/cadvisor imports; the three consumer subtrees re-allow only .../lib.
Migrate the kubelet (and the kube-proxy conntrack helper) off the full github.com/google/cadvisor module onto the lean github.com/google/cadvisor/lib: repoint info/v1+info/v2 type usage to lib/model and the manager/fs/cache/etc. consumers to lib/*; regenerate the cadvisor.Interface mocks; keep the kubelet-pinned cAdvisor global flags via lib/cadvisorflags.
go.mod: require + replace github.com/google/cadvisor/lib (=> the dims/cadvisor/lib fork for now, until lib is tagged) and drop the full github.com/google/cadvisor module entirely; keep github.com/containerd/containerd/api at v1.11.0 (matching upstream master); add github.com/google/cadvisor to unwanted-dependencies.json unwantedModules so the full module cannot be re-vendored.
test/e2e_node: the one remaining consumer of the full module -- the node-e2e ResourceCollector, which used the v2 HTTP client (client/v2) + v2 API types (info/v2) -- now scrapes the standalone cAdvisor pod's /api/v2.1/stats directly over HTTP+JSON, so test/e2e_node depends on no cAdvisor package. No change to the kubelet's stats surfaces.
StorageCapacityScoring is now beta and enabled by default at binary
version v1.37+, so explicitly setting it via SetFeatureGateDuringTest
before each test case is no longer necessary. Remove the restoreFeatures
field and its usages.
- Bump the binary version to 1.37 so the beta default takes effect.
The existing "default config" test now implicitly covers the
enabled-by-default case.
- Update the existing test: rename from "alpha" to "beta" and fix
`restoreFeatures` to restore to `true` (the beta default).
- Add a new test case for the opt-out scenario (explicitly disabling
the beta feature).
StorageCapacityScoring was introduced as alpha in v1.33 (default: false)
and is now promoted to beta (default: true).
Update tests to account for the new default behavior: when
StorageCapacityScoring is enabled, SetDefaults_VolumeBindingArgs now
populates Shape in VolumeBindingArgs, which existing tests did not
expect.
- Add default Shape to expected VolumeBindingArgs in test fixtures
and explicit test cases
- Disable StorageCapacityScoring in TestValidateVolumeBindingArgs
cases that only test BindTimeoutSeconds validation
- Explicitly set EnableStorageCapacityScoring: true in
TestSchedulerSchedulePod's feature.Features struct
- Strip Shape from VolumeBinding args in Test_UnionedGVKs when
using emulation version 1.33 or 1.34 (where StorageCapacityScoring
is alpha and disabled by default)
In 1.37 kube-proxy will start throwing warnings if the
user has not set the 'mode' field explicitly.
This is part of the steps to migrate the default 'mode'
from 'iptables' to 'nftables'.
During kubeadm join, the mandatory kubeadm-config ConfigMap fetch uses
GetConfigMapWithShortRetry, which has a 350ms polling budget. When the
API server is slow to respond, the single GET attempt blocks for up to
10 seconds (the client timeout), exhausting the polling budget with no
retry. Since this call site has no fallback, the join fails.
Add a shortConfigMapGet parameter to getInitConfigurationFromCluster
and FetchInitConfigurationFromCluster. When false, the kubeadm-config
ConfigMap is fetched using KubernetesAPICallTimeout (default 1 minute,
user-configurable) with retries, matching the pattern used by
getAPIEndpointFromPodAnnotation. When true, the existing
GetConfigMapWithShortRetry is used for callers like kubeadm reset that
don't need a long retry.
Signed-off-by: Damiano Donati <damiano.donati@gmail.com>
StorageCapacityScoring is introduced as Alpha at v1.33. With binary
version set to 1.32, it is PreAlpha and cannot be set explicitly,
causing a panic when registering the feature gate.