I'm running on AWS EKS cluster v1.25.
The sleepcycles were installed on the cluster and the label were configured on one of the deployments.
1.70249953358739e+09 INFO controller-runtime.metrics Metrics server is starting to listen {"addr": "127.0.0.1:8080"}
1.7024995335878196e+09 INFO setup starting manager
1.7024995335883129e+09 INFO Starting server {"kind": "health probe", "addr": "[::]:8081"}
1.7024995335883129e+09 INFO Starting server {"path": "/metrics", "kind": "metrics", "addr": "127.0.0.1:8080"}
I1213 20:32:13.588770 1 leaderelection.go:248] attempting to acquire leader lease sleepcycles-system/04cbe4c0.rekuberate.io...
I1213 20:32:30.242666 1 leaderelection.go:258] successfully acquired lease sleepcycles-system/04cbe4c0.rekuberate.io
1.702499550243052e+09 DEBUG events Normal {"object": {"kind":"Lease","namespace":"sleepcycles-system","name":"04cbe4c0.rekuberate.io","uid":"294d077b-9dfd-4795-8120-99bddec3cd2b","apiVersion":"coordination.k8s.io/v1","resourceVersion":"852177480"}, "reason": "LeaderElection", "message": "sleepcycles-controller-manager-bf6c64857-j5k8d_808b4e88-ba76-4555-b558-8d7b48640b11 became leader"}
1.7024995502432828e+09 INFO Starting EventSource {"controller": "sleepcycle", "controllerGroup": "core.rekuberate.io", "controllerKind": "SleepCycle", "source": "kind source: *v1alpha1.SleepCycle"}
1.7024995502433164e+09 INFO Starting Controller {"controller": "sleepcycle", "controllerGroup": "core.rekuberate.io", "controllerKind": "SleepCycle"}
1.7024995503444824e+09 INFO Starting workers {"controller": "sleepcycle", "controllerGroup": "core.rekuberate.io", "controllerKind": "SleepCycle", "worker count": 1}
1.7024995505854793e+09 INFO ๐ Processing Deployments {"namespace": "es-digital-journeys", "sleepcycle": "sleepcycle-sample1", "op": "Shutdown"}
1.7024995508859751e+09 INFO ๐ Processing CronJobs {"namespace": "es-digital-journeys", "sleepcycle": "sleepcycle-sample1", "op": "Shutdown"}
1.7024995509862914e+09 INFO ๐ฆ Processing StatefulSets {"namespace": "es-digital-journeys", "sleepcycle": "sleepcycle-sample1", "op": "Shutdown"}
1.7024995510869236e+09 INFO ๐ Processing HorizontalPodAutoscalers {"namespace": "es-digital-journeys", "sleepcycle": "sleepcycle-sample1", "op": "Shutdown"}
1.7024995510988872e+09 INFO ๐ Requeue {"namespace": "es-digital-journeys", "sleepcycle": "sleepcycle-sample1", "op": "Shutdown", "next-op": "Shutdown", "after": "28.901116474s"}
1.7024995511085997e+09 INFO ๐ Requeue {"namespace": "es-digital-journeys", "sleepcycle": "sleepcycle-sample1", "op": "Shutdown", "next-op": "Shutdown", "after": "28.891404078s"}
1.7024995800032704e+09 INFO ๐ Processing Deployments {"namespace": "es-digital-journeys", "sleepcycle": "sleepcycle-sample1", "op": "Shutdown"}
1.7024995800034337e+09 INFO ๐ Processing CronJobs {"namespace": "es-digital-journeys", "sleepcycle": "sleepcycle-sample1", "op": "Shutdown"}
1.7024995800034702e+09 INFO ๐ฆ Processing StatefulSets {"namespace": "es-digital-journeys", "sleepcycle": "sleepcycle-sample1", "op": "Shutdown"}
1.702499580003513e+09 INFO ๐ Processing HorizontalPodAutoscalers {"namespace": "es-digital-journeys", "sleepcycle": "sleepcycle-sample1", "op": "Shutdown"}
1.7024995800151165e+09 INFO ๐ Requeue {"namespace": "es-digital-journeys", "sleepcycle": "sleepcycle-sample1", "op": "Shutdown", "next-op": "Shutdown", "after": "59.984887885s"}
1.7024995800156264e+09 INFO Observed a panic in reconciler: runtime error: invalid memory address or nil pointer dereference {"controller": "sleepcycle", "controllerGroup": "core.rekuberate.io", "controllerKind": "SleepCycle", "sleepCycle": {"name":"sleepcycle-sample1","namespace":"es-digital-journeys"}, "namespace": "es-digital-journeys", "name": "sleepcycle-sample1", "reconcileID": "f199f8db-368c-43e0-ad11-9c304278acdf"}
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x13881bb]
goroutine 201 [running]:
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile.func1()
/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:118 +0x1f4
panic({0x14c2c80, 0x2328090})
/usr/local/go/src/runtime/panic.go:838 +0x207
github.com/rekuberate-io/sleepcycles/controllers.(*SleepCycleReconciler).getCurrentScheduledOperation(_, {{{0x13b128d, 0xa}, {0xc001af5780, 0x1b}}, {{0xc001af9b00, 0x12}, {0x0, 0x0}, {0xc001af9b30, ...}, ...}, ...})
/workspace/controllers/sleepcycle_controller.go:455 +0x17b
github.com/rekuberate-io/sleepcycles/controllers.(*SleepCycleReconciler).Reconcile(0xc000490ab0, {0x18b67c0, 0xc001ba44e0}, {{{0xc0006803a8?, 0x10?}, {0xc000680390?, 0x40d787?}}})
/workspace/controllers/sleepcycle_controller.go:84 +0x3a5
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile(0x18b6718?, {0x18b67c0?, 0xc001ba44e0?}, {{{0xc0006803a8?, 0x15c5740?}, {0xc000680390?, 0x4041f4?}}})
/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:121 +0xc8
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler(0xc0001a6b40, {0x18b6718, 0xc00057f4c0}, {0x1512b20?, 0xc0029332c0?})
/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:320 +0x33c
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc0001a6b40, {0x18b6718, 0xc00057f4c0})
/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:273 +0x1d9
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2()
/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:234 +0x85
created by sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2
/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:230 +0x325
NAME SHUTDOWN WAKEUP ENABLED NEXT SHUTDOWN NEXT WAKE UP LAST RUN LAST RUN SUCCESS
sleepcycle-sample1 */1 * * * * true 2023-12-13T20:28:00Z 2023-12-13T20:27:00Z true
sleepcycle-sample1 */1 * * * * true 2023-12-13T20:33:00Z 2023-12-13T20:32:31Z true
sleepcycle-sample1 */1 * * * * true 2023-12-13T20:34:00Z 2023-12-13T20:33:00Z true
sleepcycle-sample1 */1 * * * * true 2023-12-13T20:39:00Z 2023-12-13T20:38:30Z true
sleepcycle-sample1 */1 * * * * true 2023-12-13T20:40:00Z 2023-12-13T20:39:00Z true
๐๐ป Thanks you in advance, Let me know in case there is some issue template.