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

feat: Kustomize ignore components - issues/18634 #21674

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

bradkwadsworth
Copy link

@bradkwadsworth bradkwadsworth commented Jan 26, 2025

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 if ignoreMissingComponents is set to true.

Fixes #18634

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Toolchain Guide
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.
  • Optional. My organization is added to USERS.md.
  • Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).

@bradkwadsworth bradkwadsworth requested a review from a team as a code owner January 26, 2025 21:53
Copy link

bunnyshell bot commented Jan 26, 2025

🔴 Preview Environment stopped on Bunnyshell

See: Environment Details | Pipeline Logs

Available commands (reply to this comment):

  • 🔵 /bns:start to start the environment
  • 🚀 /bns:deploy to redeploy the environment
  • /bns:delete to remove the environment

@bradkwadsworth bradkwadsworth force-pushed the feature/ignore-missing-components branch from 8272cf6 to aaf19de Compare January 26, 2025 21:56
Copy link

codecov bot commented Jan 26, 2025

Codecov Report

Attention: Patch coverage is 78.57143% with 6 lines in your changes missing coverage. Please review.

Project coverage is 55.54%. Comparing base (b4a63ae) to head (871338b).

Files with missing lines Patch % Lines
util/kustomize/kustomize.go 78.57% 2 Missing and 1 partial ⚠️
cmd/util/app.go 66.66% 2 Missing ⚠️
cmd/argocd/commands/app.go 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #21674      +/-   ##
==========================================
- Coverage   55.59%   55.54%   -0.06%     
==========================================
  Files         340      340              
  Lines       57419    57445      +26     
==========================================
- Hits        31924    31908      -16     
- Misses      22807    22841      +34     
- Partials     2688     2696       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bradkwadsworth bradkwadsworth requested a review from a team as a code owner January 26, 2025 22:40
@bradkwadsworth bradkwadsworth force-pushed the feature/ignore-missing-components branch from 8975964 to dcbd254 Compare January 29, 2025 14:16
Copy link
Member

@crenshaw-dev crenshaw-dev left a 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?

util/kustomize/kustomize.go Outdated Show resolved Hide resolved
docs/operator-manual/application.yaml Outdated Show resolved Hide resolved
@bradkwadsworth bradkwadsworth force-pushed the feature/ignore-missing-components branch from 2ce7e91 to 73a063d Compare January 30, 2025 15:41
@bradkwadsworth
Copy link
Author

bradkwadsworth commented Jan 30, 2025

I looked in the existing CLI and UI and noticed that neither expose configuring Kustomize Components.

@bradkwadsworth bradkwadsworth force-pushed the feature/ignore-missing-components branch from 73a063d to 0bdc86d Compare January 30, 2025 15:43
@crenshaw-dev
Copy link
Member

@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).

@bradkwadsworth bradkwadsworth force-pushed the feature/ignore-missing-components branch from 3d33d8f to ee1d1b4 Compare January 30, 2025 18:00
@bradkwadsworth
Copy link
Author

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.

@bradkwadsworth bradkwadsworth force-pushed the feature/ignore-missing-components branch from d6f8b09 to 78adaa5 Compare January 30, 2025 22:49
Signed-off-by: Brad Wadsworth <[email protected]>
Signed-off-by: Brad Wadsworth <[email protected]>
Signed-off-by: Brad Wadsworth <[email protected]>
Signed-off-by: Brad Wadsworth <[email protected]>
Signed-off-by: Brad Wadsworth <[email protected]>
@bradkwadsworth bradkwadsworth force-pushed the feature/ignore-missing-components branch from 78adaa5 to 871338b Compare February 3, 2025 04:29
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.

Support optional components/patches in kustomize applications (similar to ignoreMissingValueFiles for helm)
2 participants