Class: Njord::Commands::KubernetesSetup

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/njord/commands/kubernetes_setup.rb

Constant Summary collapse

APPNAME =
"njord-blog"
NAMESPACE =
"njord-namespace"
ENVIRONMENT =
"production"
HOSTNAME =
"blog.njord.com"

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#configObject

Returns the value of attribute config.



5
6
7
# File 'lib/njord/commands/kubernetes_setup.rb', line 5

def config
  @config
end

Class Method Details



45
46
47
# File 'lib/njord/commands/kubernetes_setup.rb', line 45

def self.banner(command, _namespace = nil, _subcommand = false)
  "#{basename} k8s setup #{command.usage}"
end

.source_rootObject



49
50
51
# File 'lib/njord/commands/kubernetes_setup.rb', line 49

def self.source_root
  "#{__dir__}/../templates/kubernetes"
end

Instance Method Details

#allObject



13
14
15
16
17
18
19
# File 'lib/njord/commands/kubernetes_setup.rb', line 13

def all
  init
  setup(:deployment)
  setup(:service)
  setup(:configmap)
  setup(:ingress)
end

#configmapObject



34
35
36
37
# File 'lib/njord/commands/kubernetes_setup.rb', line 34

def configmap
  init
  setup(:configmap)
end

#deploymentObject



22
23
24
25
# File 'lib/njord/commands/kubernetes_setup.rb', line 22

def deployment
  init
  setup(:deployment)
end

#ingressObject



40
41
42
43
# File 'lib/njord/commands/kubernetes_setup.rb', line 40

def ingress
  init
  setup(:ingress)
end

#serviceObject



28
29
30
31
# File 'lib/njord/commands/kubernetes_setup.rb', line 28

def service
  init
  setup(:service)
end