Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating a medusaConfiguration referenced secret should propagate #1217

Closed
1 task
adejanovski opened this issue Feb 22, 2024 · 3 comments · Fixed by #1267 · May be fixed by #1238
Closed
1 task

Updating a medusaConfiguration referenced secret should propagate #1217

adejanovski opened this issue Feb 22, 2024 · 3 comments · Fixed by #1267 · May be fixed by #1238
Assignees
Labels
done Issues in the state 'done'

Comments

@adejanovski
Copy link
Contributor

When using a medusaConfigurationRef, the original secret is copied and then replicated to the contexts and namespaces involved.
But in case the secret is updated due to credentials rotation for example, the copy doesn't get updated, which prevents from replicating the changes.

We need to make sure such secret updates get picked up by the operator and that the secret copy gets refreshed so that all medusa containers can get the new credentials.

Definition of Done

@adejanovski adejanovski added the ready Issues in the state 'ready' label Feb 22, 2024
@Miles-Garnsey
Copy link
Member

Miles-Garnsey commented Mar 12, 2024

Having taken a quick look, it appears that this design is a little odd, because it is replicating secrets between from one namespace to another without using the regular replicatedSecrets types and mechanisms.

I think that the logical way to remedy this problem is to drop the current secret creation mechanism in favour of the creation of a replicatedSecret within the origin namespace of the MedusaConfig.

I think i should mention that the behaviour of this logic is likely to be undefined or generally weird in the case of namespace-scoped deployments, and mention again that we should probably remove support for namespace scoping of this operator.

@burmanm
Copy link
Contributor

burmanm commented Mar 13, 2024

and mention again that we should probably remove support for namespace scoping of this operator.

That would probably prevent many users from installing the operator at all as they do not have cluster-wide access.

@adejanovski adejanovski added in-progress Issues in the state 'in-progress' and removed ready Issues in the state 'ready' labels Mar 29, 2024
@Miles-Garnsey
Copy link
Member

Having discussed this last night, it appears that our preferred option is to prevent the use of namespace-remote MedusaConfigurations within the K8ssandraCluster going forward. PR 1267 gives effect to that change.

Having implemented that change, we need to consider two scenarios:

  1. The future state should rely on simply using the original secret referenced in the MedusaConfiguration. No replication is required here.
  2. However, clusters created in the old world, where a MedusaConfiguration in a remote namespace was allowed need to still function. To serve these (and fix the proximate issue where copies of the bucket secret were not updated), I am making a replacement of the existing functionality in this PR so that a ReplicatedSecret will be used going forward. This will only be used for those legacy clusters which have a remote-ns MedusaConfig. Otherwise the convention will be to pick up the original secret for downstream usage.

I have a PR almost ready to go for this too.

@adejanovski adejanovski added ready-for-review Issues in the state 'ready-for-review' review Issues in the state 'review' and removed in-progress Issues in the state 'in-progress' ready-for-review Issues in the state 'ready-for-review' review Issues in the state 'review' labels Apr 4, 2024
@adejanovski adejanovski added ready-for-review Issues in the state 'ready-for-review' review Issues in the state 'review' and removed ready-for-review Issues in the state 'ready-for-review' review Issues in the state 'review' labels Apr 4, 2024
@adejanovski adejanovski added done Issues in the state 'done' and removed review Issues in the state 'review' labels Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
done Issues in the state 'done'
Projects
Archived in project
3 participants