This is a CertBot project that you can use as the starting point to develop your own and deploy it on an OpenShift cluster.
The steps in this document assume that you have access to an OpenShift deployment that you can deploy applications on.
A Cron Job that check the certificates in the existing Routes in the Openshift namespace using a Python Dynamic client.
openshift/ - OpenShift-specific files
├── scripts - helper scripts
└── templates - application templates
Please be sure to read the following warnings and considerations before running this code on your local workstation, shared systems, or production environments.
The Cron Job will be triggered every 3 minutes and will print all available certificates from Routes.
Use the script:
openshift_client_no_container/ - Python scripts
└── dynamic_openshift_client.py - Dynamic python client
Use the following command to deploy/execute the Certificate Bot in Openshift:
oc new-app https://raw.githubusercontent.com/AbrahamArellano/django-ex/master/openshift/templates/certificate_watchdog_cronjob.json -p SOURCE_REPOSITORY_URL=https://github.com/AbrahamArellano/django-ex -p NAME=[APPLICATION_NAME] -p NAMESPACE=[OPENSHIFT_NAMESPACE] -p DOCKER_REGISTRY_SERVER_PORT=[REGISTRY_SERVER_IP]:[REGISTRY_SERVER_PORT]
###NAMESPACE: Define the Openshift namespace name where the installation is done
###DOCKER_REGISTRY_SERVER_PORT: Define the docker registry server and port using the following syntax [SERVER]:[PORT]. Is relevant to mention that those values should be provided by the cluster administrator or checking the description of the image after it is deployed in the namespace.
If you get stuck at some point, or think that this document needs further details or clarification, you can give feedback and look for help using the channels mentioned in the OKD repo, or by filing an issue.
GNU GPLv3
Permissions of this strong copyleft license are conditioned on making available complete source code of licensed works and modifications, which include larger works using a licensed work, under the same license. Copyright and license notices must be preserved. Contributors provide an express grant of patent rights.