Class: Kuby::Plugin

Inherits:
Object
  • Object
show all
Defined in:
lib/kuby/plugin.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(environment) ⇒ Plugin

Returns a new instance of Plugin.



7
8
9
10
# File 'lib/kuby/plugin.rb', line 7

def initialize(environment)
  @environment = environment
  after_initialize
end

Instance Attribute Details

#environmentObject (readonly)

Returns the value of attribute environment.



5
6
7
# File 'lib/kuby/plugin.rb', line 5

def environment
  @environment
end

Class Method Details

.dependenciesObject



22
23
24
# File 'lib/kuby/plugin.rb', line 22

def dependencies
  @dependencies ||= []
end

.depends_on(dependable_name, *constraints) ⇒ Object



18
19
20
# File 'lib/kuby/plugin.rb', line 18

def depends_on(dependable_name, *constraints)
  dependencies << Kuby::Dependency.new(dependable_name, *constraints)
end

.task_dirsObject

returns an array of directories containing .rake files



14
15
16
# File 'lib/kuby/plugin.rb', line 14

def task_dirs
  []
end

Instance Method Details

#after_configurationObject

called after all plugins have been configured



52
53
54
# File 'lib/kuby/plugin.rb', line 52

def after_configuration
  # do nothing by default
end

#after_deploy(manifest) ⇒ Object

called after deploying all resources



72
73
74
# File 'lib/kuby/plugin.rb', line 72

def after_deploy(manifest)
  # do nothing by default
end

#after_setupObject

called after all plugins have been setup



62
63
64
# File 'lib/kuby/plugin.rb', line 62

def after_setup
  # do nothing by default
end

#before_deploy(manifest) ⇒ Object

called before deploying any resources



67
68
69
# File 'lib/kuby/plugin.rb', line 67

def before_deploy(manifest)
  # do nothing by default
end

#before_setupObject

called before any plugins have been setup



57
58
59
# File 'lib/kuby/plugin.rb', line 57

def before_setup
  # do nothing by default
end

#configure(&block) ⇒ Object



27
28
29
# File 'lib/kuby/plugin.rb', line 27

def configure(&block)
  # do nothing by default
end

#docker_imagesObject

additional docker images that should be built and pushed



47
48
49
# File 'lib/kuby/plugin.rb', line 47

def docker_images
  []
end

#removeObject

remove all global resources installed by #setup



37
38
39
# File 'lib/kuby/plugin.rb', line 37

def remove
  # do nothing by default
end

#resourcesObject

additional kubernetes resources that should be deployed



42
43
44
# File 'lib/kuby/plugin.rb', line 42

def resources
  []
end

#setupObject

install any global resources like operators, etc



32
33
34
# File 'lib/kuby/plugin.rb', line 32

def setup
  # do nothing by default
end