Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • to-be-continuous/helm
  • sthiriet/helm
  • bertrand.fourtanier/helm
  • gbrd/helm
  • kiranpatel11/helm
  • svalabs/helm
  • timothy.stone/helm
  • rmoreas/helm
  • bfourtanier/helm
  • rahendatri/helm
  • sjdrc/helm
  • dt-contribution-tbc/helm
  • zbozzo/helm
  • cedric3.olivier/helm
  • miha-prehcm/helm
  • lmarie23/helm
  • vincbon/helm
  • arnicel/helm
  • another15y/tbc/helm
  • hutcho66/tbc-helm
20 results
Show changes
Commits on Source (3)
## [4.1.2](https://gitlab.com/to-be-continuous/helm/compare/4.1.1...4.1.2) (2023-01-23)
### Bug Fixes
* **authent:** support Text or file variable for Kubeconfig ([67027d1](https://gitlab.com/to-be-continuous/helm/commit/67027d1483e93096639f2e8de247f494f4fd34c1))
## [4.1.1](https://gitlab.com/to-be-continuous/helm/compare/4.1.0...4.1.1) (2023-01-17)
......
......@@ -10,7 +10,7 @@ In order to include this template in your project, add the following to your `gi
```yaml
include:
- project: 'to-be-continuous/helm'
ref: '4.1.1'
ref: '4.1.2'
file: '/templates/gitlab-ci-helm.yml'
```
......@@ -213,7 +213,7 @@ The Helm template uses some global configuration used throughout all jobs.
| `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) |
| :lock: `HELM_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) |
| `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` |
| `HELM_DELETE_ARGS` | The Helm [command with options](https://helm.sh/docs/helm/helm_uninstall/) to cleanup the application (_without dynamic arguments such as release name_) | `uninstall` |
| `HELM_DEPLOY_CHART` | The Helm [chart](https://helm.sh/docs/topics/charts/) to deploy. _Only required if you want to deploy an **external** chart._ | _none_ |
......@@ -235,7 +235,7 @@ Here are variables supported to configure review environments:
| `HELM_REVIEW_APP_NAME` | Application name for `review` env | `"${HELM_BASE_APP_NAME}-${CI_ENVIRONMENT_SLUG}"` (ex: `myproject-review-fix-bug-12`) |
| `HELM_REVIEW_ENVIRONMENT_URL`| The review environments url _(only define for static environment URLs declaration and if different from default)_ | `$HELM_ENVIRONMENT_URL` |
| `HELM_REVIEW_NAMESPACE` | The Kubernetes namespace to use for `review` env _(only define to override default)_ | `$KUBE_NAMESPACE` |
| :lock: `HELM_REVIEW_KUBE_CONFIG` | kubeconfig content used for `review` env _(only define to override default)_ | `$HELM_DEFAULT_KUBE_CONFIG` |
| :lock: `HELM_REVIEW_KUBE_CONFIG` | Specific kubeconfig for `review` env _(only define to override default)_ | `$HELM_DEFAULT_KUBE_CONFIG` |
| `HELM_REVIEW_VALUES` | The [Values file](https://helm.sh/docs/chart_template_guide/values_files/) to use with `review` environments | _none_ |
### Integration environment configuration
......@@ -252,7 +252,7 @@ Here are variables supported to configure the integration environment:
| `HELM_INTEG_APP_NAME` | Application name for `integration` env | `$HELM_BASE_APP_NAME-integration` |
| `HELM_INTEG_ENVIRONMENT_URL`| The integration environment url _(only define for static environment URLs declaration and if different from default)_ | `$HELM_ENVIRONMENT_URL` |
| `HELM_INTEG_NAMESPACE` | The Kubernetes namespace to use for `integration` env _(only define to override default)_ | `$KUBE_NAMESPACE` |
| :lock: `HELM_INTEG_KUBE_CONFIG` | kubeconfig content used for `integration` env _(only define to override default)_ | `$HELM_DEFAULT_KUBE_CONFIG` |
| :lock: `HELM_INTEG_KUBE_CONFIG` | Specific kubeconfig for `integration` env _(only define to override default)_ | `$HELM_DEFAULT_KUBE_CONFIG` |
| `HELM_INTEG_VALUES` | The [Values file](https://helm.sh/docs/chart_template_guide/values_files/) to use with the `integration` environment | _none_ |
### Staging environment configuration
......@@ -269,7 +269,7 @@ Here are variables supported to configure the staging environment:
| `HELM_STAGING_APP_NAME` | Application name for `staging` env | `$HELM_BASE_APP_NAME-staging` |
| `HELM_STAGING_ENVIRONMENT_URL`| The staging environment url _(only define for static environment URLs declaration and if different from default)_ | `$HELM_ENVIRONMENT_URL` |
| `HELM_STAGING_NAMESPACE` | The Kubernetes namespace to use for `staging` env _(only define to override default)_ | `$KUBE_NAMESPACE` |
| :lock: `HELM_STAGING_KUBE_CONFIG` | kubeconfig content used for `staging` env _(only define to override default)_ | `$HELM_DEFAULT_KUBE_CONFIG` |
| :lock: `HELM_STAGING_KUBE_CONFIG` | Specific kubeconfig for `staging` env _(only define to override default)_ | `$HELM_DEFAULT_KUBE_CONFIG` |
| `HELM_STAGING_VALUES` | The [Values file](https://helm.sh/docs/chart_template_guide/values_files/) to use with the staging environment | _none_ |
### Production environment configuration
......@@ -286,7 +286,7 @@ Here are variables supported to configure the production environment:
| `HELM_PROD_APP_NAME` | Application name for `production` env | `$HELM_BASE_APP_NAME` |
| `HELM_PROD_ENVIRONMENT_URL`| The production environment url _(only define for static environment URLs declaration and if different from default)_ | `$HELM_ENVIRONMENT_URL` |
| `HELM_PROD_NAMESPACE` | The Kubernetes namespace to use for `production` env _(only define to override default)_ | `$KUBE_NAMESPACE` |
| :lock: `HELM_PROD_KUBE_CONFIG` | kubeconfig content used for `production` env _(only define to override default)_ | `$HELM_DEFAULT_KUBE_CONFIG` |
| :lock: `HELM_PROD_KUBE_CONFIG` | Specific kubeconfig for `production` env _(only define to override default)_ | `$HELM_DEFAULT_KUBE_CONFIG` |
| `AUTODEPLOY_TO_PROD` | Set this variable to auto-deploy to production. If not set deployment to production will be `manual` (default behaviour). | _none_ (disabled) |
| `HELM_PROD_VALUES` | The [Values file](https://helm.sh/docs/chart_template_guide/values_files/) to use with the production environment | _none_ |
......@@ -471,11 +471,11 @@ With:
include:
# main template
- project: 'to-be-continuous/helm'
ref: '4.1.1'
ref: '4.1.2'
file: '/templates/gitlab-ci-helm.yml'
# Vault variant
- project: 'to-be-continuous/helm'
ref: '4.1.1'
ref: '4.1.2'
file: '/templates/gitlab-ci-helm-vault.yml'
variables:
......
......@@ -255,7 +255,7 @@
},
{
"name": "HELM_REVIEW_KUBE_CONFIG",
"description": "kubeconfig content used for review env (only define to override default)",
"description": "Specific kubeconfig for review env (only define to override default)",
"default": "$HELM_DEFAULT_KUBE_CONFIG",
"advanced": true,
"secret": true
......@@ -292,7 +292,7 @@
},
{
"name": "HELM_INTEG_KUBE_CONFIG",
"description": "kubeconfig content used for integration env (only define to override default)",
"description": "Specific kubeconfig for integration env (only define to override default)",
"default": "$HELM_DEFAULT_KUBE_CONFIG",
"advanced": true,
"secret": true
......@@ -329,7 +329,7 @@
},
{
"name": "HELM_STAGING_KUBE_CONFIG",
"description": "kubeconfig content used for staging env (only define to override default)",
"description": "Specific kubeconfig for staging env (only define to override default)",
"default": "$HELM_DEFAULT_KUBE_CONFIG",
"advanced": true,
"secret": true
......@@ -371,7 +371,7 @@
},
{
"name": "HELM_PROD_KUBE_CONFIG",
"description": "kubeconfig content used for production env (only define to override default)",
"description": "Specific kubeconfig for production env (only define to override default)",
"default": "$HELM_DEFAULT_KUBE_CONFIG",
"advanced": true,
"secret": true
......
......@@ -11,6 +11,6 @@ variables:
.helm-base:
services:
- name: "$TBC_TRACKING_IMAGE"
command: ["--service", "helm", "4.1.1" ]
command: ["--service", "helm", "4.1.2" ]
- name: "$TBC_VAULT_IMAGE"
alias: "vault-secrets-provider"
......@@ -324,11 +324,20 @@ stages:
}
function setup_kubeconfig() {
if [ -n "$1" ]; then
if [[ -f "$1" ]]
then
# arg1 is a path to a Kuberconfig file
export KUBECONFIG="$CI_PROJECT_DIR/.kubeconfig"
cp -f "$1" "$KUBECONFIG"
log_info "--- using \\e[32mKUBECONFIG\\e[0m provided by env variables"
elif [[ -n "$1" ]]
then
# arg1 is a Kuberconfig file content
export KUBECONFIG="$CI_PROJECT_DIR/.kubeconfig"
echo "$1" > "$KUBECONFIG"
log_info "--- using \\e[32mKUBECONFIG\\e[0m provided by env variables"
elif [ -n "$KUBECONFIG" ]; then
elif [[ -n "$KUBECONFIG" ]]
then
log_info "--- using \\e[32mKUBECONFIG\\e[0m provided by GitLab"
else
log_warn "No \\e[32mKUBECONFIG\\e[0m configuration found!"
......@@ -700,7 +709,7 @@ stages:
entrypoint: [""]
services:
- name: "$TBC_TRACKING_IMAGE"
command: ["--service", "helm", "4.1.1" ]
command: ["--service", "helm", "4.1.2" ]
variables:
HELM_CACHE_HOME: $CI_PROJECT_DIR/.cache/helm
HELM_CONFIG_HOME: $CI_PROJECT_DIR/.config/helm
......