| `HELMFILE_CLI_IMAGE`| The Docker image used to run helmfile <br/>:warning: **set the version required by your Kubernetes server** | `ghcr.io/helmfile/helmfile:latest` |
| `HELMFILE_PATH`| The path to your `helmfile.yaml` | `./helmfile.yaml` |
| `HELMFILE_SCRIPTS_DIR`| The folder where hook scripts are located | `.` _(root project dir)_ |
| `KUBE_NAMESPACE`| The default Kubernetes namespace to use | `"${CI_PROJECT_NAME}-${CI_PROJECT_ID}-${CI_ENVIRONMENT_SLUG}"` ([see GitLab doc](https://docs.gitlab.com/ee/ci/variables/predefined_variables.html)) |
| `cli-image` / `HELMFILE_CLI_IMAGE` | The Docker image used to run helmfile <br/>:warning: **set the version required by your Kubernetes server** | `ghcr.io/helmfile/helmfile:latest` |
| `path` / `HELMFILE_PATH` | The path to your `helmfile.yaml` | `./helmfile.yaml` |
| `scripts-dir` / `HELMFILE_SCRIPTS_DIR` | The folder where hook scripts are located | `.` _(root project dir)_ |
| `kube-namespace` / `KUBE_NAMESPACE` | The default Kubernetes namespace to use | `"${CI_PROJECT_NAME}-${CI_PROJECT_ID}-${CI_ENVIRONMENT_SLUG}"` ([see GitLab doc](https://docs.gitlab.com/ee/ci/variables/predefined_variables.html)) |
| `KUBE_CONTEXT` | Defines the context to be used in `KUBECONFIG`. When using [GitLab agents with the CI/CD workflow](https://docs.gitlab.com/ee/user/clusters/agent/ci_cd_workflow.html), the value should be like `path/to/agent/project:agent-name`. To use different agents per environment, define an [environment-scoped CI/CD variable](https://docs.gitlab.com/ee/ci/environments/index.html#limit-the-environment-scope-of-a-cicd-variable) for each agent. | _none_ |
| :lock: `HELMFILE_DEFAULT_KUBE_CONFIG` | The default kubeconfig to use (either content or file variable) | `$KUBECONFIG` (thus supports the [GitLab Kubernetes integration](https://docs.gitlab.com/ee/user/project/clusters/index.html) when enabled) |
| `HELMFILE_DEPLOY_ARGS`| The helmfile [command with options](https://helmfile.readthedocs.io/en/latest/#apply) to deploy the application (_without dynamic global parameters such as `helmfile.yaml` path and environment name_) | `apply --wait` |
| `HELMFILE_DELETE_ARGS`| The helmfile [command with options](https://helmfile.readthedocs.io/en/latest/#destroy) to cleanup the application (_without dynamic global parameters such as `helmfile.yaml` path and environment name_) | `destroy` |
| `HELMFILE_BASE_APP_NAME`| Base application name | `$CI_PROJECT_NAME` ([see GitLab doc](https://docs.gitlab.com/ee/ci/variables/predefined_variables.html)) |
| `HELMFILE_IMAGE_PULL_SECRET_NAME` | Name of the `docker-registry` k8s secret that will be created if the special [GitLab deploy token](https://docs.gitlab.com/ee/user/project/deploy_tokens/#gitlab-deploy-token) is available. | `gitlab-registry` |
| `deploy-args` / `HELMFILE_DEPLOY_ARGS` | The helmfile [command with options](https://helmfile.readthedocs.io/en/latest/#apply) to deploy the application (_without dynamic global parameters such as `helmfile.yaml` path and environment name_) | `apply --wait` |
| `delete-args` / `HELMFILE_DELETE_ARGS` | The helmfile [command with options](https://helmfile.readthedocs.io/en/latest/#destroy) to cleanup the application (_without dynamic global parameters such as `helmfile.yaml` path and environment name_) | `destroy` |
| `base-app-name` / `HELMFILE_BASE_APP_NAME` | Base application name | `$CI_PROJECT_NAME` ([see GitLab doc](https://docs.gitlab.com/ee/ci/variables/predefined_variables.html)) |
| `image-pull-secret-name` / `HELMFILE_IMAGE_PULL_SECRET_NAME` | Name of the `docker-registry` k8s secret that will be created if the special [GitLab deploy token](https://docs.gitlab.com/ee/user/project/deploy_tokens/#gitlab-deploy-token) is available. | `gitlab-registry` |
### Review environments configuration
@@ -270,14 +301,14 @@ They are **disabled by default** and can be enabled by setting the `HELMFILE_REV
Here are variables supported to configure review environments:
| Name | Description | Default value |
| Input / Variable | Description | Default value |
| `HELMFILE_REVIEW_ENABLED` | Set to `true` to enable `review` env | _none_ (disabled) |
| `HELMFILE_REVIEW_APP_NAME` | Application name for `review` env | `"${HELM_BASE_APP_NAME}-${CI_ENVIRONMENT_SLUG}"` (ex: `myproject-review-fix-bug-12`) |
| `HELMFILE_REVIEW_ENVIRONMENT_URL`| The review environments url _(only define for static environment URLs declaration and if different from default)_ | `$HELMFILE_ENVIRONMENT_URL` |
| `HELMFILE_REVIEW_NAMESPACE` | The Kubernetes namespace to use for `review` env _(only define to override default)_ | `$KUBE_NAMESPACE` |
| `review-enabled` / `HELMFILE_REVIEW_ENABLED` | Set to `true` to enable `review` env | _none_ (disabled) |
| `review-app-name` / `HELMFILE_REVIEW_APP_NAME` | Application name for `review` env | `"${HELMFILE_BASE_APP_NAME}-${CI_ENVIRONMENT_SLUG}"` (ex: `myproject-review-fix-bug-12`) |
| `review-environment-url` / `HELMFILE_REVIEW_ENVIRONMENT_URL`| The review environments url _(only define for static environment URLs declaration and if different from default)_ | `$HELMFILE_ENVIRONMENT_URL` |
| `review-namespace` / `HELMFILE_REVIEW_NAMESPACE` | The Kubernetes namespace to use for `review` env _(only define to override default)_ | `$KUBE_NAMESPACE` |
| :lock: `HELMFILE_REVIEW_KUBE_CONFIG` | Specific kubeconfig for `review` env _(only define to override default)_ | `$HELMFILE_DEFAULT_KUBE_CONFIG` |
| `HELMFILE_REVIEW_AUTOSTOP_DURATION`| The amount of time before GitLab will automatically stop `review` environments | `4 hours` |
| `review-autostop-duration` / `HELMFILE_REVIEW_AUTOSTOP_DURATION`| The amount of time before GitLab will automatically stop `review` environments | `4 hours` |
### Integration environment configuration
@@ -287,14 +318,14 @@ It is **disabled by default** and can be enabled by setting the `HELMFILE_INTEG_
Here are variables supported to configure the integration environment:
| Name | Description | Default value |
| Input / Variable | Description | Default value |
| `HELMFILE_INTEG_ENABLED` | Set to `true` to enable `integration` env | _none_ (disabled) |
| `HELMFILE_INTEG_APP_NAME` | Application name for `integration` env | `$HELMFILE_BASE_APP_NAME-integration` |
| `HELMFILE_INTEG_ENVIRONMENT_URL`| The integration environment url _(only define for static environment URLs declaration and if different from default)_ | `$HELMFILE_ENVIRONMENT_URL` |
| `HELMFILE_INTEG_NAMESPACE` | The Kubernetes namespace to use for `integration` env _(only define to override default)_ | `$KUBE_NAMESPACE` |
| `integ-enabled` / `HELMFILE_INTEG_ENABLED` | Set to `true` to enable `integration` env | _none_ (disabled) |
| `integ-app-name` / `HELMFILE_INTEG_APP_NAME` | Application name for `integration` env | `$HELMFILE_BASE_APP_NAME-integration` |
| `integ-environment-url` / `HELMFILE_INTEG_ENVIRONMENT_URL`| The integration environment url _(only define for static environment URLs declaration and if different from default)_ | `$HELMFILE_ENVIRONMENT_URL` |
| `integ-namespace` / `HELMFILE_INTEG_NAMESPACE` | The Kubernetes namespace to use for `integration` env _(only define to override default)_ | `$KUBE_NAMESPACE` |
| :lock: `HELMFILE_INTEG_KUBE_CONFIG` | Specific kubeconfig for `integration` env _(only define to override default)_ | `$HELMFILE_DEFAULT_KUBE_CONFIG` |
| `HELMFILE_INTEG_AUTOSTOP_DURATION`| The amount of time before GitLab will automatically stop the `integration` env | `never` |
| `integ-autostop-duration` / `HELMFILE_INTEG_AUTOSTOP_DURATION`| The amount of time before GitLab will automatically stop the `integration` env | `never` |
### Staging environment configuration
@@ -304,14 +335,14 @@ It is **disabled by default** and can be enabled by setting the `HELMFILE_STAGIN
Here are variables supported to configure the staging environment:
| Name | Description | Default value |
| Input / Variable | Description | Default value |
| `HELMFILE_STAGING_ENABLED` | Set to `true` to enable `staging` env | _none_ (disabled) |
| `HELMFILE_STAGING_APP_NAME` | Application name for `staging` env | `$HELMFILE_BASE_APP_NAME-staging` |
| `HELMFILE_STAGING_ENVIRONMENT_URL`| The staging environment url _(only define for static environment URLs declaration and if different from default)_ | `$HELMFILE_ENVIRONMENT_URL` |
| `HELMFILE_STAGING_NAMESPACE` | The Kubernetes namespace to use for `staging` env _(only define to override default)_ | `$KUBE_NAMESPACE` |
| `staging-enabled` / `HELMFILE_STAGING_ENABLED` | Set to `true` to enable `staging` env | _none_ (disabled) |
| `staging-app-name` / `HELMFILE_STAGING_APP_NAME` | Application name for `staging` env | `$HELMFILE_BASE_APP_NAME-staging` |
| `staging-environment-url` / `HELMFILE_STAGING_ENVIRONMENT_URL`| The staging environment url _(only define for static environment URLs declaration and if different from default)_ | `$HELMFILE_ENVIRONMENT_URL` |
| `staging-namespace` / `HELMFILE_STAGING_NAMESPACE` | The Kubernetes namespace to use for `staging` env _(only define to override default)_ | `$KUBE_NAMESPACE` |
| :lock: `HELMFILE_STAGING_KUBE_CONFIG` | Specific kubeconfig for `staging` env _(only define to override default)_ | `$HELMFILE_DEFAULT_KUBE_CONFIG` |
| `HELMFILE_STAGING_AUTOSTOP_DURATION`| The amount of time before GitLab will automatically stop the `staging` env | `never` |
| `staging-autostop-duration` / `HELMFILE_STAGING_AUTOSTOP_DURATION`| The amount of time before GitLab will automatically stop the `staging` env | `never` |
### Production environment configuration
@@ -321,24 +352,24 @@ It is **enabled by default** and can be disabled by setting the `HELMFILE_PROD_D
Here are variables supported to configure the production environment:
| Name | Description | Default value |
| Input / Variable | Description | Default value |
| `HELMFILE_PROD_DISABLED` | Set to `true` to disable `production` env | _none_ (disabled) |
| `HELMFILE_PROD_APP_NAME` | Application name for `production` env | `$HELMFILE_BASE_APP_NAME` |
| `HELMFILE_PROD_ENVIRONMENT_URL`| The production environment url _(only define for static environment URLs declaration and if different from default)_ | `$HELMFILE_ENVIRONMENT_URL` |
| `HELMFILE_PROD_NAMESPACE` | The Kubernetes namespace to use for `production` env _(only define to override default)_ | `$KUBE_NAMESPACE` |
| `prod-app-name` / `HELMFILE_PROD_APP_NAME` | Application name for `production` env | `$HELMFILE_BASE_APP_NAME` |
| `prod-environment-url` / `HELMFILE_PROD_ENVIRONMENT_URL`| The production environment url _(only define for static environment URLs declaration and if different from default)_ | `$HELMFILE_ENVIRONMENT_URL` |
| `prod-namespace` / `HELMFILE_PROD_NAMESPACE` | The Kubernetes namespace to use for `production` env _(only define to override default)_ | `$KUBE_NAMESPACE` |
| :lock: `HELMFILE_PROD_KUBE_CONFIG` | Specific kubeconfig for `production` env _(only define to override default)_ | `$HELMFILE_DEFAULT_KUBE_CONFIG` |
| `HELMFILE_PROD_DEPLOY_STRATEGY`| Defines the deployment to production strategy. One of `manual` (i.e. _one-click_) or `auto`. | `manual` |
| `prod-deploy-strategy` / `HELMFILE_PROD_DEPLOY_STRATEGY`| Defines the deployment to production strategy. One of `manual` (i.e. _one-click_) or `auto`. | `manual` |
### `helmfile-lint` job
This job runs a [helm lint](https://helm.sh/docs/helm/helm_lint/) across all of the charts/releases in the helmfile manifest and
uses the following variables:
| Name | Description | Default value |
| Input / Variable | Description | Default value |
| `HELMFILE_LINT_ENABLED` | Set to `true` to enable Helmfile lint | _none_ (disabled) |
| `HELMFILE_LINT_ARGS` | The helmfile [command with options](https://helmfile.readthedocs.io/en/latest/#lint) to trigger the analysis | `lint` |
| `lint-enabled` / `HELMFILE_LINT_ENABLED` | Set to `true` to enable Helmfile lint | _none_ (disabled) |
| `lint-args` / `HELMFILE_LINT_ARGS` | The helmfile [command with options](https://helmfile.readthedocs.io/en/latest/#lint) to trigger the analysis | `lint` |
### `helmfile-test` job
@@ -348,10 +379,10 @@ It is **disabled by default** and can be enabled by setting the ``HELMFILE_TEST_
It uses the following variables:
| Name | Description | Default value |
| Input / Variable | Description | Default value |
| `TBC_VAULT_IMAGE` | The [Vault Secrets Provider](https://gitlab.com/to-be-continuous/tools/vault-secrets-provider) image to use (can be overridden) | `registry.gitlab.com/to-be-continuous/tools/vault-secrets-provider:master` |
| `VAULT_BASE_URL` | The Vault server base API url | _none_ |
| `VAULT_OIDC_AUD` | The `aud` claim for the JWT | `$CI_SERVER_URL` |
| `vault-base-url` / `VAULT_BASE_URL` | The Vault server base API url | _none_ |
| `vault-oidc-aud` / `VAULT_OIDC_AUD` | The `aud` claim for the JWT | `$CI_SERVER_URL` |
| :lock: `VAULT_ROLE_ID` | The [AppRole](https://www.vaultproject.io/docs/auth/approle) RoleID | **must be defined** |
| :lock: `VAULT_SECRET_ID` | The [AppRole](https://www.vaultproject.io/docs/auth/approle) SecretID | **must be defined** |
@@ -382,7 +413,7 @@ Then you may retrieve any of your secret(s) from Vault using the following synta