-
Notifications
You must be signed in to change notification settings - Fork 311
add secret decode diff #785
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
Conversation
Signed-off-by: yxxhero <[email protected]>
Signed-off-by: yxxhero <[email protected]>
|
@lucasfcnunes hi. could you try to use this branch? |
Signed-off-by: yxxhero <[email protected]>
Signed-off-by: yxxhero <[email protected]>
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.
Little too late @yxxhero but
# helmfile.yaml.gotmpl
repositories:
- name: bedag
url: https://bedag.github.io/helm-charts
---
releases:
- chart: bedag/raw
name: helmfile-diff
namespace: lucasfcnunes-test
values:
- resources:
- apiVersion: v1
kind: Secret
metadata:
name: test-secret
stringData:
key2: value2
key3: value3-stringData
data:
key1: '{{ "value1" | b64enc }}'
key3: '{{ "value3-data" | b64enc }}'
key4: '{{ "value4\na" | b64enc }}'
key5: '{{ "value5\na\n" | b64enc }}'
key6: '{{ "value6\na\n\n" | b64enc }}'
key7: '{{ "value7\na\n\n\n" | b64enc }}'
on initial helm release (v1), the command helmfile diff --diff-args='--show-secrets-decoded' --debug gives the key3 on .data instead of the one on .stringData.
refs:
|
@lucasfcnunes cool. got it. will fix that. |
|
@yxxhero Diff adds special characters in some cases:
Run Output broken (adds \n, brokes diff on huge files) Temp fix (trim whitespaces in template) |
|
@rerime could you give me exampe that I can debug? |
|
@rerime got it. it's special case. |
This pull request introduces several updates to the
helm-diffplugin, including new features, enhanced functionality, and documentation improvements. The most notable changes include the addition of the--show-secrets-decodedflag, improvements to secret handling in diffs, and updates to theREADME.mdfor better clarity and accuracy.New Features and Enhancements:
--show-secrets-decodedflag to decode and display secret values in the diff output. This includes updates todiff.Optionsand thedoDiffandcontentSearchfunctions to handle the new flag. (cmd/options.go[1]diff/diff.go[2] [3] [4]redactSecretsfunction to ensure better handling of secrets during diff operations. (diff/diff.go[1] [2] [3] [4] [5]Documentation Updates:
README.mdwith additional examples and corrected grammar for clarity. For instance, added examples for namespace-specific release comparisons and improved descriptions of flags like--dry-runand--suppress. [1] [2]--show-secrets-decoded,--set-json, and--set-literal, and clarified existing flag descriptions. [1] [2] [3]Bug Fixes and Consistency:
README.mdfor flags like--reset-then-reuse-valuesand--skip-schema-validation. [1] [2]README.md.These changes improve the functionality and usability of the plugin while ensuring the documentation is clear and up-to-date.