struct

RailsApp::Env

Inherits YAML::Serializable / JSON::Serializable / Kubernetes::Serializable / Struct / Value / Object

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"

Constructors

new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
new(pull : JSON::PullParser)
new(*, __pull_for_json_serializable pull : JSON::PullParser)
new(*, __context_for_yaml_serializable ctx : YAML::ParseContext, __node_for_yaml_serializable node : YAML::Nodes::Node)
new(*, name : String, value : Nil | String = nil, value_from : RailsApp::Env::ValueFrom | Nil = nil)
Source

Instance methods

name

The name of the environment variable. If you reference ENV["DATABASE_URL"] in your app, you would put DATABASE_URL here.

value

The hardcoded value of your environment variable.

value_from

A container for references to the source of an environment variable's value. For example, if you store your env var in a ConfigMap, then you would set configMapKeyRef here.

Nested types