- the Go version declared in
go.mod - Docker
kubectl- Kind
- Helm
- GNU Make
Create a local cluster:
kind create cluster --name github-platform-operatorGenerate code and manifests:
make generate manifestsInstall the CRDs:
make installCreate a PAT or GitHub App Secret and provider using the examples in
config/samples.
Run the controller against the active kubeconfig context:
make runRun the same checks expected by CI:
make generate manifests
make fmt
make vet
make test
make lint
git diff --checkChanges to API types or Kubebuilder markers must include regenerated deepcopy code, CRDs and RBAC. Changes to GitHub request payloads should include contract tests that assert the serialized JSON sent by the REST client. Every bug fix should add a regression test that fails without the fix.
make docker-build IMG=github-platform-operator:dev
kind load docker-image \
github-platform-operator:dev \
--name github-platform-operator
make deploy IMG=github-platform-operator:devRemove the deployment and CRDs:
make undeploy
make uninstallmake test-e2eThe suite builds the manager image, loads it into Kind, installs the CRDs and validates the deployed controller and metrics endpoint. A Kind cluster must exist before running the suite. To reuse the cluster from the local workflow:
KIND_CLUSTER=github-platform-operator make test-e2eAlternatively, use the default E2E cluster name:
kind create cluster --name kind
make test-e2e
kind delete cluster --name kindmake generate manifests
./hack/package-helm-chart.sh 0.1.0-dev v0.1.0-devThe package is written under:
dist/helm/
Render it without installing:
helm template github-platform-operator \
dist/helm/github-platform-operator-0.1.0-dev.tgz \
--namespace github-platform-operator-system.
├── api/v1alpha1/ Custom resource types
├── charts/ Helm chart
├── cmd/ Controller manager entrypoint
├── config/ Kubebuilder CRDs, RBAC and samples
├── docs/ User and maintainer documentation
├── hack/ Generation and packaging scripts
├── internal/controller/ Reconcilers
├── internal/github/ GitHub REST client
└── test/ Controller and end-to-end tests