The controller is in charge of keeping the current state of SealedSecret
objects in sync with the declared desired state.
The controller exposes an API defined using the Swagger or OpenAPI v3 specification. You can download the definition from the link below:
Table of Contents generated with DocToc
git clone https://github.com/bitnami-labs/sealed-secrets.git $SEALED_SECRETS_DIR
The controller sources are located under cmd/controller/
and use packages from the pkg
directory.
You need a kubernetes cluster to run the integration tests.
For instance:
- Start Minikube and configure your local environment to re-use the Docker daemon inside the Minikube instance:
minikube start
eval $(minikube docker-env)
make K8S_CONTEXT=mytestk8s-context OS=linux ARCH=amd64 controller-tests
Note that:
K8S_CONTEXT
must be set to the name of yourkubectl
context pointing to the expected text cluster.OS
&ARCH
must match the Operating System and Architecture of your test cluster.
Optionally, you can customize the REGISTRY
as well:
make K8S_CONTEXT=kind-mykind REGISTRY=localhost:5000 OS=linux ARCH=amd64 controller-tests
make controller
This builds the controller
binary in the working directory.
To run the unit tests for controller
binary:
make test
make K8S_CONTEXT=kind-mykind OS=linux ARCH=amd64 push-controller
This builds the controller container image and pushes it.
Remember that the REGISTRY
env var is only needed when using a custom registry:
make K8S_CONTEXT=kind-mykind REGISTRY=localhost:5000 OS=linux ARCH=amd64 push-controller
make K8S_CONTEXT=kind-mykind REGISTRY=localhost:5000 apply-controller-manifests
This builds the controller K8s manifests in the working directory and deploys them.
make integrationtest