Dockerized Python Utility To Check The Status Of Kubernetes CronJobs
docker run --rm -it -v ~/.kube:/root/.kube \
smbambling/check-kubernetes-cronjobs:latest --namespace default
$ ./check_kubernetes_cronjobs.sh -n stage -v latest
OK: [0/0] CronJobs ran successfully in Kubernetes Namespace = default$ ./check_kubernetes_cronjobs.sh --help
Usage: ./check_kubernetes_cronjobs.sh -k -n
where:
-k Kubeconfig
[default: /Users/smbambling/.kube/config]
-n Kubernetes Namespace {required}
-v check-kubernetes-cronjobs Docker image version
[default: latest]Normal output when 1 or more CronJobs have failed
CRITICAL:[1/2] CronJobs failed in Kubernetes Namespace = default
+-------------+---------------------+---------------------+--------+
| CronJob | Start | Finish | Status |
+-------------+---------------------+---------------------+--------+
| delete-orgs | 10/31/2019 11:00:04 | 10/31/2019 11:04:13 | failed |
+-------------+---------------------+---------------------+--------+
Verbose output when 1 or more CronJobs have failed
- Note: Failed jobs will be sorted at the top of the table
CRITICAL:[1/2] CronJobs failed in Kubernetes Namespace = default
+------------------+---------------------+---------------------+-----------+
| CronJob | Start | Finish | Status |
+------------------+---------------------+---------------------+-----------+
| delete-orgs | 10/31/2019 11:00:04 | 10/31/2019 11:04:13 | failed |
| delete-customers | 10/31/2019 11:00:04 | 10/31/2019 11:02:42 | succeeded |
+------------------+---------------------+---------------------+-----------+
Normal output when ALL CronJobs have succeeded
OK: [1/1] CronJobs ran successfully in Kubernetes Namespace = default
Verbose output when ALL CronJobs have succeeded
OK: [1/1] CronJobs ran successfully in Kubernetes Namespace = default
+------------------+---------------------+---------------------+-----------+
| CronJob | Start | Finish | Status |
+------------------+---------------------+---------------------+-----------+
| delete-customers | 10/31/2019 11:00:03 | 10/31/2019 11:02:41 | succeeded |
+------------------+---------------------+---------------------+-----------+
- Create feature branch of master
- Make updates in feature branch
- Create pull request (PR) from feature branch into master
- Feature branch merged into master
- Build latest artifact (Docker image)
- Testing is performed on the latest artifact
- Master branch is 'released' into stable
- Bump version
- Build artifact (Docker image)
- Tag + Push artifact (Docker image)
- Tag
masterbranch - Merge
masterbranch intostable - Push
master+stablebranches
To aid in the build and release steps for development the utility develop.sh is used.
To build the latest artifact (Docker image) from your current branch pass the -b argument
./develop.sh -bTo release a tested version of the artifact (Docker image) from the master branch pass the -r argument with an optional -v argument to bump a specific patch level
./develop.sh -r$ ./develop.sh --help
Usage: ./develop.sh -b|-r -v
where:
-b Build Docker image
-r Build+Release Docker iamge
-v Version bump level { major, minor, patch(default) See the BRANCHING.md file for details
We use SemVer for versioning. For the versions available, see the tags on this repository.
- Steven Bambling - Initial work
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details