Skip to content

Update included Redis sub-chart

Jason Young requested to merge 3375-update-redis-chart into master

What does this MR do?

This merge request updates the included bitnami/Redis chart from 11.3.4 to 16.13.2. Due to changes in version 14.0 of the bitnami/Chart for attributes on the StatefulSet - upgrading to this version will require a manual deletion of the RELEASE-redis-master StatefulSet before proceeding.

Documentation has been added with the error message seen if this isn't performed prior to an upgrade - as well as instructions for removing the StatefulSet.

Additional changes and impacts

This merge request also makes a substantial change to the use of global.redis.password - renaming it to global.redis.auth

In the upstream chart - global.redis.password is a scalar value - however we treat it as a map - and we use it to specify the secret/key for the Redis password, if password authentication is desired - we then override the upstream templates to provide this to the Redis chart.

We also allow other sub-charts to inherit from this global.redis.password map for redis sub-queue behavior.

We got away with this, because prior to version 14.0 of the bitnami/Redis chart - global.redis.password wasn't defined upstream, global.redis was just set as {}. However in v14.0 - it was set as nil - and then in v14.8.2 - it was set as an empty string.

In Helm 3.3.1 - both values will kick out warnings to stderr from coalesce.go - in the form:

coalesce.go:223: warning: destination for gitlab.redis.global.redis.password is a table. Ignoring non-table value ()
coalesce.go:223: warning: destination for redis.global.redis.password is a table. Ignoring non-table value ()
[...]

Renaming the setting mitigates these warnings - while changes to the merge templates preserves the existing behavior for inheriting the global.redis.auth settings in various globa.redis.[someconfigkey].password maps - as well as allowing for anyone setting global.redis.password.{enabled|secret|key} values themselves (those users will continue to get coalesce warnings).

Related issues

Closes #3375 (closed)

Test plan

  1. Make sure to update local helm dependencies in order to pull down the specified 16.13.2 Redis chart
  2. New clusters should a single Redis master pod deployed (due to architecture: standalone).
  3. Upgrading an existing cluster should see the Helm upgrade fail when it reaches the Redis chart.
  4. Delete the StatefulSet for RELEASE-redis-master and subsequent upgrades should be fine.

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion.

Required

  • Merge Request Title and Description are up to date, accurate, and descriptive
  • MR targeting the appropriate branch
  • MR has a green pipeline on GitLab.com
  • When ready for review, MR is labeled "~workflow::ready for review" per the Distribution MR workflow

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes
  • Documentation created/updated
  • Tests added
  • Integration tests added to GitLab QA
  • Equivalent MR/issue for omnibus-gitlab opened
  • Validate potential values for new configuration settings. Formats such as integer 10, duration 10s, URI scheme://user:passwd@host:port may require quotation or other special handling when rendered in a template and written to a configuration file.
Edited by Jason Young

Merge request reports