Comments (6)
@rhyswilliamsza Take a look at the UI code. I think you can leverage the isAppOfAppsPattern
property from
argo-cd/ui/src/app/shared/models.ts
Line 143 in fe9aa54
from argo-cd.
Thanks, @agaudreault!
I think you can leverage the isAppOfAppsPattern property from
Unfortunately when I looked this didn't appear to be set for an application on the application details page, but I'll look into implementing it for this context, too 🦾
I think using the ownerReference might be more accurate
100%, I actually didn't even know this existed. I'll take a stab and make a PR if all goes to plan :)
edit: hmm, looks like ownerReference
may only be attached if ApplicationSets are in use. I'll see what I can do here. I'd much rather use a more opinionated field than a label/annotation if I can, so this is a good path to follow - thanks!
from argo-cd.
Ahhh that's true, app of apps won't set any owners reference field.
from argo-cd.
Hi @agaudreault
Do you perhaps have any guidance for me on the use of cross-namespace owners references by applications? After having a bit of a look, attaching cross-namespace owner refs seems to move against the K8s pattern (though this seems to already be happening in applicationset cases). The main limitation is due to the prohibition of cross-namespace depedencies.
![image](https://private-user-images.githubusercontent.com/14295288/354269533-a4cad0e0-9902-4e28-bab1-7c32c2e8d396.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM4ODUzMDQsIm5iZiI6MTcyMzg4NTAwNCwicGF0aCI6Ii8xNDI5NTI4OC8zNTQyNjk1MzMtYTRjYWQwZTAtOTkwMi00ZTI4LWJhYjEtN2MzMmMyZThkMzk2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE3VDA4NTY0NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQ3YzY5Yzk2OTMxZWUzMmYxZDZlM2VlYjJiMTE0ZDBlMTkzZDM3NGFiZjkxZWY2MGZjYWY4ZTdjMGIxNjdmMzkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.KguC5ddQJhA9Xe5M3-Z0dyRot1Bz4gwxyWOsgesG_2I)
Was the decision made to ignore this limitation in the context of ArgoCD? I think the main point of concern would be when two applications, with the same name, exist in different namespaces. The owner ref pattern should be able to distinguish due to the different UID, however how would ArgoCD determine the correct parent in its current form?
from argo-cd.
@rhyswilliamsza as you said previously, ownerReference is only used when the Applications are managed from an ApplciationSet. Argo does not Set ownerReference when an Application "syncs" another resource of kind Application. In that case, the tracking method is used.
Since the tracking is something server-side, I think the UI will have no choice but to receive an object/model from the server with a property that indicates the parent application/reference, based on the tracking method.
Maybe it would be possible to use ownerReference as a new tracking method, but there a probably a lot of limitations and it is a much larger change. You could create a new issue/discussion for this question specifically.
from argo-cd.
Thanks for the quick feedback! I understand, thanks for the clarification. For now, let me go down the route of attaching additional context via a dedicated property 👍
from argo-cd.
Related Issues (20)
- argocd app diff fails to render when templating CRDs
- Support prompt for certain argocd cmd commands
- ApplicationSet rolling sync stuck in ArgoCD 2.12
- UI error: Cannot read properties of null (reading 'appsInAnyNamespaceEnabled') HOT 1
- OpenKruise Daemonset sync blocked by healthy check HOT 1
- PR got check failed and blocked by License Compliance check HOT 3
- Expose info about the argocd instnace in the clusters/namespaces it manages
- "ghost" env var HOT 2
- Add additional websocket tests HOT 1
- Unhandled UI error when signing in with OIDC and there are not enough Redis replicas to write (NOREPLICAS)
- feat: Add support for codespace devcontainer HOT 2
- Expose healthcheck endpoint on ArgoCD ApplicationSet Controller for GKE Ingress
- Deleted pod still appears in Web UI as "pending deletion" stage HOT 1
- New metrics required for the argocd-repo-server
- Argocd Application does not pick the changes in its own annotations/labels and sync options. HOT 3
- ProgressiveSync updates are not working as expected
- Support a label selector for application controller HOT 1
- Application delete stuck because post-delete "/cleanup" finalizer is not removed when cluster is invalid.
- feat: Support service account token for argocd server authentication HOT 16
- tini-static binary is vulnerable to a bunch of CVEs HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from argo-cd.