The kubelet certificate manager was using a closure to get the node addresses,
but this closure depended on a static field that was only updated during the node
status update. This created a twisted dependency between the node.status
reconcile loops and the certificate manager.
This commit fixes this issue by using the node informer to get the node addresses directly.
This ensures that the kubelet always requests a certificate with the latest node addresses.
* Always for Immutable selector in Deployment Replicaset Daemonset
With extensions/v1beta1 removed there is no need of a special case
to check for Spec.Selector immutability.
The ValidateImmutableField is now moved into the
Validate[Resource]Update method, tests for v1beta1 are removed and test
for v1 are added.
Validation tests were updated to reflect the changes,
mostly decoupling other fields changes from selectors and creating a
dedicated case to test selector immutability.
* Move validation inside appropriate function
* Fix validation tests
* Introduce new boolean `cache{Una,A}uthorizedRequests` field
* Run `hack/update-codegen.sh`
* Respect legacy flags values for caching
With the legacy `--authorization-webhook-cache-{un}authorized-ttl`
flags, caching was disabled when the TTL was set to `0`, so let's
continue doing so when building the authz configuration struct.
* Pass TTL=0 to webhook authz plugin when cache disabled
With StreamingCollectionEncodingToJSON and
StreamingCollectionEncodingToProtobuf, the WatchList must re-justify its
necessity. To prevent an ecosystem from building around a feature that
may not be promoted, we will stop serving list-via-watch until
performance numbers can justify its inclusion.
This also stops the kube-controller-manager from using the
list-via-watch by default. The fallback is a regular list, so during
the skew during an upgrade the "right" thing will happen and the new
StreamingCollectionEncoding will be used.
When preemption finds no candidates, it currently makes an explicit API
call to clear the pod's nominatedNodeName in findCandidates(). However,
this is redundant because:
1. When no candidates are found, Preempt() returns a PostFilterResult with
an empty nominatedNodeName via NewPostFilterResultWithNominatedNode("")
2. This empty nominatedNodeName is propagated through the scheduling
cycle to handleSchedulingFailure()
3. handleSchedulingFailure() then properly clears the nominatedNodeName
through updatePod()
Remove the explicit ClearNominatedNodeName call in findCandidates() to
reduce unnecessary API calls while maintaining the same behavior.
This change improves performance by eliminating a duplicate API call
without changing the functional behavior of preemption.
This change modifies the validation logic for ServiceCIDR updates
(`ValidateServiceCIDRUpdate`) to specifically permit upgrading a
single-stack ServiceCIDR (either IPv4 or IPv6) to a dual-stack
configuration.
This reconfiguration path is considered safe because it only involves adding
a new CIDR range without altering the existing primary CIDR. This
ensures that existing Service IP allocations are not disrupted.
Other modifications, such as:
- Downgrading from dual-stack to single-stack
- Reordering CIDRs in a dual-stack configuration
- Changing the primary CIDR during a single-to-dual-stack
reconfiguration
remain disallowed by the validation. These operations carry a higher
risk of breaking existing Services or cluster networking
configurations. Preventing these updates automatically encourages
administrators to perform such changes manually after carefully
assessing the potential impact on their specific cluster environment.
The validation errors and controller logs provide guidance when such
disallowed changes are attempted.
Change-Id: I41dc09dfddb05f277925da2262f8114d6accbd1d