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

Add --merge-config flag to support merging with default configuration #1075

Merged
merged 3 commits into from
Oct 22, 2024

Conversation

vitorvezani
Copy link
Member

This PR fixes #910

Checklist

  • I have signed the CLA
  • I have updated/added any relevant documentation

Description

What's the goal of this PR?

This PR introduces a new Polaris flag, --merge-config (-m), which allows merging user-provided configurations with the default settings, instead of fully overriding them. This provides greater flexibility by retaining default values for unspecified settings, ensuring smoother configuration management.

What changes did you make?

  • added new parameter
  • ParseFile function is now MergeConfigAndParseFile

What alternative solution should we consider, if any?

Copy link

Fairwinds Insights Scan Results

View the full report at insights.fairwinds.com.

✅ No new Action Items detected!

@devantler
Copy link

We would really like to try this out in our client-side validation stack. Any chance this can be reviewed and merged 🙏

@vitorvezani vitorvezani changed the title Add --merge-config flag to support merging with fefault configuration Add --merge-config flag to support merging with default configuration Oct 21, 2024
cmd/polaris/root.go Outdated Show resolved Hide resolved
@vitorvezani vitorvezani merged commit 0738475 into master Oct 22, 2024
7 checks passed
@vitorvezani vitorvezani deleted the add-config-merge-support branch October 22, 2024 18:31
@devantler
Copy link

devantler commented Oct 22, 2024

Thanks, this is awesome 😃 Testing it straight away 🚀

EDIT: It just works. Thanks again 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

polaris config should selectively override values instead of replacing entire config
4 participants