This project follows the conventions presented in the standard Golang project.
go >= 1.11
Update the constraints in go.mod
.
A simple make
should be enough. This should compile the main
function and generate a dex-operator
binary as
well as a Docker image.
Unit tests can be run using make test
Integration tests can be run using make integration
Run first the tests.
Then you can visualize the profile in html format:
go tool cover -html=cover.out
or use the make coverage
target
Feel free to read more about this on : https://blog.golang.org/cover.
Some files are autogenerated when you run the integration tests, like the CRD
generation
under (config/crds
) or the RBAC
generation under (config/rbac
). Also, our all-in-one
manifest can be generated by running make manifests
.
-
make integration
- Will automatically regenerate files under
config{crds,rbac}
- Will automatically regenerate files under
-
make manifests
- Will take some files from
config{crds,rbac}
and will generate the all-in-one manifest underdeployments/dex-operator-full.yaml
- Will take some files from
There are multiple ways you can run the dex-operator
for bootstrapping
and managinig your Kubernetes cluster:
You can run the dex-operator
container locally with a
make local-run
. This will:
- build the
dex-operator
image - run it locally
- using the
kubeconfig
in/etc/kubernetes/admin.conf
- using the config files in
../config
- using the