Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

workspace-syncer

workspace-syncer is the companion capstone project for The Kubernetes Platform Engineer Interview Guide.

It implements a small Kubernetes controller that synchronizes ConfigMaps from a tenant source namespace into a managed target namespace declared by a Workspace custom resource.

Required Tools

This project assumes a local Kubernetes platform engineering workstation. In practice, these are tools a Kubernetes Platform Engineer is usually expected to have already installed:

  • Go 1.26.4 or newer
  • Docker
  • kubectl
  • kind
  • make

The make crd target installs controller-gen locally into bin/ when it is not already present.

Build

make build

Generate CRDs

Regenerate the Workspace CustomResourceDefinition after changing the API types or Kubebuilder markers:

make crd

Run Out of Cluster

make crd
kubectl apply -f config/crd/workspace.yaml
make run

In another terminal:

make apply-examples
kubectl get workspace team-a -o yaml
kubectl get configmap app-settings -n managed-team-a -o yaml

Run In kind

make kind-create
make docker-build
make kind-load
make deploy
make apply-examples

Inspect:

kubectl get pods -n workspace-syncer-system
kubectl logs -n workspace-syncer-system deploy/workspace-syncer
kubectl get workspace team-a -o yaml

Clean Up

make delete-examples
make undeploy

To delete the local kind cluster:

make kind-delete

Interview Focus

The project demonstrates:

  • CRD API design
  • spec/status separation
  • controller-runtime reconciliation
  • finalizers
  • status conditions
  • source-to-target translation
  • ownership metadata
  • no-op write avoidance
  • RBAC
  • out-of-cluster and in-cluster execution
  • kind deployment

Releases

Packages

Contributors

Languages