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: Supported set metadata annotations with argocd-util app generate-spec command #6633

Merged
merged 6 commits into from
Jul 6, 2021
Merged

feat: Supported set metadata annotations with argocd-util app generate-spec command #6633

merged 6 commits into from
Jul 6, 2021

Conversation

takumakume
Copy link
Contributor

@takumakume takumakume commented Jul 3, 2021

Hello!

Added support for set metadata annotations with the argocd-util app generate-spec command.
My use case is to generate Annotations for use with the ArgoCD Image Updater.

Note on DCO:

If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.

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).
  • 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.
  • Optional. My organization is added to USERS.md.
  • 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).

…e-spec` command

Signed-off-by: takumakume <takuma.kume@pepabo.com>
… command

Signed-off-by: takumakume <takuma.kume@pepabo.com>
@codecov
Copy link

codecov bot commented Jul 5, 2021

Codecov Report

Merging #6633 (eec0247) into master (7149e35) will increase coverage by 0.00%.
The diff coverage is 35.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #6633   +/-   ##
=======================================
  Coverage   41.29%   41.30%           
=======================================
  Files         156      156           
  Lines       20688    20701   +13     
=======================================
+ Hits         8543     8550    +7     
- Misses      10937    10943    +6     
  Partials     1208     1208           
Impacted Files Coverage Δ
cmd/argocd-util/commands/app.go 31.30% <0.00%> (-0.28%) ⬇️
cmd/argocd/commands/app.go 0.00% <0.00%> (ø)
cmd/util/app.go 36.87% <77.77%> (+1.05%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7149e35...eec0247. Read the comment docs.

Copy link
Member

@jannfis jannfis left a comment

Choose a reason for hiding this comment

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

Thanks @takumakume for this PR. I agree that this would be useful.

However, I think the command line option should be moved to a different part in the code. AddAppFlags() sets flags for the .spec part of the Application resource, not for its .metadata section.

I think the right place - despite some redundancy - would be here and here

@jannfis jannfis self-assigned this Jul 5, 2021
…e it to the appropriate place

Signed-off-by: takumakume <takuma.kume@pepabo.com>
Signed-off-by: takumakume <takuma.kume@pepabo.com>
@takumakume
Copy link
Contributor Author

@jannfis Thank you for the review!
That's right.
I removed this option from AddAppFlags() and changed it to the location indicated.

Signed-off-by: takumakume <takuma.kume@pepabo.com>
Signed-off-by: takumakume <takuma.kume@pepabo.com>
@takumakume
Copy link
Contributor Author

Copy link
Member

@jannfis jannfis left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@jannfis jannfis merged commit ef7ee08 into argoproj:master Jul 6, 2021
@takumakume takumakume deleted the util-gen-spec-support-annotations branch July 6, 2021 11:14
@jannfis jannfis added the needs-verification PR requires pre-release verification label Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-verification PR requires pre-release verification
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants