Skip to content

Conversation

@calvinrzachman
Copy link
Contributor

This PR equips lndinit with the ability to write arbitrary key/value data to a Kubernetes Configmap object.

  • Modeled heavily of existing store-secret command.
  • Leverage the fact that secret/configmap entries are very similar save for secrets are base64 encoded.
  • TODO: See if we can slim the diff and cut down on similarity between processing for secrets & configmaps.

@calvinrzachman calvinrzachman self-assigned this Jan 16, 2024
@calvinrzachman calvinrzachman force-pushed the store-configmap branch 3 times, most recently from a9c7110 to 60df4b7 Compare January 16, 2024 15:57
k8s.go Outdated
ObjectTypeConfigMap k8sObjectType = "ConfigMap"
)

type k8sObjectOptions struct {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If the rename of the CLI flag to the more general --k8s.name is not preferred, we could just make a separate k8sConfigmapOptions struct.

@calvinrzachman calvinrzachman marked this pull request as ready for review January 16, 2024 16:01
Copy link
Contributor

@guggero guggero left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!
Very useful new function.

Main comment is about not breaking existing users by renaming flags. So we'd rather have some duplicated code.
I'll do a full review with manual tests once the diff is updated.

@calvinrzachman calvinrzachman force-pushed the store-configmap branch 5 times, most recently from ba436e9 to d23278b Compare January 18, 2024 15:36
Copy link
Contributor

@guggero guggero left a comment

Choose a reason for hiding this comment

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

utACK, LGTM 🎉

We'll use this to write connection relateed information
for consumption by payment service proxy.
@guggero guggero merged commit b8348e3 into lightninglabs:main Jan 19, 2024
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.

3 participants