Environments are a first-class concept in KubeRig.
Each environment has its own sub-directory in the
The environment sub-directory contains at least:
- The CA certificate of the cluster.
- The configs properties file.
- The keyset.json encryption key.
- An encrypted access token of the service account that is used to deploy to the environment.
Environment specific information is available during resource generation via the following methods of the
environmentFileTextpass in a relative path to the environment sub-directory.
environmentFileBytespass in a relative path to the environment sub-directory.
environmentConfigpass in a key available in the configs properties file.
Environment Specific Tasks
After initializing/creating an environment with the
initEnvironment task KubeRig provides a number of tasks
to execution actions specifically for the environment.
There is a
deploy task for every environment.
This task will directly communicate with the Kubernetes API to create/update the resources that you have defined using the KubeRig DSL.
Generate Yaml task
In case you need it or feel nostalgic there is a
generateYaml task for every environment.
The files are generated inside the build/generated-yaml directory. For each environment you will find a subdirectory there containing the generated yaml files.
Various tasks to encrypt/decrypt files an configuration parameters. More information about those can be found on the encryption support page.