diff --git a/doc/how-it-works.md b/doc/how-it-works.md index 79362d79..3598d61a 100644 --- a/doc/how-it-works.md +++ b/doc/how-it-works.md @@ -4,12 +4,27 @@ This document describes a high level overview how jenkins-operator works. ## Architecture and design -![jenkins-operator-draft](../jenkins-operator-draft.png) +The Jenkins operator design incorporates the following concepts: +- watches any changes of manifests and maintain desired state according to deployed custom resource manifest +- implements a main reconciliation loop which consists of two smaller reconciliation loops - base and user -## Base configuration +![reconcile](../reconcile.png) -## Jobs managed by jenkins-operator +Base reconciliation loop takes care of reconciling base Jenkins configuration, which consists of: +- Ensure Manifests - monitors any changes in manifests +- Ensure Jenkins Pod - creates and verifies status of Jenkins master Pod +- Ensure Jenkins Configuration - configures Jenkins instance including hardening, initial configuration for plugins, etc. +- Ensure Jenkins API token - generates Jenkins API token and initialized Jenkins client -## Backup and Restore +User reconciliation loop takes care of reconciling user provided configuration, which consists of: +- Ensure Restore Job - creates Restore job and ensures that restore has been successfully performed +- Ensure Seed Jobs - creates Seed Jobs and ensures that all of them have been successfully executed +- Ensure User Configuration - executed user provided configuration, like groovy scripts, configuration as code or plugins +- Ensure Backup Job - creates Backup job and ensures that backup has been successfully performed + +![reconcile](../phases.png) ## Operator Status + +Operator status is used for storing any configuration events or job statuses managed by the operator. +It helps to maintain or recover desired state even after operator or Jenkins restarts. \ No newline at end of file diff --git a/phases.png b/phases.png new file mode 100644 index 00000000..0e12afc0 Binary files /dev/null and b/phases.png differ diff --git a/reconcile.png b/reconcile.png new file mode 100644 index 00000000..e3e22257 Binary files /dev/null and b/reconcile.png differ