Page MenuHomePhabricator

Set up CI for the deployment-charts repository
Closed, ResolvedPublic

Description

operations/deployment-charts is our helm charts repository, meaning it's the repository where we store the helm charts for all the software we run on kubernetes in production. It currently has no CI whatsoever, and we should change that.

As a first step, we should just set up a CI job that runs helm lint and helm template on the charts. Later we can think of further validation like applying the chart on minikube or something like unit testing the generated template, which would allow us to catch deeper issues.

But let's not let the perfect be the enemy of the barely decent, and let's start with the low-hanging fruit!

What needs to be done:

  • Create a way to run the tests within the deployment-charts. Any tool to run tasks on specific files will be ok, but I think I'll settle on Rake.
  • Create a docker image for running our tests, within integration/config:dockerfiles. It will at a minimum need helm and rake to be installed, and a git clone of the deployment-charts repo. It will contain a /bin/run script with the usual ZUUL-related boilerplate that will then run rake, pretty much similar to what the releng/operations-puppet docker image does.
  • Create a job definition in integration/config to run tests using that image for the operations/deployment-charts repository.

Bonus points if we can use the same image (or a slightly modified one) to run the same tests on the local-charts repository.

Details

Related Gerrit Patches:
operations/deployment-charts : masterAdd rakefile to run helm tests
integration/config : masterzuul: use helm-lint job to test deployment-charts
integration/config : masterdocker: fix user root in helm-linter
integration/config : masterhelm-linter: run rake instead of helm lint directly

Event Timeline

Joe created this task.Sep 19 2019, 9:38 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 19 2019, 9:38 AM

@Jdforrester-WMF has added an experimental helm-lint job to the repository: T216049. It runs help lint --strict charts/*/ :]

Joe added a comment.Sep 19 2019, 10:34 AM

@Jdforrester-WMF has added an experimental helm-lint job to the repository: T216049. It runs help lint --strict charts/*/ :]

I can interate upon that work then, thanks!

Change 537984 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/deployment-charts@master] Add rakefile to run helm tests

https://gerrit.wikimedia.org/r/537984

Change 538023 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[integration/config@master] helm-linter: run rake instead of helm lint directly

https://gerrit.wikimedia.org/r/538023

Change 538023 merged by jenkins-bot:
[integration/config@master] helm-linter: run rake instead of helm lint directly

https://gerrit.wikimedia.org/r/538023

Change 538065 had a related patch set uploaded (by Hashar; owner: Hashar):
[integration/config@master] docker: fix user root in helm-linter

https://gerrit.wikimedia.org/r/538065

Change 538065 merged by jenkins-bot:
[integration/config@master] docker: fix user root in helm-linter

https://gerrit.wikimedia.org/r/538065

Mentioned in SAL (#wikimedia-releng) [2019-09-19T16:52:50Z] <hashar> Building releng/helm-linter:0.2.0 T233291

Joe updated the task description. (Show Details)Sep 20 2019, 9:07 AM

Change 538167 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[integration/config@master] zuul: use helm-lint job to test deployment-charts

https://gerrit.wikimedia.org/r/538167

Change 538167 merged by jenkins-bot:
[integration/config@master] zuul: use helm-lint job to test deployment-charts

https://gerrit.wikimedia.org/r/538167

Change 537984 merged by jenkins-bot:
[operations/deployment-charts@master] Add rakefile to run helm tests

https://gerrit.wikimedia.org/r/537984

Joe closed this task as Resolved.Sep 24 2019, 9:36 AM
Tarrow added a subscriber: Tarrow.Sep 25 2019, 10:36 AM