Skip to content

ConfigMap

Gregory Nickonov edited this page Mar 4, 2019 · 1 revision

Quick Start

R.config_map :frontend do
  # Define keys and values
  set DB_HOST: 'db', DB_PORT: 1234

  # Load file content
  file appsettings: 'files/appsettings.json'
end

ConfigMap

Kubernetes Documentation

Sunstone property Kubernetes property Type
metadata metadata Kubernetes Object Metadata

set

Sets an individual value or group of values:

R.config_map :database do
  set DB_NAME: 'backend'
end

file

Imports the content of one or more files into the ConfigMap. file method receives a Hash, where keys are the respective keys of the ConfigMap, and values are the paths to the files to be imported. Paths can be constants or results of method calls to automate import:

R.config_map :backend do
  file appsettings: File.join(V.env.kind, 'appsettings.json')
end

Clone this wiki locally