Class: Kubeclient::GCPAuthProvider

Inherits:
Object
  • Object
show all
Defined in:
lib/kubeclient/gcp_auth_provider.rb

Overview

Handle different ways to get a bearer token for Google Cloud Platform.

Class Method Summary collapse

Class Method Details

.token(config) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/kubeclient/gcp_auth_provider.rb', line 10

def token(config)
  if config.key?('cmd-path')
    Kubeclient::GCPCommandCredentials.token(config)
  else
    Kubeclient::GoogleApplicationDefaultCredentials.token
  end
end