Git Product home page Git Product logo

cronjob-trigger's Introduction

WARNING: Kubeless is no longer actively maintained by VMware.

VMware has made the difficult decision to stop driving this project and therefore we will no longer actively respond to issues or pull requests. If you would like to take over maintaining this project independently from VMware, please let us know so we can add a link to your forked project here.

Thank You.

cronjob-trigger

A Kubeless Trigger represents an event source that a Kubeless function can be associated with it. When an event occurs in the event source, Kubeless will ensure that the associated functions are invoked. CronJob-trigger addon to Kubeless adds support for deploying functions that should be triggered following a certain schedule

Please refer to the documentation on how to use CronJob triggers with Kubeless.

cronjob-trigger's People

Contributors

andresmgot avatar antgamdia avatar delanni avatar dimagoldin avatar gkarthiks avatar jeffreybreen avatar murali-reddy avatar ppbaena avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cronjob-trigger's Issues

CronjobTrigger retry logic appears faulty, doesn't allow for startup

Is this a BUG REPORT or FEATURE REQUEST?: BUG Report

What happened: When a Function and its driving CronJobTrigger are created together, chances are slim that the CronJobTrigger would find the corresponding function. There is supposed to be an exponentially increasing timeout in retrying but it seems that it's not working as intended. After a re-deploy to the CronJobTrigger resource, the function is found.

What you expected to happen: I expected the cronjob-trigger-controller to eventually find the function it should evoke, but it fails to start up.

How to reproduce it (as minimally and precisely as possible): Set up Kubeless. Create a single kubernetes manifest file, or a helm chart that creates a function and a trigger together (real-life usecase is when setting up a cron-task, you'd co-locate the function and it's trigger in the same helm chart, for example). Try installing the chart/manifest. If it worked, try again. <50% chance I'm seeing that it's actually finding the function.

Anything else we need to know?:
I trimmed some irrelevant parts of the logs. I'm getting the impression that the exponential retry logic is not really working as intended, because the logs show that the 5x retries are burnt through within a second (the timestamps are the same).

time="2021-02-23T09:51:04Z" level=info msg="Running Kubeless cronjob trigger controller version: v1.0.3"
time="2021-02-23T09:51:04Z" level=info msg="Starting Cron Job Trigger con...
time="2021-02-23T09:51:04Z" level=info msg="Cronjob Trigger controller cac...
time="2021-02-23T09:51:04Z" level=info msg="Cron Job Trigger controller syn...
time="2021-02-23T10:04:29Z" level=info msg="Processing update to CronJo...
time="2021-02-23T10:04:29Z" level=error msg="Unable to find the function cleanup...
time="2021-02-23T10:04:29Z" level=error msg="Error processing kubeless/cleanup (will retry): ...
time="2021-02-23T10:04:29Z" level=info msg="Processing update to CronJob Trigg...
time="2021-02-23T10:04:29Z" level=error msg="Unable to find the function clea..
time="2021-02-23T10:04:29Z" level=error msg="Error processing kubeless/cleanup (will retry): ...
time="2021-02-23T10:04:29Z" level=info msg="Processing update to CronJo...
time="2021-02-23T10:04:29Z" level=error msg="Unable to find the function cle...
time="2021-02-23T10:04:29Z" level=error msg="Error processing kubeless/cleanup (will retry): ...
...
time="2021-02-23T10:04:29Z" level=error msg="Error processing kubeless/cleanup (will retry): ...
time="2021-02-23T10:04:29Z" level=info msg="Processing update to CronJob Tr...
time="2021-02-23T10:04:29Z" level=error msg="Unable to find the function cleanup...
time="2021-02-23T10:04:29Z" level=error msg="Error processing kubeless/cleanup (will retry): ...
time="2021-02-23T10:04:29Z" level=info msg="Processing update to CronJo...
time="2021-02-23T10:04:29Z" level=error msg="Unable to find the function cleanup...
time="2021-02-23T10:04:29Z" level=error msg="Error processing kubeless/cleanup (giving up): ...
E0223 10:04:29.445826       1 cronjob_trigger_controller.go:186] functions.kubeless.io "cleanup" not found

Environment:

  • Kubernetes version (use kubectl version): v1.18.10
  • Kubeless version (use kubeless version): v1.0.8
  • Cloud provider or physical cluster: AWS Kubernetes

Update go.mod to match Kubeless 1.0.8 release

Is this a BUG REPORT or FEATURE REQUEST?:
Bug Report

What happened:
Received an error when starting cronjob-trigger when installing kubeless via Kubeless 1.0.8 yaml

What you expected to happen:
Kubeless to start correctly when it gets to the cronjob-trigger container

How to reproduce it (as minimally and precisely as possible):
Follow instructions for RBAC Kubeless v1.0.8 install as described here:
https://github.com/kubeless/kubeless/releases/tag/v1.0.8

