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

feat: node key secret to configmap #466

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

pharr117
Copy link
Contributor

This PR completely removes the usage of Secrets for Node Keys, instead storing them in ConfigMaps prior to mounting into the fullnode.

The changes follow this pattern:

  1. A new NodeKeyCollector type that replaces the secret builder. It gets the node keys from a previous config map or generates new node keys, associating them with the ObjectKey for a replica
  2. The NodeKeys are then passed to:
    • PeerCollector, replacing the Get for Secrets when collecting peers
    • ConfigMapControl, for reconciling the node keys during config map building

Note: In order to prevent NodeKeys from causing unnecessary updates when marshalled to JSON (non-deterministic) and injected into the config map, the NodeKeyCollector stores the marshalled JSON alongside the NodeKey type. This value will contain the unchanged JSON from the previous configmap, ensuring that non-deterministic JSON marshalling doesn't cause changes to the configmap between reconciles.

@pharr117 pharr117 requested review from agouin and a team January 28, 2025 21:00
@agouin
Copy link
Member

agouin commented Feb 5, 2025

This is looking great, I believe all that's missing is removing the secrets from the CRD RBAC perms.

As we discussed, we'll want to document the migration strategy so that operators have a way to retain their node keys if desired.

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.

2 participants