Skip to content

Conversation

@IsaacJames
Copy link

@IsaacJames IsaacJames commented Jan 5, 2026

Adding the rollback controller boilerplate.

@IsaacJames IsaacJames force-pushed the CI-3637-init-rollback-controller branch from 4639c2d to 42743f8 Compare January 6, 2026 11:32

manager, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
LeaderElection: commonOptions.ManagerLeaderElection,
LeaderElectionID: "deploy.crds.gocardless.com",
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this has to be rollback.deploy.crds.gocardless.com as the documentation states:

LeaderElectionID determines the name of the resource that leader election will use for holding the leader lock.

I don't think this is as applicable to us, as we don't plan to run multiple replicas of the controller as of yet, but it might be useful if we decide to do it in the future.

Copy link
Author

@IsaacJames IsaacJames Jan 7, 2026

Choose a reason for hiding this comment

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

Right, gotcha. I'm assuming we should also change the release controller election ID to release.deploy.crds.gocardless.com then.

Copy link
Author

Choose a reason for hiding this comment

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

I've updated both now.

Comment on lines +38 to +41
verbs:
- get
- list
- watch
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure what the mechanism would be, but wouldn't the controller also need to update the Release?

I can think of a scenario where a rollback has happened, and we want to release status to indicate that it has occurred. I'm pretty sure we wouldn't want the rollback controller to update the status field of the release resource directly, but maybe we could manage that through annotations on the releases.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not (yet) convinced we need to update an existing Release by the rollback controller. However, if we decide to do so, maybe updating a specific (rollback controller owned) condition would be suitable?

However, maybe a better way would be to somehow inject this information through deployment mechanism during deployment, so it would be present during the creation of the Release resource? We already have the message field, so I assume there was some idea of how this could get propagated?

Copy link
Author

Choose a reason for hiding this comment

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

Yep, I think I agree with @0x0013 - if we want to reflect the rollback in the Release resource I'd prefer to include that information in the ArgoCD notification and have the release-recorder inject it somehow than have both controllers managing the Release resource, even if indirectly via annotations.

IsaacJames and others added 2 commits January 7, 2026 16:39
Co-authored-by: Emil Lozev <elozev@gocardless.com>
@IsaacJames IsaacJames requested a review from goelozev January 7, 2026 16:40
@IsaacJames IsaacJames merged commit a7013de into pre-release-5.1.0 Jan 8, 2026
5 checks passed
@IsaacJames IsaacJames deleted the CI-3637-init-rollback-controller branch January 8, 2026 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants