Development
This section covers how to set up a development environment and contribute to the Keycloak Operator.
Prerequisites
- Go 1.22+
- Docker
- kubectl
- Kind or Minikube
- Make
Getting Started
-
Clone the repository:
git clone https://github.com/Hostzero-GmbH/keycloak-operator.git cd keycloak-operator -
Install dependencies:
go mod download -
Set up the development environment:
make kind-all
Project Structure
keycloak-operator/
├── api/v1beta1/ # CRD type definitions
├── cmd/main.go # Entry point
├── internal/
│ ├── controller/ # Reconciliation logic
│ └── keycloak/ # Keycloak client wrapper
├── config/
│ ├── crd/ # CRD manifests
│ ├── manager/ # Operator deployment
│ ├── rbac/ # RBAC configuration
│ └── samples/ # Example CRs
├── charts/ # Helm chart
├── hack/ # Development scripts
├── test/
│ └── e2e/ # End-to-end tests
└── docs/ # Documentation (mdBook)
Development Workflow
See the specific guides: