Releases: deckhouse/lib-connection
Releases · deckhouse/lib-connection
kube log debug requests/ responses in JSON format
Changes:
- Allow only accept json format in kube client for prevent return protobuf from server.
Because clients of library can log all requests/responses to log debug,
log is "broken" because protobuf response output as formatted byte array. - upgrade flant/kube-client to 1.6.0
Add initializers for ssh and kube providers and pass ssh provider initializer to GetRunnerInterface
BREAKING CHANGES:
pkg/provider.GetRunnerInterfacenow take context andSSHProviderInitializerinstead ofSSHProviderinstance.
Add:
SSHProviderInitializer- interface that returnsSSHProviderKubeProviderInitializer- interface that returnsKubeProviderSSHProviderInitializerWithCleanupandKubeProviderInitializerWithCleanup- additional interfaces that addCleanupmethod for interfaces aboveSimpleSSHProviderInitializerandNewSimpleKubeProviderInitializer- implementations of interfaces described above. Always return passed to constructor provider. Cleanup methods call Cleanup method of providerErrorSSHProviderInitializer- implementation ofSSHProviderInitializer*that returnsErrorSSHProviderNewFakeKubeProviderInitializer- implementation ofKubeProviderInitialize*that returnsFakeKubeProvider
Changes:
pkg/provider.GetRunnerInterfacenow take SSHProviderInitializer. It needs for lazy creatingSSHProviderin cases when using another kube options (kubecofig, in-cluster). Now user could not createSSHProviderinstance to pass topkg/provider.GetRunnerInterface
Chore:
- Add example to cobra with implementation of initializers that make custom initialization.
flags parsing fixes and add examples
Fixes:
flags parsing:
- copy of flag set is not deep, thus we have problems is call multiple parsers with InitFlags. Now we are using internal flag set for parsing flags in parser, but add another fake flag set to passed flag set into InitFlags, for output help and prevent unknown flags error during parsing parent flags
filepath.Absdoes not resolve~, we were fixed it- add parser to Flags and ExtractConfig method, it improve dx because we can init flags during initialize command and pass only Flags to handler.
AskPassword add new line after prompt. We were fix it.
Add:
- if ssh connection config set ForceUseSSHAgent force no init new agent in cli-ssh
- also, add check that hosts were set in
DefaultSSHProvider
Chore:
- add example with working library with cobra packages.
- some fixes in README
Move ssh and kube client from dhctl
Move
https://github.com/deckhouse/deckhouse/tree/b518860d6d4cea2a61dde22708eb284d3a0b7c37/dhctl/pkg/system/node
and
https://github.com/deckhouse/deckhouse/blob/b518860d6d4cea2a61dde22708eb284d3a0b7c37/dhctl/pkg/kubernetes/kube.go
and
https://github.com/deckhouse/deckhouse/blob/b518860d6d4cea2a61dde22708eb284d3a0b7c37/dhctl/pkg/kubernetes/client/client.go
to standalone library with huge refactoring, fixes and tests. Please see README.md in root of repo for additional information.