Skip to content

Commit

Permalink
fix cron jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
yacut committed Feb 27, 2021
1 parent 0cb161a commit 2e60ff8
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v1.2.4 / 2021-02-27

- [FIX] Fix cron jobs

## v1.2.3 / 2021-02-27

- [FIX] Fix watcher logging
Expand Down
2 changes: 1 addition & 1 deletion example/standard/30-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
serviceAccountName: ilert-kube-agent
containers:
- name: ilert-kube-agent
image: "ilert/ilert-kube-agent:v1.2.1"
image: "ilert/ilert-kube-agent:v1.2.4"
imagePullPolicy: Always
env:
- name: NAMESPACE
Expand Down
2 changes: 1 addition & 1 deletion pkg/watcher/node_checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var nodeCheckerCron *cron.Cron

func startNodeChecker(kubeClient *kubernetes.Clientset, metricsClient *metrics.Clientset, agentKubeClient *agentclientset.Clientset, cfg *config.Config) {
nodeCheckerCron = cron.New()
nodeCheckerCron.AddFunc(cfg.Settings.CheckInterval, func() {
nodeCheckerCron.AddFunc(fmt.Sprintf("@every %s", cfg.Settings.CheckInterval), func() {
checkNodes(kubeClient, metricsClient, agentKubeClient, cfg)
})

Expand Down
2 changes: 1 addition & 1 deletion pkg/watcher/pod_checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var podCheckerCron *cron.Cron

func startPodChecker(kubeClient *kubernetes.Clientset, metricsClient *metrics.Clientset, agentKubeClient *agentclientset.Clientset, cfg *config.Config) {
podCheckerCron = cron.New()
podCheckerCron.AddFunc(cfg.Settings.CheckInterval, func() {
podCheckerCron.AddFunc(fmt.Sprintf("@every %s", cfg.Settings.CheckInterval), func() {
checkPods(kubeClient, metricsClient, agentKubeClient, cfg)
})

Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package shared

// Version current version
const Version = "v1.2.3"
const Version = "v1.2.4"

// App name
const App = "ilert-kube-agent"

0 comments on commit 2e60ff8

Please sign in to comment.