-
Notifications
You must be signed in to change notification settings - Fork 209
feat(values): dev inspect #4268
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Kit Patella <kit@defenseunicorns.com>
…flags to package create,deploy and inspect cmds with --set Signed-off-by: Kit Patella <kit@defenseunicorns.com>
…options Signed-off-by: Kit Patella <kit@defenseunicorns.com>
Signed-off-by: Kit Patella <kit@defenseunicorns.com>
Signed-off-by: Kit Patella <kit@defenseunicorns.com>
Signed-off-by: Kit Patella <kit@defenseunicorns.com>
…tion Signed-off-by: Kit Patella <kit@defenseunicorns.com>
Signed-off-by: Kit Patella <kit@defenseunicorns.com>
Signed-off-by: Kit Patella <kit@defenseunicorns.com>
Signed-off-by: Kit Patella <kit@defenseunicorns.com>
Signed-off-by: Kit Patella <kit@defenseunicorns.com>
Signed-off-by: Kit Patella <kit@defenseunicorns.com>
Signed-off-by: Kit Patella <kit@defenseunicorns.com>
…m chart value overrides Signed-off-by: Kit Patella <kit@defenseunicorns.com>
Signed-off-by: Kit Patella <kit@defenseunicorns.com>
Signed-off-by: Kit Patella <kit@defenseunicorns.com>
Signed-off-by: Kit Patella <kit@defenseunicorns.com>
Signed-off-by: Kit Patella <kit@defenseunicorns.com>
…n using zarf to helm values mappings Signed-off-by: Kit Patella <kit@defenseunicorns.com>
Signed-off-by: Kit Patella <kit@defenseunicorns.com>
Signed-off-by: Kit Patella <kit@defenseunicorns.com>
Signed-off-by: Kit Patella <kit@defenseunicorns.com>
…than i expected Signed-off-by: Kit Patella <kit@defenseunicorns.com>
Signed-off-by: Kit Patella <kit@defenseunicorns.com>
Signed-off-by: Kit Patella <kit@defenseunicorns.com>
Signed-off-by: Kit Patella <kit@defenseunicorns.com>
Signed-off-by: Kit Patella <kit@defenseunicorns.com>
Signed-off-by: Kit Patella <kit@defenseunicorns.com>
Signed-off-by: Kit Patella <kit@defenseunicorns.com>
Signed-off-by: Kit Patella <kit@defenseunicorns.com>
Signed-off-by: Kit Patella <kit@defenseunicorns.com>
✅ Deploy Preview for zarf-docs canceled.
|
Signed-off-by: Kit Patella <kit@defenseunicorns.com>
Signed-off-by: Kit Patella <kit@defenseunicorns.com>
Signed-off-by: Kit Patella <kit@defenseunicorns.com>
Signed-off-by: Kit Patella <kit@defenseunicorns.com>
src/pkg/packager/inspect.go
Outdated
| ValuesFiles []string | ||
| SetValues map[string]string |
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.
In other SDK functions such as deploy and remove, we pass in values.Values. Is there a reason we pass in values files and set values here instead?
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.
Def, this change didn't make sense - missed it while trying to automate some of these additions. The parse and merge code now lives in the CLI layer, while the API layer only takes a value.Values - same as the rest of the implementations.
Signed-off-by: Kit Patella <kit@defenseunicorns.com>
| } | ||
|
|
||
| // Parse values from files | ||
| values, err := value.ParseFiles(ctx, o.valuesFiles, value.ParseFilesOptions{}) |
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.
Some duplication in this block, that can be pulled out into a common function. I know there's a few active PRs with blocks like this, so I think a follow up PR afterwards would be reasonable
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.
It does how up pretty often. This makes sense to me as two steps in the CLI layer because it's coming from two different sources (rather than wrapping both load valuesfiles and setvalues in the same helper func). The setValue step would definitely benefit from abstracting out the loop and path parsing though. I'll make a followup issue for it
brandtkeller
left a comment
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.
Interested in intent to support rendering the values that would be packaged internally and if that is/should be supported.
| KubeVersion string | ||
| // Values are values passed in at inspect time. They can come from the CLI, user configuration, or set directly by | ||
| // API callers. | ||
| value.Values |
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.
With the CLI as the function caller - it parses values files from configuration and set values - but we have not yet parsed the values that were declared within the package
kind: ZarfPackageConfig
metadata:
name: values-templating
description: Example nginx package to demonstrate Zarf Values templating
values:
files:
- values.yamlShould we be parsing these similar to deploy-time to include in templating?
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.
Yes, this was a miss in the previous version of the PR. It's been changed significantly now and should be addressed
Signed-off-by: Kit Patella <kit@defenseunicorns.com>
Signed-off-by: Kit Patella <kit@defenseunicorns.com>
Signed-off-by: Kit Patella <kit@defenseunicorns.com>
…path lookup Signed-off-by: Kit Patella <kit@defenseunicorns.com>
Signed-off-by: Kit Patella <kit@defenseunicorns.com>
Signed-off-by: Kit Patella <kit@defenseunicorns.com>
Signed-off-by: Kit Patella <kit@defenseunicorns.com>
Signed-off-by: Kit Patella <kit@defenseunicorns.com>
Description
This PR adds values to dev inspect, so users can see the results of the package values that they have loaded.
Related Issue
Fixes #4222
Relates to #3946
Checklist before merging