See README.md for a full project overview, configuration examples, and contributing guidelines.
| Layer | Technology |
|---|---|
| Language | Go (modules; go.work is local-only, never commit it) |
| Scaffolding | Kubebuilder v4 + Operator SDK |
| CRD generation | controller-gen (DeepCopy, CRDs, RBAC, webhooks) |
| Config management | Kustomize |
| Packaging | OLM bundle |
| Testing | Ginkgo/Gomega + envtest (functional), KUTTL (integration) |
| Linting | golangci-lint (.golangci.yaml) |
| CI | Zuul (zuul.d/), Prow (.ci-operator.yaml), GitHub Actions |
| Kind | Purpose |
|---|---|
Horizon |
Single CR managing the Horizon dashboard deployment (httpd/WSGI). No sub-CRs. |
The Horizon CR has defaulting and validating admission webhooks.
Maintenance rule: when directories are added, removed, or renamed, or when their purpose changes, update this table to match.
| Directory | Contents |
|---|---|
api/v1beta1/ |
CRD types (horizon_types.go), conditions, webhook markers |
cmd/ |
main.go entry point |
internal/controller/ |
Reconciler: horizon_controller.go |
internal/horizon/ |
Horizon resource builders (deployment, volumes, config) |
internal/webhook/ |
Webhook implementation |
templates/ |
Config files and scripts mounted into pods via OPERATOR_TEMPLATES env var |
config/crd,rbac,manager,webhook/ |
Generated Kubernetes manifests (CRDs, RBAC, deployment, webhooks) |
config/samples/ |
Example CRs (Kustomize overlays). base/, custom-theme/, httpd-overrides/ for customization. |
test/functional/ |
envtest-based Ginkgo/Gomega tests |
test/kuttl/ |
KUTTL integration tests |
hack/ |
Helper scripts (CRD schema checker, local webhook runner) |
After modifying Go code, always run: make generate manifests fmt vet.
Before sending a commit, always run: pre-commit run --all-files.
- Follow standard openstack-k8s-operators conventions and lib-common patterns.
- Use
lib-commonmodules for conditions, endpoints, TLS, storage, and other cross-cutting concerns rather than re-implementing them. - CRD types go in
api/v1beta1/. Controller logic goes ininternal/controller/. Resource-building helpers go ininternal/horizon/. - Config templates are plain files in
templates/-- they are mounted at runtime via theOPERATOR_TEMPLATESenvironment variable. - Webhook logic is split between the kubebuilder markers in
api/v1beta1/and the implementation ininternal/webhook/.
- Functional tests use the envtest framework with Ginkgo/Gomega and live in
test/functional/. - KUTTL integration tests live in
test/kuttl/. - Run all functional tests:
make test. - When adding a new field or feature, add corresponding test cases in
test/functional/and update fixture data accordingly.
- lib-common: shared modules for conditions, endpoints, TLS, secrets, etc.
- infra-operator: Memcached and topology APIs.
- keystone-operator: identity service registration.
- dev-docs/developer.md: developer guide and coding conventions.