Git Product home page Git Product logo

Comments (1)

raffaelespazzoli avatar raffaelespazzoli commented on September 17, 2024 1

@seanmalloy I'm answering here.
The way I solve this problem in the namespace-configuration-operator is the following:

  1. all created objects are labeled with a marker that allows to recognize to which gitopsconfig they belong.
  2. using the discovery client one can find all the defined resource type
  3. for each resource type use the dynamic client to see if there are instances with a given label
  4. execute a left outer join between the result of 3 and the current set of object requested by gitopsconfig.
  5. delete the objects resulting at 4

this can probably be scripted in bash, but it would probably be ugly. So you might want to consider writing this piece with a small go utility.
For example this one: https://github.com/yanc0/untrak is pretty close to what you need.

from eunomia.

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.