Commit 2d8c9222 authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

fix: rename Helm value environment_type to environmentType (complies to naming conventions)

parent 457dfe9f
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -68,8 +68,8 @@ that you might use in your hook scripts and Helm charts (as [values](https://hel
| environment variable | template directive | description |
|----------------------|--------------------|-------------|
| `$environment_name`  | `{{ .Release.Name }}` | a generated application name to use for the current deployment environment (ex: `myproject-review-fix-bug-12` or `myproject-staging`). This is used as the **Helm release name** in deploy & delete jobs - _details below_ |
| `$environment_type`  | `{{ .Values.environment_type }}` | the current deployment environment type (`review`, `integration`, `staging` or `production`) |
| `$hostname`          | `{{ .Values.hostname }}` | the environment hostame, if you [specified the environment url statically](#environments-url-management) |
| `$environment_type`  | `{{ .Values.environmentType }}` | the current deployment environment type (`review`, `integration`, `staging` or `production`) |
| `$hostname`          | `{{ .Values.hostname }}` | the environment hostame, extracted from the environment URL (if you [specified the environment url statically](#environments-url-management)) |

#### Generated environment name

@@ -181,8 +181,8 @@ The Helm template uses some global configuration used throughout all jobs.
| `HELM_CHART_DIR`      | The folder where the Helm chart is located | `.`  _(root project dir)_ |
| `HELM_SCRIPTS_DIR`     | The folder where hook scripts are located | `.` _(root project dir)_ |
| `HELM_COMMON_VALUES`  | Common values file (used for all environments, overridden by specific per-env values files) | undefined (none) |
| `HELM_ENV_VALUE_NAME`      | The environment type variable set to helm | `environment_type` |
| `HELM_HOSTNAME_VALUE_NAME`      | The hostname variable set to helm | `hostname` |
| `HELM_ENV_VALUE_NAME` | The name of the Helm [value](https://helm.sh/docs/chart_best_practices/values/) containing the _environment type_ | `environmentType` |
| `HELM_HOSTNAME_VALUE_NAME`      | The name of the Helm [value](https://helm.sh/docs/chart_best_practices/values/) containing the _environment hostname_ (extracted from the environment URL) | `hostname` |
| `KUBE_NAMESPACE`      | The default Kubernetes namespace to use | _none_ but this variable is automatically set by [GitLab Kubernetes integration](https://docs.gitlab.com/ee/user/project/clusters/index.html) when enabled |
| :lock: `HELM_DEFAULT_KUBE_CONFIG` | The default kubeconfig content to use | `$KUBECONFIG` (thus supports the [GitLab Kubernetes integration](https://docs.gitlab.com/ee/user/project/clusters/index.html) when enabled) |
| `HELM_DEPLOY_ARGS`    | The Helm [command with options](https://helm.sh/docs/helm/helm_upgrade/) to deploy the application (_without dynamic arguments such as release name and chart_) | `upgrade --install --atomic --timeout 120s` |
+3 −3
Original line number Diff line number Diff line
@@ -73,13 +73,13 @@
    },
    {
      "name": "HELM_ENV_VALUE_NAME",
      "description": "The environment type variable set to Helm",
      "default": "environment_type",
      "description": "The name of the Helm [value](https://helm.sh/docs/chart_best_practices/values/) containing the _environment type_",
      "default": "environmentType",
      "advanced": true
    },
    {
      "name": "HELM_HOSTNAME_VALUE_NAME",
      "description": "The hostname variable set to Helm",
      "description": "The name of the Helm [value](https://helm.sh/docs/chart_best_practices/values/) containing the _environment hostname_ (extracted from the environment URL)",
      "default": "hostname",
      "advanced": true
    },
+1 −1
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@ variables:

  HELM_REPOS: "stable@https://charts.helm.sh/stable bitnami@https://charts.bitnami.com/bitnami"

  HELM_ENV_VALUE_NAME: environment_type
  HELM_ENV_VALUE_NAME: environmentType
  HELM_HOSTNAME_VALUE_NAME: hostname

  # Will work with gitlab Kubernetes integration (per env variables)