Giter Club home page Giter Club logo

Comments (5)

jpkrohling avatar jpkrohling commented on June 14, 2024 2

This would allow deletion of the resource, but would leave the cleanup of the underlying resources to the user, including removing finalizers when applicable

Not sure we do anything at all in our code. When a CR is deleted, all the resources that are owned by this CR are deleted automatically. In our reconciliation function, we'll see the delete event but won't find the CR, in which case we'll just return. So, I think your idea would work nicely.

if err := r.Get(ctx, req.NamespacedName, &instance); err != nil {
if !apierrors.IsNotFound(err) {
log.Error(err, "unable to fetch OpenTelemetryCollector")
}
// we'll ignore not-found errors, since they can't be fixed by an immediate
// requeue (we'll need to wait for a new notification), and we can get them
// on deleted requests.
return ctrl.Result{}, client.IgnoreNotFound(err)
}

from opentelemetry-operator.

gramidt avatar gramidt commented on June 14, 2024 1

Great! This will be straightforward to implement then, @jpkrohling. This is now in my backlog to tackle.

from opentelemetry-operator.

jpkrohling avatar jpkrohling commented on June 14, 2024 1

Go ahead! Can you please double-check the kubebuilder docs to see if they have a recommendation about this? What we have right now is following what was bootstrapped by kubebuilder when I first bootstrapped this operator, and things might have changed since then.

from opentelemetry-operator.

gramidt avatar gramidt commented on June 14, 2024

@jpkrohling - One potential thought is to split the "validating-webhook-configuration" into two validating webhooks. The second one would be for the "DELETE" and would have failurePolicy: Ignore. This would allow deletion of the resource, but would leave the cleanup of the underlying resources to the user, including removing finalizers when applicable. Thoughts?

from opentelemetry-operator.

VineethReddy02 avatar VineethReddy02 commented on June 14, 2024

@jpkrohling I can work on this!

from opentelemetry-operator.

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.