struct RailsApp::BeforeCreate::Env

Overview

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"

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(*, name : String, value : Nil | String = nil, value_from : RailsApp::BeforeCreate::Env::ValueFrom | Nil = nil) #

[View source]

Instance Method Detail

def name : String #

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


def value : String | Nil #

The hardcoded value of your environment variable.


def value_from : ValueFrom | Nil #

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.