Class: MobyDerp::ContainerConfig
- Inherits:
-
Object
- Object
- MobyDerp::ContainerConfig
- Defined in:
- lib/moby_derp/container_config.rb
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#entrypoint ⇒ Object
readonly
Returns the value of attribute entrypoint.
-
#environment ⇒ Object
readonly
Returns the value of attribute environment.
-
#environment_files ⇒ Object
readonly
Returns the value of attribute environment_files.
-
#image ⇒ Object
readonly
Returns the value of attribute image.
-
#labels ⇒ Object
readonly
Returns the value of attribute labels.
-
#limits ⇒ Object
readonly
Returns the value of attribute limits.
-
#mounts ⇒ Object
readonly
Returns the value of attribute mounts.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#readonly ⇒ Object
readonly
Returns the value of attribute readonly.
-
#restart ⇒ Object
readonly
Returns the value of attribute restart.
-
#startup_health_check ⇒ Object
readonly
Returns the value of attribute startup_health_check.
-
#stop_signal ⇒ Object
readonly
Returns the value of attribute stop_signal.
-
#stop_timeout ⇒ Object
readonly
Returns the value of attribute stop_timeout.
-
#update_image ⇒ Object
readonly
Returns the value of attribute update_image.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(system_config:, pod_config:, container_name:, image:, update_image: true, command: [], entrypoint: nil, environment: {}, environment_files: {}, mounts: [], labels: {}, readonly: false, stop_signal: "SIGTERM", stop_timeout: 10, user: nil, restart: "no", limits: {}, startup_health_check: nil) ⇒ ContainerConfig
constructor
A new instance of ContainerConfig.
Constructor Details
#initialize(system_config:, pod_config:, container_name:, image:, update_image: true, command: [], entrypoint: nil, environment: {}, environment_files: {}, mounts: [], labels: {}, readonly: false, stop_signal: "SIGTERM", stop_timeout: 10, user: nil, restart: "no", limits: {}, startup_health_check: nil) ⇒ ContainerConfig
Returns a new instance of ContainerConfig.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/moby_derp/container_config.rb', line 14 def initialize(system_config:, pod_config:, container_name:, image:, update_image: true, command: [], entrypoint: nil, environment: {}, environment_files: {}, mounts: [], labels: {}, readonly: false, stop_signal: "SIGTERM", stop_timeout: 10, user: nil, restart: "no", limits: {}, startup_health_check: nil ) @system_config, @pod_config, @name, @image = system_config, pod_config, "#{pod_config.name}.#{container_name}", image @update_image, @command, @entrypoint, @environment, @environment_files, @mounts, @labels = update_image, command, entrypoint, environment, environment_files, mounts, labels @readonly, @stop_signal, @stop_timeout, @user, @restart = readonly, stop_signal, stop_timeout, user, restart @limits, @startup_health_check = limits, startup_health_check validate_image validate_update_image validate_command validate_entrypoint validate_environment validate_environment_files validate_mounts validate_labels validate_readonly validate_stop_signal validate_stop_timeout validate_user validate_restart validate_limits validate_startup_health_check end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
10 11 12 |
# File 'lib/moby_derp/container_config.rb', line 10 def command @command end |
#entrypoint ⇒ Object (readonly)
Returns the value of attribute entrypoint.
10 11 12 |
# File 'lib/moby_derp/container_config.rb', line 10 def entrypoint @entrypoint end |
#environment ⇒ Object (readonly)
Returns the value of attribute environment.
10 11 12 |
# File 'lib/moby_derp/container_config.rb', line 10 def environment @environment end |
#environment_files ⇒ Object (readonly)
Returns the value of attribute environment_files.
10 11 12 |
# File 'lib/moby_derp/container_config.rb', line 10 def environment_files @environment_files end |
#image ⇒ Object (readonly)
Returns the value of attribute image.
10 11 12 |
# File 'lib/moby_derp/container_config.rb', line 10 def image @image end |
#labels ⇒ Object (readonly)
Returns the value of attribute labels.
10 11 12 |
# File 'lib/moby_derp/container_config.rb', line 10 def labels @labels end |
#limits ⇒ Object (readonly)
Returns the value of attribute limits.
10 11 12 |
# File 'lib/moby_derp/container_config.rb', line 10 def limits @limits end |
#mounts ⇒ Object (readonly)
Returns the value of attribute mounts.
10 11 12 |
# File 'lib/moby_derp/container_config.rb', line 10 def mounts @mounts end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
10 11 12 |
# File 'lib/moby_derp/container_config.rb', line 10 def name @name end |
#readonly ⇒ Object (readonly)
Returns the value of attribute readonly.
10 11 12 |
# File 'lib/moby_derp/container_config.rb', line 10 def readonly @readonly end |
#restart ⇒ Object (readonly)
Returns the value of attribute restart.
10 11 12 |
# File 'lib/moby_derp/container_config.rb', line 10 def restart @restart end |
#startup_health_check ⇒ Object (readonly)
Returns the value of attribute startup_health_check.
10 11 12 |
# File 'lib/moby_derp/container_config.rb', line 10 def startup_health_check @startup_health_check end |
#stop_signal ⇒ Object (readonly)
Returns the value of attribute stop_signal.
10 11 12 |
# File 'lib/moby_derp/container_config.rb', line 10 def stop_signal @stop_signal end |
#stop_timeout ⇒ Object (readonly)
Returns the value of attribute stop_timeout.
10 11 12 |
# File 'lib/moby_derp/container_config.rb', line 10 def stop_timeout @stop_timeout end |
#update_image ⇒ Object (readonly)
Returns the value of attribute update_image.
10 11 12 |
# File 'lib/moby_derp/container_config.rb', line 10 def update_image @update_image end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
10 11 12 |
# File 'lib/moby_derp/container_config.rb', line 10 def user @user end |