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

Replace WithValueTranslator implementation with upstream one #23

Merged
merged 2 commits into from
Dec 17, 2021

Conversation

porridge
Copy link
Contributor

The implementation of WithValueTranslator in this fork differs slightly from the upstream-merged one (operator-framework/helm-operator-plugins#114).

Replace ours to reduce the chance of bugs and conflicts in the future.

porridge and others added 2 commits December 15, 2021 07:17
Revert "Pass context to Translate(). (#8)"
This reverts commit c3df552.

Revert "Add a WithValueTranslator option to Reconciller. (#6)"
This reverts commit 88508a2.
…pstream PR).

A Translator is a way to produces helm values based on the fetched custom
resource itself (unlike `Mapper` which can only see `Values`).

This way the code which converts the custom resource to Helm values can first
convert an `Unstructured` into a regular struct, and then rely on Go type
safety rather than work with a tree of maps from `string` to `interface{}`.

Thanks to having access to a `Context`, the code can also safely access the
network, for example in order to retrieve other resources from the k8s cluster,
when they are referenced by the custom resource.
@porridge porridge merged commit 57dfe5d into main Dec 17, 2021
@porridge porridge deleted the porridge/translator-refactored branch December 17, 2021 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants