Skip to content

ConfigBundleOperator

Introduction

Configuration management looks simple until you have to manage it at scale.

You create a configuration.

  • Then you need to update it.
  • Then you need to make sure it still exists.
  • Then something changes it manually.
  • Then you deploy another version.
  • Eventually, the cluster no longer matches what you intended.

ConfigBundleOperator is built around a simple idea:

Quote

Configuration should be managed declaratively and reconciled continuously.

Instead of manually managing configuration resources, you define a ConfigBundle1 and let the operator take responsibility for keeping the cluster in sync.

Repository

https://github.com/mahdihaghverdi/ConfigMapOperator

The Problem

Manual configuration management can introduce:

  • configuration drift
  • repetitive deployment logic
  • inconsistent environments
  • difficult recovery when resources are modified or deleted
  • configuration that no longer matches the declared state

But this project is also intentionally more than a solution to a configuration-management problem.

Note

ConfigBundleOperator is the first operator in the K8s Operators project.

It starts with a deliberately simple problem: managing configuration through a Kubernetes-native API. The goal is not to build the most feature-rich configuration operator. The goal is to explore how a Kubernetes Operator works from the ground up.

The Solution

ConfigBundleOperator introduces a Kubernetes-native ConfigBundle resource.

You declare the configuration you want, and the operator continuously works to make the actual state of the cluster match that desired state.

The Reconciliation Loop

flowchart LR
    A["ConfigBundle<br/><small>Desired State</small>"]
    B["Reconciliation"]
    C["ConfigMap<br/><small>Actual State</small>"]

    A -->|"Desired configuration"| B
    C -->|"Current configuration"| B
    B -->|"Create / Replace"| C

    C -. "Drift" .-> B

If the managed resources are changed or deleted, the operator detects the difference and reconciles them back toward the desired state.

What This Project Demonstrates

ConfigBundleOperator is intentionally simple, but it introduces the fundamental building blocks that more complex Kubernetes Operators rely on:

  • Custom Resources
  • Reconciliation
  • Desired vs. observed state
  • Idempotent operations
  • Resource ownership
  • Resource updates and deletion
  • Status and Conditions
  • Self-healing

The project uses this simple problem as a foundation for understanding how an operator observes state, determines what should happen, and continuously works to bring the cluster toward the desired state.

Where This Goes Next

ConfigBundleOperator is intentionally small.

The operators that followو build on the same foundations and introduce increasingly complex reconciliation logic, dependencies, failure handling, lifecycle management, and recovery mechanisms.

This project is the starting point.

Continue with the Overview to understand the operator and its architecture in more detail.


  1. The kind of the resource.