-
Notifications
You must be signed in to change notification settings - Fork 6
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: add vault-kv relation #30
feat: add vault-kv relation #30
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got a couple of comments + let's make sure we review/merge the charm-relation-interfaces
pr before this one
Convert to draft to make sure interface PR is merged first |
72e5bb0
to
5d2f301
Compare
Force push is only rebasing on main, with no noticeable change (except the part on vault SVC to align with main). Will now take into account the comments on interface, and on this pull request. Thank you for all your feedback. |
1dd11d0
to
c0c0c4b
Compare
Still WIP, mainly a rebase over main branch + integration of charm-relation-interface |
c0c0c4b
to
02f6a59
Compare
02f6a59
to
755a2c1
Compare
Getting a secret by label only returns the short form of a secret id (without the model's UUID), which is fine when the two applications are inside the same model, but leads to error when in different models. Creating a secret always returns the long form of a secret id, therefore, storing the secret id in the peer relationship with key: label, value: secret id, to ensure long form of secret id.
755a2c1
to
6ca9c1a
Compare
Rebase on main to get Ingress address into vault server's certificate. Adding Storing secret ids in peer relationship because getting secret by label only lead you (after a grant) to get a secret id in short form, which does not work over CMRs |
c1ca4e1
to
ca40902
Compare
Only enable the approle auth method if at least one vault-kv relation was created.
Remove any modification to unit status from the kv handler, replaced by logging calls. Move KV policy to dedicated file.
af3b700
to
df0e267
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good, got a couple more comments though. Feels like we're almost there :)
Use schema defined in charm-relation-interface/vault-kv to validate schema. Rename property-like methods on Requirer object to getters.
a10cbfd
to
7a4fc9d
Compare
7aa4342
to
33c6019
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:)
Simplify events, update documentation, and show how to use a secret to store the unit's nonce.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like a small change, otherwise LGTM
Loosen typing on remove_unit_credentials from Union[str, List[str]] to Union[str, Iterable[str]].
e9a751c
to
38cea6f
Compare
Some tests were trying to do / assert many things outside the goal of the test, remove any superfluous testing.
Description
This PR introduces the Vault-kv relation to vault-k8s.
The vault-kv interface can be discussed here
This interface is a port from the machine charm interface with some note worthy differences:
vault_url
in the app databagisolated
is not allowed anymore as this concept is not really translatable to k8s charmsChecklist: