Crossplane provider for managing resources on min.io.
Documentation: https://vshn.github.io/provider-minio/provider-minio/
dockergohelmkubectlyqsed(orgsedfor Mac)
Some other requirements (e.g. kind) will be compiled on-the-fly and put in the local cache dir .kind as needed.
make buildto build the binary and docker imagemake generateto (re)generate additional code artifactsmake testrun test suitemake local-installto install the operator in local clustermake install-samplesto run the provider in local cluster and apply sample manifestsmake run-operatorto run the code in operator mode against your current kubecontext
See all targets with make help
- Make sure you have a kind cluster running and the config exported
make local-install
The provider comes with mutating and validation admission webhook server.
To test and troubleshoot the webhooks on the cluster, simply apply your changes with kubectl.
-
Make sure you have all CRDs and validation webhook registrations installed.
make install-crd kubectl apply -f package/webhook
-
To debug the webhook in an IDE, we need to generate certificates:
make webhook-debug # if necessary with another endpoint name, depending on your docker setup # if you change the webhook_service_name variable, you need to clean out the old certificates make webhook-debug -e webhook_service_name=$HOSTIP
-
Start the operator in your IDE with
WEBHOOK_TLS_CERT_DIRenvironment set to.work/webhooks. -
Apply the samples to test the webhooks:
make install-samples
make crossplane-setup minio-setup install-crdsto install crossplane and minio in the kind clusterkubectl apply -f samples/_secret.yaml samples/minio.crossplane.io_providerconfig.yamlEXPORT KUBECONFIG=.work/kind/kind-kubeconfiggo run . --log-level 1 operator
For detailed information on how Crossplane Provider works from a development perspective check provider mechanics documentation page.
Some scenarios are tested with the Kubernetes E2E testing tool Kuttl.
Kuttl is basically comparing the installed manifests (usually files named ##-install*.yaml) with observed objects and compares the desired output (files named ##-assert*.yaml).
To execute tests, run make test-e2e from the root dir.
If a test fails, kuttl leaves the resources in the kind-cluster intact, so you can inspect the resources and events if necessary.
Please note that Kubernetes Events from cluster-scoped resources appear in the default namespace only, but kubectl describe ... should show you the events.
make clean