Class: Porkadot::Assets::Certs::Etcd

Inherits:
Object
  • Object
show all
Includes:
Porkadot::Assets::CertsUtils
Defined in:
lib/porkadot/assets/certs/etcd.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Porkadot::Assets::CertsUtils

#_ca_cert, #_client_cert, #ca_cert, #ca_key, #client_cert, #client_key, #private_key, #public_key, #random_number, #to_base64, #to_pem, #unsigned_cert

Constructor Details

#initialize(global_config) ⇒ Etcd

Returns a new instance of Etcd.



8
9
10
11
12
# File 'lib/porkadot/assets/certs/etcd.rb', line 8

def initialize global_config
  @config = Porkadot::Configs::Certs::Etcd.new(global_config)
  @logger = config.logger
  @global_config = config.config
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



5
6
7
# File 'lib/porkadot/assets/certs/etcd.rb', line 5

def config
  @config
end

#global_configObject (readonly)

Returns the value of attribute global_config.



4
5
6
# File 'lib/porkadot/assets/certs/etcd.rb', line 4

def global_config
  @global_config
end

#loggerObject (readonly)

Returns the value of attribute logger.



6
7
8
# File 'lib/porkadot/assets/certs/etcd.rb', line 6

def logger
  @logger
end

Instance Method Details

#ca_nameObject



14
15
16
# File 'lib/porkadot/assets/certs/etcd.rb', line 14

def ca_name
  '/CN=kube-ca'
end

#client_nameObject



18
19
20
# File 'lib/porkadot/assets/certs/etcd.rb', line 18

def client_name
  '/CN=etcd-client'
end