Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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

  1. Clone the repository:

    git clone https://github.com/Hostzero-GmbH/keycloak-operator.git
    cd keycloak-operator
    
  2. Install dependencies:

    go mod download
    
  3. 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: