Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
proposal: Change application identifier to allow app names longer than 63 chars #6425
proposal: Change application identifier to allow app names longer than 63 chars #6425
Changes from all commits
e1b3c99
02372f9
9a7ae62
1959766
99076af
1fa7b42
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
How would Argo CD know whether a resource's
app.kubernetes.io/instance
was applied using the old system or the new system (the one described in this proposal)?For example:
app.kubernetes.io/instance
fields of the existing resources, discovers that they don't match any expected hash (and thus don't belong to any Application), and ignores them (recreating new Application resources).I think we need the ability to look at the
app.kubernetes.io/instance
field of a resource and know which system it was created with.One option we could use is look at the
app.kubernetes.io/instance
value and determine if it is a 32 character hexadecimal value, but this is not foolproof (users may be using Applications with names that are 32-byte hexadecimal values).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.
That's a good point you raise there.
I haven't yet verified, but I think it would be similar to the behavior if you rename an application, e.g. by deleting an
Application
and re-creating it with a different name, but same parameters (source + destination).Argo CD would just go and overwrite what's in
app.kubernetes.io/instance
- at least as long as another application with the previous name does not exist, in which case Argo CD would issue a Shared Resource Warning and prevent the overwrite.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.
I think if an Argo CD instance encounters a resource with a
app.kubernetes.io/instance
value that it doesn't recognize (eg it does not correspond to a hash of a knownapplication name+install id
value), then Argo CD must assume that that resource is owned by another Argo CD instance (the goal of 'allow multiple Argo CD instances to manage resources on the same cluster').So, presuming that Argo CD encounters a resource it thinks is owned by someone else, and it has the same name/namespace as a resouce managed by an
Application
managed by the current Argo CD instance, do we:Probably 2), and report an error ('error: Argo CD Application would overwrite a resource that may be owned by another Argo CD instance').
It might be worthwhile to document the algorithm that Argo CD will use to move existing resources from the old style to the new style, in the upgrade scenario.
I'm guessing it would be:
app.kubernetes.io/instance
that is not a 32/64 character hexadecimal value, AND it matches the name field of an existing Argo CD Application, then convert it to the new system (ensure theapp.kubernetes.io/instance
field is updated)app.kubernetes.io/instance
that is a 32/64 character hexadecimal value, leave it alone. (Assume it's a valid instance id from another Argo CD instance).(in very rare cases this might orphan or delete old resources, but it's probably fine.)