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

Rewrite dumper in Go #49

Merged
merged 2 commits into from
Nov 12, 2024
Merged

Rewrite dumper in Go #49

merged 2 commits into from
Nov 12, 2024

Conversation

bastjan
Copy link
Contributor

@bastjan bastjan commented Nov 12, 2024

Differences:

  • All APIs are fully qualified in both the options (--must-exist=certificates.cert-manager.io, --ignore=deployment.apps) and the output files (objects-Certificate.cert-manager.io.json). This makes it possible to distinguish between objects with the same kind but different groups. See Dumper silently fails for ambiguous kinds with multiple groups #47.
  • Resources without a list endpoint are ignored, do not cause an error, and don't need to be explicitly ignored.
  • Ignore and must-exist options are now command line flags instead of files in /usr/local/share.

Fixes #47 and maybe #42.

Checklist

  • Keep pull requests small so they can be easily reviewed.
  • Update the documentation.
  • Categorize the PR by setting a good title and adding one of the labels:
    bug, enhancement, documentation, change, breaking, dependency
    as they show up in the changelog

@bastjan bastjan added the enhancement New feature or request label Nov 12, 2024
@bastjan bastjan linked an issue Nov 12, 2024 that may be closed by this pull request
@bastjan bastjan requested a review from a team November 12, 2024 10:56
Copy link
Member

@simu simu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall 🚀

The switch from files to command line flags for the must-exist and ignore resources configs will most likely require adjustments in https://github.com/projectsyn/component-cluster-backup

CODE_OF_CONDUCT.md Outdated Show resolved Hide resolved
internal/pkg/discovery/discovery.go Outdated Show resolved Hide resolved
main.go Show resolved Hide resolved
Differences:
- All APIs are fully qualified in both the options (`--must-exist=certificates.cert-manager.io`, `--ignore=deployment.apps`) and the output files (`objects-Certificate.cert-manager.io.json`).
  This makes it possible to distinguish between objects with the same kind but different groups. See #47.
- Resources without a list endpoint are ignored and do not cause and error or need to be explicitly ignored.
- Ignore and must-exist options are now command line flags instead of files in `/usr/local/share`.

Fixes #47 and #42.
@bastjan bastjan merged commit 74c9d2b into master Nov 12, 2024
3 checks passed
@bastjan bastjan deleted the rewrite branch November 12, 2024 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dumper silently fails for ambiguous kinds with multiple groups
2 participants