Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

feat(appliance): redeploy various services when pg/redis config changes#63954

Merged
craigfurman merged 6 commits into
mainfrom
appliance-roll-services-with-dbs-change
Jul 22, 2024
Merged

feat(appliance): redeploy various services when pg/redis config changes#63954
craigfurman merged 6 commits into
mainfrom
appliance-roll-services-with-dbs-change

Conversation

@craigfurman

Copy link
Copy Markdown
Contributor

It's probably best to review this commit-by-commit. Builds on https://github.com/sourcegraph/sourcegraph/pull/63845, and closes https://linear.app/sourcegraph/issue/REL-14/ensure-pods-roll-when-referenced-secret-changes.

When one of the 3 DB configs changes, an annotation "checksum/auth" on frontend's deployment's spec.template.metadata should change on next reconcile. This will cause pods to roll, picking up the new secret values. It should also cause the top-level annotation configHash to change, which indicates to the appliance that the kubernetes resource should be updated.

A similar mechanism is implemented for "checksum/redis", on every service that uses redis (obtained by grepping the helm chart for the same annotation).

Test plan

Golden tests included.

Changelog

@craigfurman craigfurman added the no-changelog Exclude this PR from the next changelog. label Jul 19, 2024
@craigfurman craigfurman requested review from a team and jdpleiness July 19, 2024 14:44
@cla-bot cla-bot Bot added the cla-signed label Jul 19, 2024

@Chickensoupwithrice Chickensoupwithrice left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Super helpful to go by commits :)

@craigfurman craigfurman changed the title feat(appliance): redeploy various services when redis config changes feat(appliance): redeploy various services when pg/redis config changes Jul 22, 2024
@craigfurman craigfurman merged commit e81c39a into main Jul 22, 2024
@craigfurman craigfurman deleted the appliance-roll-services-with-dbs-change branch July 22, 2024 08:44
craigfurman pushed a commit that referenced this pull request Jul 31, 2024
…es (#63954)

Builds on
https://github.com/sourcegraph/sourcegraph/pull/63845, and closes
https://linear.app/sourcegraph/issue/REL-14/ensure-pods-roll-when-referenced-secret-changes.

When one of the 3 DB configs changes, an annotation "checksum/auth" on
frontend's deployment's spec.template.metadata should change on next
reconcile. This will cause pods to roll, picking up the new secret
values. It should also cause the top-level annotation configHash to
change, which indicates to the appliance that the kubernetes resource
should be updated.

A similar mechanism is implemented for "checksum/redis", on every
service that uses redis (obtained by grepping the helm chart for the
same annotation).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla-signed no-changelog Exclude this PR from the next changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants