GithubHelp home page GithubHelp logo

Comments (7)

evankanderson avatar evankanderson commented on July 19, 2024

If you want to do this, it should be as simple as setting metadata.ownerReference on the Revisions pointing to the Archetype.

We should think about whether we want to do this (and if so, how), since some of the referenced revisions might still be referenced by a Service. Perhaps the Service should also set metadata.ownerReference on the Revision when it starts directing traffic to that Revision (and unset it when it stops sending traffic to the Revision)? If so, that might provide a handy way for the UI to track back-references to Services from the Revision (which was a UX request).

@qelo @jurekPapiorek for the UX suggestion.

from serving.

jurekPapiorek avatar jurekPapiorek commented on July 19, 2024

+1 to the cascading delete of Revisions by RevisionTemplate. When a Service still references one of the Revisions, the delete operation should fail. Will setting metadata.ownerReference on the Revision by the Service have this consequence?

from serving.

xoebus avatar xoebus commented on July 19, 2024

I've got a prototype of this at #115.

The relationship between revision template and revision is working such that when the template is deleted the revisions are also removed. I experimented with adding a link between services and revisions too but I can't get it to work due to:

  1. Only one controller is allowed to be the owner of a resource. If I make both the service and the revision controller owners then I get this error.

  2. There doesn't seem to be a way to error if you still have dependent children. This document only mentions variations of cascading deletes and orphaning.

Both of these might be because I'm new to development against the Kubernetes API. Does anyone know if there's a way around them?

from serving.

xoebus avatar xoebus commented on July 19, 2024

Setting Controller to false on the OwnerReference allows two owners and will cause revisions to not be deleted if they're routable from a Route. I'm looking into the webhook validations to see whether or not we can stop the deletion with an error there.

from serving.

xoebus avatar xoebus commented on July 19, 2024

I need to step back and work on something else for a while but I don't have permission to un-assign myself from this issue. This should be considered unassigned if anyone else wants to pick it up.

from serving.

mattmoor avatar mattmoor commented on July 19, 2024

thanks for your help @xoebus :)

from serving.

mattmoor avatar mattmoor commented on July 19, 2024

I think that given the 1:N relationships we've landed on, that what we have in place now is adequate for this.

from serving.

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.