Class: Dapp::Deployment::Deployment
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods included from Mod::Jobs
#to_kube_default_job_pods
#environment, #environments, #namespace_config, #namespace_config_directive, #scale, #secret_environment
Constructor Details
#initialize(dapp:) ⇒ Deployment
Returns a new instance of Deployment.
10
11
12
|
# File 'lib/dapp/deployment/deployment.rb', line 10
def initialize(dapp:)
@dapp = dapp
end
|
Instance Attribute Details
#dapp ⇒ Object
Returns the value of attribute dapp.
8
9
10
|
# File 'lib/dapp/deployment/deployment.rb', line 8
def dapp
@dapp
end
|
Instance Method Details
#apps ⇒ Object
22
23
24
|
# File 'lib/dapp/deployment/deployment.rb', line 22
def apps
@apps ||= dapp.apps_configs.map { |app_config| App.new(app_config: app_config, deployment: self) }
end
|
#kube ⇒ Object
18
19
20
|
# File 'lib/dapp/deployment/deployment.rb', line 18
def kube
@kube ||= KubeDeployment.new(self)
end
|
#kubernetes ⇒ Object
30
31
32
|
# File 'lib/dapp/deployment/deployment.rb', line 30
def kubernetes
@kubernetes ||= Kubernetes.new(namespace: namespace)
end
|
#name(*args) ⇒ Object
14
15
16
|
# File 'lib/dapp/deployment/deployment.rb', line 14
def name(*args)
[dapp.name, *args].flatten.compact.join('-').gsub('_', '-')
end
|
#namespace ⇒ Object
26
27
28
|
# File 'lib/dapp/deployment/deployment.rb', line 26
def namespace
dapp.options[:namespace] || ENV['DAPP_NAMESPACE']
end
|