vmware-archive / kafka-trigger

Kubernetes CRD controller for Kafka topic as event source for Kubeless functions
Apache License 2.0
28 stars 34 forks source link

updating kafkatrigger resource does not delete old trigger #20

Open yvz5 opened 4 years ago

yvz5 commented 4 years ago

When I create a kafka trigger from a yaml file like so:

apiVersion: kubeless.io/v1beta1
kind: KafkaTrigger
metadata:  
  labels:
    created-by: kubeless
  name: python-demo-trigger
  namespace: kubeless
spec:
  functionSelector:
    matchLabels:
      created-by: kubeless
      function: python-demo
  topic: python-demo # subscribes to this kafka topic

and change the topic, the function is run even if the old topic is triggered.

I have a chain of events and I would like to add / remove functions inside the chain. If the old relation / connection between topic and function remains the same, now my function is run twice, which is not wanted.

Do you delete the old topic - function relation when the trigger is updated ?