- config/base - cluster-wide operator deployment, does not include RBAC and CRD
- config/crd - generated Custom Resource Definitions
- config/rbac - cluster-wide RBAC
- default - default deployment
- config/e2e - e2e rbac sandbox with coverage enabled on etcd-operator
Operator requires cert-manager and CRDs to be installed in the cluster.
kustomize build --enable-helm config/bootstrap | kubectl apply -f -
docker build --tag ghcr.io/agoda-com/etcd .
kubectl apply -k config/default
skaffold run
skaffold debug
VSCode launch configuration:
{
"name": "Skaffold Debug",
"type": "go",
"request": "attach",
"mode": "remote",
"host": "localhost",
"port": 56268,
"substitutePath": [
{
"from": "${workspaceFolder}",
"to": "/workspace",
},
],
Unit tests only (marked with t.Short()
):
make test
Unit and integration tests:
make integration-test
End-to-end tests:
make e2e-test
Coverage:
make test coverage
make integration-test coverage
make e2e-test coverage
Output coverage report:
CODECOV_HTMLFILE=build/coverage.html make integration-test coverage
open build/coverage.html