Skip to content

Replace WithValueTranslator implementation with upstream one - #23

Merged
porridge merged 2 commits into
mainfrom
porridge/translator-refactored
Dec 17, 2021
Merged

Replace WithValueTranslator implementation with upstream one#23
porridge merged 2 commits into
mainfrom
porridge/translator-refactored

Conversation

@porridge

Copy link
Copy Markdown
Collaborator

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.

porridgeand 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 mainDec 17, 2021
@porridge
porridge deleted the porridge/translator-refactored branch December 17, 2021 08:15
Sign up for freeto 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.

2 participants

@porridge@SimonBaeumer