- operator-sdk version 1.32.0
- kind version v0.22.0
- git
- go version 1.21+
- kubernetes version v1.25+
- kubectl version v1.25+
make
You need an active session open to a kubernetes cluster.
Optionally, run kind with local-env-setup
.
make local-env-setup
Then, run the operator locally
make run
make local-setup
You can deploy the operator using OLM just running a few commands.
No need to build any image. Kuadrant engineering team provides latest
and
released version tagged images. They are available in
the Quay.io/Kuadrant image repository.
Create kind cluster
make kind-create-cluster
Deploy OLM system
make install-olm
Deploy the operator using OLM. The make deploy-catalog
target accepts the following variables:
Makefile Variable | Description | Default value |
---|---|---|
CATALOG_IMG |
Catalog image URL | quay.io/kuadrant/limitador-operator-catalog:latest |
make deploy-catalog [CATALOG_IMG=quay.io/kuadrant/limitador-operator-catalog:latest]
If you want to deploy (using OLM) a custom limitador operator, you need to build your own catalog.
The make bundle
target accepts the following variables:
Makefile Variable | Description | Default value | Notes |
---|---|---|---|
IMG |
Operator image URL | quay.io/kuadrant/limitador-operator:latest |
|
VERSION |
Bundle version | 0.0.0 |
|
RELATED_IMAGE_LIMITADOR |
Limitador bundle URL | quay.io/kuadrant/limitador:latest |
LIMITADOR_VERSION var could be use to build this URL providing the tag |
CHANNELS |
Bundle channels used in the bundle, comma separated | alpha |
|
DEFAULT_CHANNEL |
The default channel used in the bundle | alpha |
- Build the bundle manifests
make bundle [IMG=quay.io/kuadrant/limitador-operator:latest] \
[VERSION=0.0.0] \
[RELATED_IMAGE_LIMITADOR=quay.io/kuadrant/limitador:latest] \
[CHANNELS=alpha] \
[DEFAULT_CHANNEL=alpha]
- Build the bundle image from the manifests
Makefile Variable | Description | Default value |
---|---|---|
BUNDLE_IMG |
Operator bundle image URL | quay.io/kuadrant/limitador-operator-bundle:latest |
make bundle-build [BUNDLE_IMG=quay.io/kuadrant/limitador-operator-bundle:latest]
- Push the bundle image to a registry
Makefile Variable | Description | Default value |
---|---|---|
BUNDLE_IMG |
Operator bundle image URL | quay.io/kuadrant/limitador-operator-bundle:latest |
make bundle-push [BUNDLE_IMG=quay.io/kuadrant/limitador-operator-bundle:latest]
The catalog format will be File-based Catalog.
Make sure all the required bundles are pushed to the registry. It is required by the opm
tool.
The make catalog
target accepts the following variables:
Makefile Variable | Description | Default value |
---|---|---|
BUNDLE_IMG |
Operator bundle image URL | quay.io/kuadrant/limitador-operator-bundle:latest |
DEFAULT_CHANNEL |
Catalog default channel | alpha |
make catalog [BUNDLE_IMG=quay.io/kuadrant/limitador-operator-bundle:latest] [DEFAULT_CHANNEL=alpha]
- Build the catalog image from the manifests
Makefile Variable | Description | Default value |
---|---|---|
CATALOG_IMG |
Operator catalog image URL | quay.io/kuadrant/limitador-operator-catalog:latest |
make catalog-build [CATALOG_IMG=quay.io/kuadrant/limitador-operator-catalog:latest]
- Push the catalog image to a registry
make catalog-push [CATALOG_IMG=quay.io/kuadrant/limitador-operator-bundle:latest]
You can try out your custom catalog image following the steps of the Deploy the operator using OLM section.
make local-cleanup
make test-unit
Optionally, add TEST_NAME
makefile variable to run specific test
make test-unit TEST_NAME=TestConstants
or even subtest
make test-unit TEST_NAME=TestLimitIndexEquals/empty_indexes_are_equal
You need an active session open to a kubernetes cluster.
Optionally, run local cluster with kind
make local-env-setup
Run integration tests
make test-integration
You need an active session open to a kubernetes cluster.
Optionally, run local cluster with kind
make local-env-setup
Run all tests
make test
make run-lint
You need an active session open to a kubernetes cluster.
Remove CRDs
make uninstall