Skip to content

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
      • else
        • reconcile enabled deployments
    • else
      • if migrations
        • run all migrations
      • reconcile enabled deployments

Testing

I tested by doing the following:

  1. Deploy with spec.chart.version=5.2.4 and then upgrade to 5.3.0
    • Confirm that traditional upgrade logic is followed
  2. Deploy with gitlab.webservice.enabled=false, and then upgrade
    • Confirm that traditional upgrade logic is followed, and that it never tries to reconcile Webservice
  3. Deploy with gitlab.sidekiq.enabled=false, and then upgrade
    • Confirm that traditional upgrade logic is followed, and that it never tries to reconcile Sidekiq
  4. 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
  5. 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

Merge request reports

Loading