Deployments in Kubernetes, similarly to what is already the case in non-containerized apps, can be configured using Environment Variables. The value of the Environment Variable can be obtained from several sources, including: explicit values, resolved from key-value pairs in a ConfigMap, resolved from key-value pairs in a Secret, and from configured resource values or manifest specification. Cloud Managar provide a simple and intuitive UI to create and edit Environment Variables for a Deployment. Additionally, Cloud Manager also allows variables to be defined at the level of a Space. In this case, the variable assignments apply to all deployments of the Space provided that the deployments are created and managed with the Cloud Manager. For deployments of marketplace solutions, or deployments that provide a custom manifest file, this Space level variables definitions are ignore.
The list of Environment Variables defined in a Space is shown in tab
Environment > Variables in the Space Details page. The information show includes the name for the variable, the type of variable binding (
Secret, etc.), the value, and referenced resource such as a ConfigMap or Secret.
Image below shows a snapshots of a list Environment Variable defined a the Space Level..
By clicking on the name of a Environment Variable a modal dialog pops up that allow to edit the variable settings (name, type, value, reference resources, key/path in a ConfigMap or Secret, etc.). The actions menu can also be used to edit or delete the Environment Variable.
To create a new Environment Variable press the
Add New button in the Environment Variable list panel (in toolbar or footer). For Space level variables the name that need to be unique in the Space. For Deployment specific variables any syntatically valid name is allowed (i.e. no space-level name constraints).
Images below shows a snapshots of the Environment Variable create/edit modal dialog, defining two variables: one with an explicit value, and another that references a key in a ConfigMap.