Anything else we need to know?:
An issue described here by a few users is remedied by modifying the go.mod file to match the Kubeless version:
vmware-archive/kubeless#1152

It's currently set to an older version that causes issues when installing. I'd like to submit a PR to have this match the latest Kubeless release. Perhaps the container should be rebuilt and pushed to match this as well.

Environment:

  • Kubernetes version (use kubectl version): v1.21.5+rke2r1
  • Kubeless version (use kubeless version): 1.0.8
  • Cloud provider or physical cluster: AWS

cronjob isnt able to start - sandbox rpc error

Is this a BUG REPORT or FEATURE REQUEST?:
BUG
What happened:
CronJob pod isnt able to start (99/100 times)
Screenshot from 2019-06-25 13-14-51

What you expected to happen:
CronJob pod starting correctly and performing curl to the correct function
How to reproduce it (as minimally and precisely as possible):
kubeless version v1.0.3
k8s version 1.12.5
provider: aks
create cronjob trigger

Anything else we need to know?:

Environment:

  • Kubernetes version (use kubectl version): v1.12.5
  • Kubeless version (use kubeless version): v1.0.3
  • Cloud provider or physical cluster: azure aks

Can't create multiple triggers for the same function

๐Ÿ˜ฐ Describe the bug

At this line our controller is manually creating the job name based on the function name. Because of that, it is impossible to deploy multiple triggers for the same function (which is a use case that my company needs).

๐Ÿง How to reproduce

Steps to reproduce the behavior:

  1. Deploy a simple Kubeless function.
  2. Add a new CronJobTrigger to it.
  3. Try adding a new trigger to the same funciton.
  4. Check the controller logs:
time="2020-05-14T16:23:12Z" level=error msg="Error processing <namespace>/<your-cronjob-trigger-name> (giving up): Found a conflicting cronjob object <namespace>/<your-function-name>. Aborting" controller=cronjob-trigger-controller
E0514 16:23:12.202265       1 cronjob_trigger_controller.go:186] Found a conflicting cronjob object <namespace>/<your-function-name>. Aborting

๐ŸŽ‰ Expected behavior

Since we're already proving a unique name to the CronJobTrigger resource, we should use that name instead.

Trigger pod initialization fails

Is this a BUG REPORT or FEATURE REQUEST?:
Both
What happened:
I have "quota restriction" in my namespace and I deployed a kubeless function using the --cpu and --memory flag. But the resources spec are not getting passed to trigger pods ie., CronJobs are not deployed with the resources. Because of that the trigger pods are not getting created.

What you expected to happen:
A minimum resources object should be assigned to the cronjob to get pass through the quota restrictions.

How to reproduce it (as minimally and precisely as possible):

  • Deploy a ResourceQuota to a namespace with both requests and limits set as hard.
  • Deploy a function to that namespace using kubeless function deploy command with --cpu and --memory flag as a schedule trigger.

Anything else we need to know?:
Created from vmware-archive/kubeless#960 (comment)

Environment:
Kubernetes version (use kubectl version): 1.9
Kubeless version (use kubeless version): 0.5
Cloud provider or physical cluster: OpenShift 3.9

CronTrigger is not Calling the Function

Is this a BUG REPORT or FEATURE REQUEST?:
Question
What happened:
Crontab is not triggering my function
What you expected to happen:
Trigger my function
How to reproduce it (as minimally and precisely as possible):
deploy a function:
kubeless function deploy emaildbnlp --runtime python3.6 --handler email_import_dbdump.email_download --from-file email_import_dbdump.py --dependencies requirements.txt --timeout 300 -n prod --env key:value

then Create the trigger

kubeless trigger cronjob create 'emailjobdbnlpcron' --function emaildbnlp --schedule '*/5 * * * *' -n prod

Anything else we need to know?:

The trigger is executing but not calling the the functions that was deployed. What am I not doing correctly?

Environment:

  • Kubernetes version (use kubectl version):
    Client Version: version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.2", GitCommit:"17c77c7898218073f14c8d573582e8d2313dc740", GitTreeState:"clean", BuildDate:"2018-10-24T06:54:59Z", GoVersion:"go1.10.4", Compiler:"gc", Platform:"linux/amd64"}
    Server Version: version.Info{Major:"1", Minor:"11+", GitVersion:"v1.11.8-eks-7c34c0", GitCommit:"7c34c0d2f2d0f11f397d55a46945193a0e22d8f3", GitTreeState:"clean", BuildDate:"2019-03-01T22:49:39Z", GoVersion:"go1.10.8", Compiler:"gc", Platform:"linux/amd64"}

  • Kubeless version (use kubeless version):
    Kubeless version: v1.0.2

  • Cloud provider or physical cluster:
    AWS EKS

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.