Class: KubesGoogle::Secrets::Fetcher::Base

Inherits:
Object
  • Object
show all
Includes:
Logging
Defined in:
lib/kubes_google/secrets/fetcher/base.rb

Direct Known Subclasses

Gcloud, Sdk

Instance Method Summary collapse

Methods included from Logging

#logger

Constructor Details

#initialize(options = {}) ⇒ Base

Returns a new instance of Base.



5
6
7
8
9
# File 'lib/kubes_google/secrets/fetcher/base.rb', line 5

def initialize(options={})
  @options = options
  @base64 = options[:base64]
  @project_id = options[:google_project] || ENV['GOOGLE_PROJECT'] || raise("GOOGLE_PROJECT env variable is not set. It's required.")
end

Instance Method Details

#base64?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/kubes_google/secrets/fetcher/base.rb', line 11

def base64?
  @base64.nil? ? KubesGoogle.config.secrets.base64 : @base64
end