Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic when only using the finalize hook in decorator #948

Open
Shashankft9 opened this issue Feb 23, 2024 · 2 comments
Open

Panic when only using the finalize hook in decorator #948

Shashankft9 opened this issue Feb 23, 2024 · 2 comments
Labels
needs additional user input Additional user input is needed to resolve this

Comments

@Shashankft9
Copy link

I have a usecase where i want to a hook to be called only when the resource is being deleted, with the assumption that nothing has to be done for create/update operations.

So, if i mention only the finalize hook, I see a runtime panic error in the logs of metacontroller:

image

Decorator looks something like this:

apiVersion: metacontroller.k8s.io/v1alpha1
kind: DecoratorController
metadata:
  name: call-removal-api
spec:
  hooks:
    finalize:
      version: v1
      webhook:
        url: http://call-removal-api.metacontroller.svc.cluster.local?type=delete    
  resources:
  - apiVersion: helm.toolkit.fluxcd.io/v2beta1
    resource: helmreleases

Should this be a supported use case in metacontroller?

@grzesuav
Copy link
Contributor

@Shashankft9 which version do you use ? I remember it was reported already, and I was under impression it is fixed already

@grzesuav grzesuav added the needs additional user input Additional user input is needed to resolve this label Mar 26, 2024
@Shashankft9
Copy link
Author

hey @grzesuav, I am using version 4.10.0, let me try the latest version and see if this feature is there - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs additional user input Additional user input is needed to resolve this
Projects
None yet
Development

No branches or pull requests

2 participants