-
Notifications
You must be signed in to change notification settings - Fork 6.4k
feat: Kustomize ignore missing components (#18634) #21674
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
feat: Kustomize ignore missing components (#18634) #21674
Conversation
❌ Preview Environment deleted from BunnyshellAvailable commands (reply to this comment):
|
8272cf6
to
aaf19de
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #21674 +/- ##
==========================================
+ Coverage 55.63% 55.65% +0.01%
==========================================
Files 339 339
Lines 56812 56838 +26
==========================================
+ Hits 31609 31632 +23
- Misses 22553 22562 +9
+ Partials 2650 2644 -6 ☔ View full report in Codecov by Sentry. |
8975964
to
dcbd254
Compare
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.
Thanks for the PR! Could you look into adding CLI and UI support for the new flag as part of this PR?
2ce7e91
to
73a063d
Compare
I looked in the existing CLI and UI and noticed that neither expose configuring Kustomize Components. |
73a063d
to
0bdc86d
Compare
@bradkwadsworth I think it probably still makes sense to expose the flag. Maybe not via the UI, but at least via the CLI. I think the code could be modeled off the Helm ignore missing values file equivalent field (assuming that has CLI/UI support, which it might not). |
3d33d8f
to
ee1d1b4
Compare
I was able to update the CLI, but couldn't find any references for something similar with the helm values files in the web UI. Updated some docs as well. |
d6f8b09
to
78adaa5
Compare
78adaa5
to
871338b
Compare
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.
Code lgtm! One last docs request: can you add a note about the feature here - https://argo-cd.readthedocs.io/en/stable/user-guide/kustomize/#components
I believe I did here https://github.com/argoproj/argo-cd/pull/21674/files#. Is there a doc generation command that I should run? |
871338b
to
8a74108
Compare
I just did a rebase and re-ran codegen so I think the docs may have been generated now. |
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.
One last request, then lgtm. :-)
Sorry to keep moving the goalposts. 😆 You've been super responsive, which helps me feel a bit better asking for last tweaks. |
exist Signed-off-by: Brad Wadsworth <wadsworth.brad@gmail.com>
Signed-off-by: Brad Wadsworth <wadsworth.brad@gmail.com>
Signed-off-by: Brad Wadsworth <wadsworth.brad@gmail.com>
Signed-off-by: Brad Wadsworth <wadsworth.brad@gmail.com>
Signed-off-by: Brad Wadsworth <wadsworth.brad@gmail.com>
Signed-off-by: Brad Wadsworth <wadsworth.brad@gmail.com>
Signed-off-by: Brad Wadsworth <wadsworth.brad@gmail.com>
5f1e494
to
7ce8e9c
Compare
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.
🚀
…21674) Signed-off-by: Brad Wadsworth <wadsworth.brad@gmail.com>
…21674) Signed-off-by: Brad Wadsworth <wadsworth.brad@gmail.com>
With argoproj#21674 the ability to ignore Kustomize component directories if they do not exist got introduced. This generally works fine, but the `securejoin` check is a bit too strict - we want to ensure that no-one can break out of the repo, but the current implementation doesn't allow for breaking outside the kustomization folder. This breaks the usage of this feature when using it for a monorepo. This PR loosens the check to allow for traversals up to the repo root. We use the new `os.Root` functionality to ensure that users can't break outside the repo. Path traversals are still relative from the kustomize repo. Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
With argoproj#21674 the ability to ignore Kustomize component directories if they do not exist got introduced. This generally works fine, but the `securejoin` check is a bit too strict - we want to ensure that no-one can break out of the repo, but the current implementation doesn't allow for breaking outside the kustomization folder. This breaks the usage of this feature when using it for a monorepo. This PR loosens the check to allow for traversals up to the repo root. We use the new `os.Root` functionality to ensure that users can't break outside the repo. Path traversals are still relative from the kustomize repo. Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
With argoproj#21674 the ability to ignore Kustomize component directories if they do not exist got introduced. This generally works fine, but the `securejoin` check is a bit too strict - we want to ensure that no-one can break out of the repo, but the current implementation doesn't allow for breaking outside the kustomization folder. This breaks the usage of this feature when using it for a monorepo. This PR loosens the check to allow for traversals up to the repo root. We use the new `os.Root` functionality to ensure that users can't break outside the repo. Path traversals are still relative from the kustomize repo. Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Following argoproj#21674 which allowed ignoring components and argoproj#23486 which allowed having components specified in a monorepo, this allows specifying components by reference the same way that helm values files can be specified. This is useful for people that store components in branches or are doing testing by using branches against the main application components. Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
) This is an implmentation of argoproj#23873. Following argoproj#21674 which allowed ignoring components and argoproj#23486 which allowed having components specified in a monorepo, this allows specifying components by reference the same way that helm values files can be specified. Today kustomize supports having URL references to components but ArgoCD has no concept of this and does not detect that the component might have changed. Using the reference form ArgoCD is aware of the changes to components and can re-run any sync that is configured. This is useful for people that store components in branches or are doing testing by using branches against the main application components. Fixes argoproj#23872 Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
) This is an implmentation of argoproj#23873. Following argoproj#21674 which allowed ignoring components and argoproj#23486 which allowed having components specified in a monorepo, this allows specifying components by reference the same way that helm values files can be specified. Today kustomize supports having URL references to components but ArgoCD has no concept of this and does not detect that the component might have changed. Using the reference form ArgoCD is aware of the changes to components and can re-run any sync that is configured. This is useful for people that store components in branches or are doing testing by using branches against the main application components. Fixes argoproj#23872 Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
) This is an implmentation of argoproj#23873. Following argoproj#21674 which allowed ignoring components and argoproj#23486 which allowed having components specified in a monorepo, this allows specifying components by reference the same way that helm values files can be specified. Today kustomize supports having URL references to components but ArgoCD has no concept of this and does not detect that the component might have changed. Using the reference form ArgoCD is aware of the changes to components and can re-run any sync that is configured. This is useful for people that store components in branches or are doing testing by using branches against the main application components. Fixes argoproj#23872 Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
) This is an implmentation of argoproj#23873. Following argoproj#21674 which allowed ignoring components and argoproj#23486 which allowed having components specified in a monorepo, this allows specifying components by reference the same way that helm values files can be specified. Today kustomize supports having URL references to components but ArgoCD has no concept of this and does not detect that the component might have changed. Using the reference form ArgoCD is aware of the changes to components and can re-run any sync that is configured. This is useful for people that store components in branches or are doing testing by using branches against the main application components. Fixes argoproj#23872 Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Added ability to ignore Kustomize component directory if it does not exist. A new field called
ignoreMissingComponents
, if enabled, will verify if a given components directory exists and if not will log a debug message. Only found component directories will be used ifignoreMissingComponents
is set to true.Fixes #18634
Checklist: