Class: Nvoi::Configuration::Deployment

Inherits:
Object
  • Object
show all
Defined in:
lib/nvoi/configuration/deployment.rb

Overview

Deployment is the normalized service definition ready for deployment Created by Configuration::Database and Configuration::Service

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, image:, port: 0, command: [], env: nil, mounts: nil, replicas: 1, healthcheck: nil, stateful_set: false, secrets: nil, servers: []) ⇒ Deployment

Returns a new instance of Deployment.



11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/nvoi/configuration/deployment.rb', line 11

def initialize(name:, image:, port: 0, command: [], env: nil, mounts: nil,
               replicas: 1, healthcheck: nil, stateful_set: false, secrets: nil, servers: [])
  @name = name
  @image = image
  @port = port
  @command = command || []
  @env = env || {}
  @mounts = mounts || {}
  @replicas = replicas
  @healthcheck = healthcheck
  @stateful_set = stateful_set
  @secrets = secrets || {}
  @servers = servers || []
end

Instance Attribute Details

#commandObject

Returns the value of attribute command.



8
9
10
# File 'lib/nvoi/configuration/deployment.rb', line 8

def command
  @command
end

#envObject

Returns the value of attribute env.



8
9
10
# File 'lib/nvoi/configuration/deployment.rb', line 8

def env
  @env
end

#healthcheckObject

Returns the value of attribute healthcheck.



8
9
10
# File 'lib/nvoi/configuration/deployment.rb', line 8

def healthcheck
  @healthcheck
end

#imageObject

Returns the value of attribute image.



8
9
10
# File 'lib/nvoi/configuration/deployment.rb', line 8

def image
  @image
end

#mountsObject

Returns the value of attribute mounts.



8
9
10
# File 'lib/nvoi/configuration/deployment.rb', line 8

def mounts
  @mounts
end

#nameObject

Returns the value of attribute name.



8
9
10
# File 'lib/nvoi/configuration/deployment.rb', line 8

def name
  @name
end

#portObject

Returns the value of attribute port.



8
9
10
# File 'lib/nvoi/configuration/deployment.rb', line 8

def port
  @port
end

#replicasObject

Returns the value of attribute replicas.



8
9
10
# File 'lib/nvoi/configuration/deployment.rb', line 8

def replicas
  @replicas
end

#secretsObject

Returns the value of attribute secrets.



8
9
10
# File 'lib/nvoi/configuration/deployment.rb', line 8

def secrets
  @secrets
end

#serversObject

Returns the value of attribute servers.



8
9
10
# File 'lib/nvoi/configuration/deployment.rb', line 8

def servers
  @servers
end

#stateful_setObject

Returns the value of attribute stateful_set.



8
9
10
# File 'lib/nvoi/configuration/deployment.rb', line 8

def stateful_set
  @stateful_set
end