Skip to main content

Variable Group

In Sleakops a variable group or var group is a set of key-value pairs as in a dictionary that provides configuration for services in a given project and environment.

Create a var group

To create a var group you need to define a project, an environment, an identification name for the group and optionally a service. You may provide as many key-value pairs as needed as long as the keys aren't duplicated. The console gives you the choice to enter them in separate fields or as plain text much like dotenv files. When you save the var group, Sleakops creates a Kubernetes secret inside the namespace. Once created you may only edit the entries inside the var group.

The optional service field indicates the scope of the var group. If a service is not selected the resulting var group is global and is available for all the namespace. Otherwise, the var group is local to the selected service. The interaction between var groups inside the namespace is described in the next section.

Preference between var groups

As previously mentioned, var groups end up being secrets inside the namespace. This design allows Sleakops users to add identical keys with different values for several var groups. This behavior is intended and needed to provide different configurations for services. When there is a conflict between the values of identical keys, the local values prevail (if any) or in the case of two global entries, the most recent one is kept.

Cloud resources

The creation of var groups only adds secrets to the environment cluster and has no significant costs for the Sleakops users.