Skip to content

BREAKING CHANGE: delete built-in cluster applications

João Alexandre Cunha requested to merge release/1.0.0 into master

What does this MR do?

As part of the effort (gitlab-org/gitlab#327908 (closed)) to move all responsibilities of Helmfiles into a project template, this MR will remove the previously built-in templates that we were maintaining.

This is a BIG BREAKING_CHANGE, therefore it will be released over v1.0.0, so that the existing v0.x.x users don't get affected by it. That being said, we'll be deprecating the v0.x.x version, which means it shouldn't be getting version updates in the future.

Other important changes

  • This is being built off of !138 (closed). It means it will start using Helm v3.

  • We broke down the default script into utility scripts: [gl-helmfile, gl-fail-if-helm2-releases-exist, gl-ensure-namespace]. This should ensure more full flexibility around the usage of these scripts, since the user can choose what it important to them.

A project template example could then call this script the following way:

detect-helm2-releases:
  stage: test
  image: "registry.gitlab.com/gitlab-org/cluster-integration/cluster-applications/release-1-0-0:latest"
  environment:
    name: production
  script:
    - gl-fail-if-helm2-releases-exist gitlab-managed-apps
  rules:
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH

apply:
  stage: deploy
  image: "registry.gitlab.com/gitlab-org/cluster-integration/cluster-applications/release-1-0-0:latest"
  environment:
    name: production
  script:
    - gl-ensure-namespace gitlab-managed-apps
    - gl-helmfile --file $CI_PROJECT_DIR/helmfile.yaml apply --suppress-secrets
  rules:
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH

Utilities scripts

  • gl-ensure-namespace: ensures creation of a specified namespace and adds the necessary label for Cilium to work.
  • gl-fail-if-helm2-releases-exist: detects if there are Helm v2 releases for a specific namespace.
  • gl-helmfile: runs any Helmfile command passed through arguments.

/cc @hfyngvason

Screenshots

Manual QA

Edited by João Alexandre Cunha

Merge request reports