struct RailsApp::BeforeCreate
- RailsApp::BeforeCreate
- Struct
- Value
- Object
Overview
When the RailsApp
is created, this job is executed. Usually this is used to provision the database schema.
Included Modules
- JSON::Serializable
- Kubernetes::Serializable
- YAML::Serializable
Defined in:
rails_app_operator.crConstructors
- .new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
- .new(pull : JSON::PullParser)
- .new(*, command : Array(String), env : Array(RailsApp::BeforeCreate::Env) = Array(Env).new, env_from : Array(RailsApp::BeforeCreate::EnvFrom) = Array(EnvFrom).new, node_selector : Hash(String, JSON::Any) = {} of String => JSON::Any)
Instance Method Summary
- #command : Array(String)
-
#env : Array(Env)
A list of
Env
objects representing environment variables. -
#env_from : Array(EnvFrom)
The source of an environment variable, such as a
ConfigMap
orSecret
. -
#node_selector : Hash(String, JSON::Any)
A
Hash(String, String)
containing label/value pairs — pods for thisRailsApp
orEntrypoints
will only be assigned to nodes that have these labels.
Constructor Detail
Instance Method Detail
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"
The source of an environment variable, such as a ConfigMap
or Secret
.
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.