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

Cronjob trigger pods are not removed after completing #195

Open
remacr opened this issue Nov 12, 2019 · 4 comments
Open

Cronjob trigger pods are not removed after completing #195

remacr opened this issue Nov 12, 2019 · 4 comments

Comments

@remacr
Copy link
Contributor

remacr commented Nov 12, 2019

BUG REPORT

What happened:
The pods created with the scheduled functions are not being removed after completing them. We can see the pods being piled every time it hits the schedule.

Screen Shot 2019-11-12 at 3 22 24 PM

What you expected to happen:
The pods to be removed or to reuse the same pod and just running again.

Environment:

  • Kubernetes version:
Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.3", GitCommit:"5e53fd6bc17c0dec8434817e69b04a25d8ae0ff0", GitTreeState:"clean", BuildDate:"2019-06-06T01:36:19Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.3", GitCommit:"5e53fd6bc17c0dec8434817e69b04a25d8ae0ff0", GitTreeState:"clean", BuildDate:"2019-06-06T01:36:19Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}
  • Kubeless version: 1.0.4
  • Cloud provider or physical cluster: physical cluster
@andresmgot
Copy link
Contributor

Hi @raul-madrigal,

That's the default successfulJobsHistoryLimit: 3 set by Kubernetes for CronJobs but it's true that it's not configurable at this moment.

@remacr
Copy link
Contributor Author

remacr commented Nov 13, 2019

Hi @andresmgot,

Can you guide me somehow? , I would like to help to get this done because I currently have this issue happening and I'm fixing it running a separate script to clean up the completed pods.

@andresmgot
Copy link
Contributor

Just to confirm, you are seeing 3 completed jobs per scheduled function, right?

Unfortunately, this is not something that can be implemented in the client side (so I am not sure is worth working on). If you want to implement it, you need to change it in the CronJobTrigger controller:

https://github.com/kubeless/cronjob-trigger/blob/master/pkg/apis/kubeless/v1beta1/cronjob_trigger.go#L34

Release a new version of the trigger controller and then change the client here.

@remacr
Copy link
Contributor Author

remacr commented Nov 13, 2019

Yes, I'm seeing 3 jobs scheduled per function marked as completed.

Thanks, I'll take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants