Support disabling Webservice, Sidekiq, and/or Migrations
Summary
Closes #408 (closed)
-
Adds some
xyzIfEnabled
helper methods to simplify logic (reducing calls to<Component>Enabled
). -
Extends the
isUpgrade
logic as follows:- if upgrade
- if migrations
- if webservice || sidekiq
- do upgrade logic, skipping disabled deployments
- else
- just run all migrations
- if webservice || sidekiq
- else
- reconcile enabled deployments
- if migrations
- else
- if migrations
- run all migrations
- reconcile enabled deployments
- if migrations
- if upgrade
Testing
I tested by doing the following:
- Deploy with
spec.chart.version=5.2.4
and then upgrade to5.3.0
- Confirm that traditional upgrade logic is followed
- Deploy with
gitlab.webservice.enabled=false
, and then upgrade- Confirm that traditional upgrade logic is followed, and that it never tries to reconcile Webservice
- Deploy with
gitlab.sidekiq.enabled=false
, and then upgrade- Confirm that traditional upgrade logic is followed, and that it never tries to reconcile Sidekiq
- Deploy with
gitlab.{webservice,sidekiq}.enabled=false
, and then upgrade- Confirm that all migrations run together, and that it never tries to reconcile Sidekiq or Webservice
- Deploy with
gitlab.migrations.enabled=false
, and then upgrade- Confirm that migrations are skipped, and Sidekiq and/or Webservice are reconciled if enabled
Edited by Mitchell Nielsen