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

[utils] add helper to resolve secrets that need urlquery function #6361

Merged
merged 6 commits into from
Aug 8, 2024

Conversation

galkindmitrii
Copy link
Member

  • with a new secret-injector we cannot use urlquery over new secret vault references.
  • with a new helper function we work around it by adding 'resolve' on the fly with optional urlquery at the end where it is needed.
  • this patch also uses new helper for places where we had urlquery before. This would allow to simplify the values inside the secrets repo.

galkindmitrii and others added 6 commits July 26, 2024 13:47
- with a new secret-injector we cannot use urlquery over new secret
  vault references.
- with a new helper function we work around it by adding 'resolve' on
  the fly with optional urlquery at the end where it is needed.
- this patch also uses new helper for places where we had urlquery
  before. This would allow to simplify the values inside the secrets
  repo.
We do not want to depend on the `rabbitmq` chart to render our INI
sections. Therefore, we introduce `ini_section._transport_url` and
`utils.rabbitmq_url`. The first contains also the "transport_url = "
part necessary for the INI.

With `utils.rabbitmq_url` accepting a dict of parameters to render the
actualy URL, we can also use it to generate Nova's cell2 and the
auditmiddleware's URL instead of having to do that "manually". In
addition, there's only a single place that adds the
`resolve_secret_urlquery` part now.
Since we're going to use secret references instead of actual values, we
need to rewrite them with our `resolve_secret` helper to resolve them.
@s10 s10 force-pushed the add_utils_secret_resolver branch from 7096cd4 to a2ba0fd Compare July 26, 2024 10:48
@s10 s10 requested a review from businessbean July 29, 2024 09:53
Copy link
Contributor

@Carthaca Carthaca left a comment

Choose a reason for hiding this comment

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

I haven't used the merge and pick functions before, but thankfully the official documentation of the helm templating functions is pretty good so I could hopefully grasp what is done here with the dicts and the input validation.

@joker-at-work joker-at-work merged commit e08c2e2 into master Aug 8, 2024
4 checks passed
@joker-at-work joker-at-work deleted the add_utils_secret_resolver branch August 8, 2024 07:32
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