This removes a dependency from generated applyconfigurations to a testing
package. To do this, the type converter in the testing package has been
moved out to the apimachinery package and the utilities the converter
depend on have been reorganized.
Kubernetes-commit: 4821604f83a6f4764497879b666087ba7cb05060
Normal execution always started to trigger this after adding more logging in
the E2E framework's exec_util.go:
I0506 21:23:56.781188 6341 exec_util.go:201] unexpected error trying to use websockets for pod exec: <nil>
That the "should fall back" implementation gets called when there is no error
and thus no reason to even consider falling back is odd. Now the execute
implementation checks for nil first.
This is the same approach taken also in the portforward code:
b35c5c0a30/staging/src/k8s.io/client-go/tools/portforward/fallback_dialer.go (L52)
Kubernetes-commit: 35870c480d64a8ae35c0e5839cc40b0115b7328a
Promoted feature-gate `VolumeAttributesClass` to GA (on by default)
Signed-off-by: carlory <baofa.fan@daocloud.io>
Kubernetes-commit: 94bf8fc8a9d1d6c989eddad07996be0ca4dd3448
This is what happens when writing back a OIDC refresh token:
- plugin/pkg/client/auth/oidc/oidc.go:282
Calls `Persist` to save the new refresh token.
- tools/clientcmd/config.go:372
Calls `ModifyConfig` to save the config.
- tools/clientcmd/config.go:167
Calls `configAccess.GetLoadingPrecedence()` to get the files
listed from the `KUBECONFIG` environment variable.
- tools/clientcmd/loader.go:334
If the `ConfigAccess` was a `ClientConfigLoadingRules`, it
directly returns the `Precedence` slice from its `rules`
field.
THE PROBLEM:
The slice can be modified by the caller, unintentionally
changing the value of the `ClientConfigLoadingRules`'
`Precedence` field.
- tools/clientcmd/config.go:170
Then proceeds to in-place sort the slice returned by the
`ConfigAccess`. This is the same slice (by identity)
as the `ClientConfigLoadingRules`' `Precedence` field,
destroying its intended order.
- tools/clientcmd/config.go:179
Calls `configAccess.GetStartingConfig` to read the original
config so it can be compared with the new config.
- tools/clientcmd/loader.go:339
Calls `NewNonInteractiveDeferredLoadingClientConfig` with
itself as a parameter.
CONSEQUENCE:
At this point, its the `Precedence` has been
unintentionally sorted. When it loads the
config again, it gives precedence to whichever
file comes first in ascending alphabetical order.
- tools/clientcmd/config.go:192
If the file returned by `GetStartingConfig` has a
different `current-context` than the new config,
it calls `writeCurrentContext` to update the first
kubeconfig file in the `KUBECONFIG` environment
variable.
- tools/clientcmd/config.go:403
Calls `configAccess.GetDefaultFilename` to find the
destination kubeconfig file.
- tools/clientcmd/loader.go:358
Iterates through the kubeconfig files returned by
`GetLoadingPreferences` to find the first file
that exists.
CONSEQUENCE:
With the slice being sorted earlier, the files
returned by this call of `GetLoadingPreferences`
will be sorted alphabetically, rather than by
their intended order.
Kubernetes-commit: ffa084f81129ea685b176a282921c4d54906c539
- Add a new VeryShortWatchError struct for error matching, returned
by `handleAnyWatch`, up through `Reflector.ListAndWatch`.
- Update test expectations to match exact errors.
Kubernetes-commit: 6eff9db0f10db72f2c64390e106a80621d136439
Change:
- refactor Reflector.ListAndWatch and Reflector.watch to always call
watcher.Stop.
- refactor Reflector.handleAnyWatch to always call watcher.Stop,
EXCEPT when exitOnWatchListBookmarkReceived &&
watchListBookmarkReceived.
- Update unit tests with these new expectations.
Effect:
- ensures watcher.Stop is always called at least once
- avoids deadlocks in watcher implementations when watcher.Watch is
called, but watcher.Stop is never called.
Note: It's impossible to guarantee that Stop will only be called once.
So watch.Interface implementations must tollerate Stop being called
multiple times.
Kubernetes-commit: 3e609ecf6e945bf4562bddfc563fde9a4c3d0d90
API approvers review new fields and need permissions to approve the
files generated from those new fields
Kubernetes-commit: 691398c8563f12db07505df7c05211e93145689a