-
Notifications
You must be signed in to change notification settings - Fork 109
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
Support excluding _raw from the destination #546
Conversation
Extends VSO to support configuring Go templates that will be rendered to the K8s Secret data. Template specs can be configured directly in a syncable secret custom resource, or can be shared via references to external ConfigMap resources. Templates can be composed of other templates, and optionally rendered as a K8s Secret data value. The rendered template name is used as the key to the rendered data. Templating support also includes a large subset of the hermetic Sprig text functions that can be used to handle various encoding/decoding tasks, map manipulations, etc. In addition to template support, it is now possible to filter top level secret data fields based on include/exclude regex patterns. Filters can be used in conjunction with templating, and are meant to augment the overall templating experience. Template fields are not considered during field filtering.
Contains all Secret data transformation configuration.
Other fixes
- update the demo to include templated values - other fixes etc...
Add first class SecretTransformation CRD and controller Drop support for getting shared template/tranformation bits from a ConfigMap.
Are there any negative implications with the exclude? If not, I wonder why the exclusion is not set to true by default. |
@rgarcia89 not for VSO per-se but there could be for any user that is currently relying on this feature. I can see how having to configure this on all CRs could be burdensome, so it is probably worth making the feature opt-in somehow. |
In that case it would be more attractive to make the default parameter configurable. Like the |
1434971
to
3292648
Compare
@rgarcia89 made this a command line configurable as well. See the updated description for more details. |
3292648
to
b2c9ac7
Compare
…o VAULT-21377/make-raw-data-optional
7bbb2d2
to
d6fbc79
Compare
Fixes: - properly set the SyncableSecretMetaData.Name from ObjectMeta - add tests for NewSyncableSecretMetaData()
…o VAULT-21377/make-raw-data-optional
Factors out RenderOptionExcludeRaw global var to GlobalTransformationOption struct.
e2c5d32
to
8f2fa91
Compare
Co-authored-by: Theron Voran <tvoran@users.noreply.github.com>
…o VAULT-21377/make-raw-data-optional
Add new transformation configurable
excludeRaw
to all syncable secret CRDs which controls whether or not the the_raw
secret data is included in the destination secret.Example:
Adds a new commandline flag,
-global-transformation-options
, that takes a comma delimited set of options that provide control over global rendering options. The only option isexclude-raw
.The global rendering options can also be set from Helm chart values:
Closes #424