|
|
||
|---|---|---|
| build | ||
| cicd | ||
| cmd/manager | ||
| deploy | ||
| doc | ||
| pkg | ||
| test/e2e | ||
| version | ||
| .gitignore | ||
| Gopkg.lock | ||
| Gopkg.toml | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
| VERSION.txt | ||
| checkmake.ini | ||
| config.env | ||
| jenkins-operator-draft.png | ||
| phases.png | ||
| reconcile.png | ||
README.md
Jenkins Operator
What's Jenkins Operator?
Jenkins operator it's a Kubernetes native operator which fully manages Jenkins on Kubernetes. It was built with immutability and declarative configuration as code in mind.
It provides out of the box:
- integration with Kubernetes
- pipelines as code
- extensibility via groovy scripts or configuration as code plugin
- security and hardening
Problem statement and goals
The main reason why we decided to write the jenkins-operator is the fact that we faced a lot of problems with standard Jenkins deployment. We want to make Jenkins more robust, suitable for dynamic and multi-tenant environments.
Some of the problems we want to solve:
- volumes handling (AWS EBS volume attach/detach issue when using PVC)
- installing plugins with incompatible versions or security vulnerabilities
- better configuration as code
- lack of end to end tests
- handle graceful shutdown properly
- security and hardening out of the box
- orphaned jobs with no jnlp connection
- make errors more visible for end users
Documentation
Contribution
Feel free to file issues or pull requests.
TODO
Common:
- simple API for generating Kubernetes events using one common format
VirtusLab docker registryhttps://hub.docker.com/r/virtuslab/jenkins-operatordecorate Jenkins API client and add more functions for handling jobs and builds e.g. Ensure, CreateOrUpdate- documentation
VirtusLab flavored Jenkins theme- create Jenkins Jobs View for all jobs managed by the operator
- jenkins job for executing groovy scripts and configuration as code (from ConfigMap)
Base configuration:
install configuration as a code Jenkins plugin- handle Jenkins restart when base configuration has changed
installand configure Kubernetes plugin (in-progress)- e2e pipelines using Kubernetes plugin
- Jenkins hardening, disable insecure options
- watch other Kubernetes resources by the fixed labels
User configuration:
user reconciliation loop with CR validationconfigure seed jobs and deploy keyse2e tests for seed jobs- mask private key build parameter using mask-plugin
- configure Jenkins authorization (via configuration as a code plugin or groovy scripts)
- backup and restore for Jenkins jobs running as standalone job (AWS, GCP, Azure)
- trigger backup job before pod deletion using preStop k8s hooks
- verify Jenkins configuration events