From 4cdf3000350cce167834d7e95226fd3c9bd83ff9 Mon Sep 17 00:00:00 2001 From: DJ Mountney Date: Tue, 31 May 2022 12:54:52 -0700 Subject: [PATCH 1/3] Ensure dependency update pipelines also include helm chart bundles - Also add dev docs on updating the dependencies --- .gitlab-ci.yml | 1 - deps.yml | 1 + doc/development/dependencies.md | 29 +++++++++++++++++++++++++++++ doc/development/index.md | 4 ++++ 4 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 doc/development/dependencies.md diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 38e104a44f..244d2316af 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -123,7 +123,6 @@ update-trigger-branch: - if: '$TRIGGER_UPDATE' # Allow us to manually trigger this job in a pipeline if we wish using this CI variable dependency_update: - image: registry.gitlab.com/gitlab-org/gitlab-omnibus-builder/ruby_docker:2.15.0 stage: prepare script: - curl https://deps.app/install.sh | bash -s -- -b $HOME/bin diff --git a/deps.yml b/deps.yml index 9d95f29f16..5314cbf82d 100644 --- a/deps.yml +++ b/deps.yml @@ -9,6 +9,7 @@ dependencies: - name: .* # everything else enabled: true settings: + before_commit: helm dependency update # Assign to WarheadsSE (jplum) and twk3 (dmountney) by default gitlab_assignee_ids: - 597578 diff --git a/doc/development/dependencies.md b/doc/development/dependencies.md new file mode 100644 index 0000000000..674e2340b2 --- /dev/null +++ b/doc/development/dependencies.md @@ -0,0 +1,29 @@ +--- +stage: Enablement +group: Distribution +info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers +--- + +# Updating chart dependencies + +The GitLab Helm Chart includes dependencies on other bundled Helm Charts. The list of dependencies are managed by the `requirements.yml` file at the root of the repository, and these dependencies are found in the top level `charts` directory. + +The charts are broken down into the following categories: + +## GitLab sub-charts + +The actual GitLab Helm chart source is contained within a series of sub-charts under the `charts/gitlab` chart. See the [GitLab chart architecture](../architecture/architecture.md#the-gitlab-chart) for details. These charts are not considered _dependencies_ but are instead the primary templates for the GitLab Helm Chart. + +## Forked charts + +Checked-in but modified sources of third-party charts. Follow the [forked charts documentation](../architecture/decisions.md#forked-charts) for details and updating instructions. + +## Upstream chart dependencies + +These are dependencies checked into the `charts` folder as `.tgz` files, but are downloaded copies of charts available in public repositories. The versions and locations from where these are downloaded is controlled by the `requirements.yml` file. These have been checked into the source code repository so that our build and test pipelines do not need to depend on the availability of the Helm repositories these are typically downloaded from. + +### Update upstream chart dependency + +1. Update the version information in `requirements.yml` +1. Run `helm dependency update` to download the new version of the chart to your local repository, and to update the `requirements.lock` file. +1. Create a new Merge Request with the new files, and the updated `requirements.yml` and `requirements.lock`. diff --git a/doc/development/index.md b/doc/development/index.md index dac0b73829..6be09ffa87 100644 --- a/doc/development/index.md +++ b/doc/development/index.md @@ -41,6 +41,10 @@ functionality of the chart. [Read more in the GitLab QA chart docs](gitlab-qa/index.md). +### Updating chart dependencies + +See the [dependencies guide](dependencies.md) for instructions on how to update the chart dependencies bundles with the chart. + ### ChaosKube ChaosKube can be used to test the fault tolerance of highly available cloud native GitLab installations. -- GitLab From defc17ce8efebc9c1323cc0a16b4aaafa2b6fa96 Mon Sep 17 00:00:00 2001 From: DJ Mountney Date: Thu, 23 Jun 2022 21:55:28 +0000 Subject: [PATCH 2/3] Apply 1 suggestion(s) to 1 file(s) --- doc/development/dependencies.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/development/dependencies.md b/doc/development/dependencies.md index 674e2340b2..a2ef5663cd 100644 --- a/doc/development/dependencies.md +++ b/doc/development/dependencies.md @@ -20,7 +20,7 @@ Checked-in but modified sources of third-party charts. Follow the [forked charts ## Upstream chart dependencies -These are dependencies checked into the `charts` folder as `.tgz` files, but are downloaded copies of charts available in public repositories. The versions and locations from where these are downloaded is controlled by the `requirements.yml` file. These have been checked into the source code repository so that our build and test pipelines do not need to depend on the availability of the Helm repositories these are typically downloaded from. +These are dependencies bundled into the `charts` folder as `.tgz` files during packaging or prior to a deployment of the git checkout, and are downloaded copies of charts available in public repositories. The versions and locations from where these are downloaded is controlled by the `requirements.yml` file. ### Update upstream chart dependency -- GitLab From e4653c90993484f2bef8e235aee171d1a94d2a2c Mon Sep 17 00:00:00 2001 From: DJ Mountney Date: Fri, 24 Jun 2022 00:20:57 +0000 Subject: [PATCH 3/3] Apply 1 suggestion(s) to 1 file(s) --- doc/development/dependencies.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/development/dependencies.md b/doc/development/dependencies.md index a2ef5663cd..26e93ba428 100644 --- a/doc/development/dependencies.md +++ b/doc/development/dependencies.md @@ -20,7 +20,7 @@ Checked-in but modified sources of third-party charts. Follow the [forked charts ## Upstream chart dependencies -These are dependencies bundled into the `charts` folder as `.tgz` files during packaging or prior to a deployment of the git checkout, and are downloaded copies of charts available in public repositories. The versions and locations from where these are downloaded is controlled by the `requirements.yml` file. +These are dependencies bundled into the `charts` folder as `.tgz` files during packaging or prior to a deployment of the source branch, and are downloaded copies of charts available in public repositories. The versions and locations from where these are downloaded is controlled by the `requirements.yml` file. ### Update upstream chart dependency -- GitLab