-
Notifications
You must be signed in to change notification settings - Fork 167
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(api): add endpoints to get AnalysisTemplate config resources #2480
Conversation
This commit adds endpoints to get env resources - ConfigMap and Secret - which can be used in the AnalysisTemplate, to allow users to manage those resources in the Kargo UI. Signed-off-by: Sunghoon Kang <hoon@akuity.io>
✅ Deploy Preview for docs-kargo-akuity-io canceled.
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2480 +/- ##
==========================================
+ Coverage 48.27% 48.32% +0.04%
==========================================
Files 246 254 +8
Lines 17739 18133 +394
==========================================
+ Hits 8564 8762 +198
- Misses 8749 8889 +140
- Partials 426 482 +56 ☔ View full report in Codecov by Sentry. |
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.
LGTM
What about just calling the annotation |
The other option I can think of, as it's theoretically not just the UI, is to call it |
Talked this through some more offline, and the worry with a Given this, and with an eye on the future, I propose looking for a generic label name with a special categorized value, e.g., |
#2480 (comment) Signed-off-by: Sunghoon Kang <hoon@akuity.io>
If we have generic label name and using categorized value, couldn’t we leverage the Kubernetes’s label selector? For example, |
Yes, you can use a label selector, which we have already been doing for credential secrets (and what is being practiced in this PR). However, this does not work when getting a specific object, which requires additional verification. |
#2480 (comment) Signed-off-by: Sunghoon Kang <hoon@akuity.io>
This commit adds endpoints to get env resources -
ConfigMap
andSecret
- which can be used in the AnalysisTemplate, to allow users to manage those resources in the Kargo UI. TheConfigMap
andSecret
must be labeled withkargo.akuity.io/analysis-env: "true"
to be returned in API.Note
Create/Update/DeleteResource
API to manageConfigMap
andSecret
, same as theAnalysisTemplate
(cc @gdsoumya)Open Questions
kargo.akuity.io/analysis-env
key naming, could anyone give other suggestions?