feature: use annotation for app name if longer than max len#4123
feature: use annotation for app name if longer than max len#4123darshanime wants to merge 1 commit intoargoproj:masterfrom
Conversation
|
@darshanime Could you update the PR description with the annotation you are proposing ? |
|
any update on this? |
|
@darshanime, please let me know when this is ready to be reviewed. Thank you. |
controller/cache/cache.go
Outdated
There was a problem hiding this comment.
Please see comment in argoproj/gitops-engine#121 (comment)
Instead of using GetAppInstanceIdentifier from gitops engine let's move it into Argo CD repo.
util/kube/kube.go
Outdated
There was a problem hiding this comment.
Annotation is preferable in some other cases, not only when the application name is too long.
Instead of automatically switching to annotation let's introduce an application-level setting that allows switching from label to annotation. I would suggest using the argocd.argoproj.io/annotation-marker annotation . E.g. if application has argocd.argoproj.io/annotation-marker annotation then argocd should make resources with annotation:
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: guestbook
annotations:
# instruct argocd to use annotation instead of label
argocd.argoproj.io/annotation-marker: 'true'
controller/state.go
Outdated
There was a problem hiding this comment.
Please make sure to check for annotation and label in
argo-cd/controller/cache/cache.go
Line 259 in 422a26e
Controller should cache whole resource manifest if either annotation or label present.
Signed-off-by: darshanime <deathbullet@gmail.com>
a1649db to
7ebc94e
Compare
|
hello any updates for this ? |
|
The same changes were implemented by #7251 |
Signed-off-by: darshanime deathbullet@gmail.com
closes #4045
blocked on argoproj/gitops-engine#121
Checklist: