Git Product home page Git Product logo

Comments (6)

agaudreault avatar agaudreault commented on August 28, 2024

@rhyswilliamsza Take a look at the UI code. I think you can leverage the isAppOfAppsPattern property from

isAppOfAppsPattern?: boolean;
and it might just requires change to the UI assets. To find the parent, I think using the ownerReference might be more accurate than the tracking annotations. If I am not mistaken, the ownerReference will be set to the parent App.

from argo-cd.

rhyswilliamsza avatar rhyswilliamsza commented on August 28, 2024

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.

agaudreault avatar agaudreault commented on August 28, 2024

Ahhh that's true, app of apps won't set any owners reference field.

from argo-cd.

rhyswilliamsza avatar rhyswilliamsza commented on August 28, 2024

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

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.

agaudreault avatar agaudreault commented on August 28, 2024

@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.

rhyswilliamsza avatar rhyswilliamsza commented on August 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.