Categorygithub.com/johnwangwyx/clusterscan-k8s-operator
module
0.0.0-20241011090534-37c4151b2745
Repository: https://github.com/johnwangwyx/clusterscan-k8s-operator.git
Documentation: pkg.go.dev

# README

clusterscan-k8s-operator

A clusterscan operator that can execute configurable jobs and cronjobs.

Changes

You can use this link to see the changes added after the kubebuilder init:

Future considerations:

  • Adding a figuration management file or system logic to manage the variables and job-specific config.
  • Implement the logic for filtering for Target and checking for concurrent operation when AllowConcurrency spec is set to False.
  • Adding a lastOp field to the Status to track of the last operation that the underlining job performed.
  • Set ownership for the jobs created by the cronjob to the same operator. With testing, it is found that the cron children's job will not inherit this ownership and the cluster can miss reconciliation for them. (The workaround is to have a periodic reconciliation but this sort of hinders the event-based approach we had here)
  • Introduce more scheduling options beyond standard cron expressions(like dynamic scheduling based on cluster events or metrics thresholds that I am thinking of)
  • Ensure that all resources created by the operator are properly cleaned up when the operator itself is deleted.
  • Add unit tests to ensure code and branch coverages.

Referenced Docs:

Some doc I found really helpful in this journey learning k8s, minikube, kubebuilder, and k8s operators:

https://book.kubebuilder.io/getting-started

https://minikube.sigs.k8s.io/docs/start/

https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/

https://github.com/robfig/cron

https://github.com/kubernetes/api

https://kubernetes.io/docs/reference/using-api/api-concepts/

https://yash-kukreja-98.medium.com/develop-on-kubernetes-series-demystifying-the-for-vs-owns-vs-watches-controller-builders-in-c11ab32a046e

# Packages

No description provided by the author
No description provided by the author
No description provided by the author