Skip to content

Releases: deckhouse/lib-connection

kube log debug requests/ responses in JSON format

01 Apr 15:47
702256d

Choose a tag to compare

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

31 Mar 19:26
ebf5696

Choose a tag to compare

BREAKING CHANGES:

  • pkg/provider.GetRunnerInterface now take context and SSHProviderInitializer instead of SSHProvider instance.

Add:

  • SSHProviderInitializer - interface that returns SSHProvider
  • KubeProviderInitializer - interface that returns KubeProvider
  • SSHProviderInitializerWithCleanup and KubeProviderInitializerWithCleanup - additional interfaces that add Cleanup method for interfaces above
  • SimpleSSHProviderInitializer and NewSimpleKubeProviderInitializer - implementations of interfaces described above. Always return passed to constructor provider. Cleanup methods call Cleanup method of provider
  • ErrorSSHProviderInitializer - implementation of SSHProviderInitializer* that returns ErrorSSHProvider
  • NewFakeKubeProviderInitializer- implementation of KubeProviderInitialize* that returns FakeKubeProvider

Changes:

  • pkg/provider.GetRunnerInterface now take SSHProviderInitializer. It needs for lazy creating SSHProvider in cases when using another kube options (kubecofig, in-cluster). Now user could not create SSHProvider instance to pass to pkg/provider.GetRunnerInterface

Chore:

  • Add example to cobra with implementation of initializers that make custom initialization.

flags parsing fixes and add examples

10 Feb 11:46
3f60072

Choose a tag to compare

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.Abs does 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

09 Feb 07:27
6af318d

Choose a tag to compare