Module: K8y::REST::Auth

Defined in:
lib/k8y/rest/auth.rb,
lib/k8y/rest/auth/basic.rb,
lib/k8y/rest/auth/token.rb,
lib/k8y/rest/auth/factory.rb,
lib/k8y/rest/auth/auth_base.rb,
lib/k8y/rest/auth/token_store.rb,
lib/k8y/rest/auth/providers/factory.rb,
lib/k8y/rest/auth/providers/gcp/factory.rb,
lib/k8y/rest/auth/providers/provider_base.rb,
lib/k8y/rest/auth/providers/gcp/command_provider.rb,
lib/k8y/rest/auth/providers/gcp/application_default_provider.rb

Defined Under Namespace

Modules: Providers Classes: AuthBase, Basic, Factory, Token, TokenStore

Class Method Summary collapse

Class Method Details

.from_auth_info(auth_info) ⇒ Object



15
16
17
# File 'lib/k8y/rest/auth.rb', line 15

def from_auth_info(auth_info)
  Factory.new.from_auth_info(auth_info)
end

.from_kubeconfig(kubeconfig, context: nil) ⇒ Object



9
10
11
12
13
# File 'lib/k8y/rest/auth.rb', line 9

def from_kubeconfig(kubeconfig, context: nil)
  context = context ? context : kubeconfig.current_context
  auth_info = kubeconfig.user_for_context(context).auth_info
  from_auth_info(auth_info)
end