struct RailsApp::BeforeUpdate

Overview

When the RailsApp is updated, this job is executed. Usually this is used to run database schema and data migrations.

Included Modules

Defined in:

rails_app_operator.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(ctx : YAML::ParseContext, node : YAML::Nodes::Node) #

def self.new(pull : JSON::PullParser) #

def self.new(*, command : Array(String), env : Array(RailsApp::BeforeUpdate::Env) = Array(Env).new, env_from : Array(RailsApp::BeforeUpdate::EnvFrom) = Array(EnvFrom).new, node_selector : Hash(String, JSON::Any) = {} of String => JSON::Any) #

[View source]

Instance Method Detail

def command : Array(String) #

def env : Array(Env) #

A list of Env objects representing environment variables. Either a value or value_from (in YAML: valueFrom) must be provided.

env:
  - name: REDIS_URL
    value: redis://redis
  - name: DATABASE_URL
    valueFrom:
      secretKeyRef:
        name: "postgres-app"
        value: "uri"

def env_from : Array(EnvFrom) #

The source of an environment variable, such as a ConfigMap or Secret.


def node_selector : Hash(String, JSON::Any) #

A Hash(String, String) containing label/value pairs — pods for this RailsApp or Entrypoints will only be assigned to nodes that have these labels. For example, if you set kubernetes.io/arch: arm64 here, pods will only be assigned to nodes running Arm64 processors.