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

lint command should optionally validate existence of referenced resources #3907

Open
crenshaw-dev opened this issue Oct 21, 2024 · 0 comments
Labels
enhancement New feature or request kubectl-plugin

Comments

@crenshaw-dev
Copy link
Member

Summary

Although Argo Rollouts' lint command will lint non-Rollouts resources if they are provided, it will not verify that all referenced resources are provided.

The lint command should accept a manifest YAML and, if you specify something like --require-references, it should verify that all referenced resources are actually present.

Use Cases

So, for example, if the provided Rollout itself is invalid or if the provided VirtualService is invalid, the lint command will throw an error. But if the Rollout references a VirtualService which is not provided, the linter will not throw an error.

How

The controller validation code has a pre-validation step to retrieve referenced resources. The k8s client calls should be wrapped in an interface that's also implemented by a staticResourceProvider which just pulls the resource from the provided manifest. The controller validation could use the k8s implementation, and the CLI could use the static implementation.


Message from the maintainers:

Impacted by this bug? Give it a 👍. We prioritize the issues with the most 👍.

@crenshaw-dev crenshaw-dev added enhancement New feature or request kubectl-plugin labels Oct 21, 2024
@crenshaw-dev crenshaw-dev changed the title lint command should optionally validate existence of referenced resources. lint command should optionally validate existence of referenced resources Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request kubectl-plugin
Projects
None yet
Development

No branches or pull requests

1 participant