feat: add make target for local kind cluster setup.#887
feat: add make target for local kind cluster setup.#887
Conversation
Signed-off-by: Alexander Cristurean <acristur@redhat.com>
Signed-off-by: Alexander Cristurean <acristur@redhat.com>
Signed-off-by: Alexander Cristurean <acristur@redhat.com>
Signed-off-by: Alexander Cristurean <acristur@redhat.com>
Signed-off-by: Alexander Cristurean <acristur@redhat.com>
Signed-off-by: Alexander Cristurean <acristur@redhat.com>
Signed-off-by: Alexander Cristurean <acristur@redhat.com>
Signed-off-by: Alexander Cristurean <acristur@redhat.com>
|
closes #859 |
Signed-off-by: Alexander Cristurean <acristur@redhat.com>
|
I think it would be nice to have a gitignored file where we can store the env variables needed for local setup (AWS credentials, RH registry credentials, etc.) so setting up the testing environment is easier and we don't have to export them manually each time. |
|
I ran into an issue with the kubeconfig setup when running tests against the Kind cluster. The testsuite requires |
|
@silvi-t kind should add the context to the default kubeconfig, i.e |
Signed-off-by: Alexander Cristurean <acristur@redhat.com>
Signed-off-by: Alexander Cristurean <acristur@redhat.com>
Signed-off-by: Alexander Cristurean <acristur@redhat.com>
azgabur
left a comment
There was a problem hiding this comment.
Future work: Add tracing, Add multicluster kind setup
make clean is not working due to missing crd's, the make clean can be refactored
The .PHONY target is used multiple times, can you check its not overriding itself each time
README.md
Outdated
| # Optional: Red Hat registry credentials (for testing tools like Keycloak) | ||
| # (if not provided, tools won't be deployed but core functionality will work) | ||
| export RH_REGISTRY_USERNAME=<your-username> | ||
| export RH_REGISTRY_PASSWORD=<your-token> |
README.md
Outdated
| # Optional: AWS credentials for DNS testing | ||
| # (if not provided, the secret won't be created and DNS tests will be skipped) | ||
| export AWS_ACCESS_KEY_ID=<your-aws-key> | ||
| export AWS_SECRET_ACCESS_KEY=<your-aws-secret> | ||
| export AWS_REGION=us-east-1 | ||
| export AWS_BASE_DOMAIN=test.example.com |
There was a problem hiding this comment.
Maybe take additionalManifests.yaml used in helm-olm to create needed secrets.
There was a problem hiding this comment.
that one is not actually populated with any secrets. The installation will not fail if these are not available, one could create the secret by himself with the help of the 'additionalManifest' as well. In CI, we can have this vars set in the secrets of the repository.
make/vars.mk
Outdated
| # Kuadrant Operator environment variables | ||
| # Default: Service timeouts for faster test execution | ||
| # Override with your own: KUADRANT_OPERATOR_ENV_VARS="LOG_LEVEL=debug,..." | ||
| KUADRANT_OPERATOR_ENV_VARS ?= AUTH_SERVICE_TIMEOUT=1000ms,RATELIMIT_SERVICE_TIMEOUT=1000ms,RATELIMIT_CHECK_SERVICE_TIMEOUT=1000ms,RATELIMIT_REPORT_SERVICE_TIMEOUT=1000ms |
There was a problem hiding this comment.
Maybe also add the DNS tls values for dnstls tests, and metrics endpints if needed
https://github.com/Kuadrant/helm-charts-olm/blob/main/charts/kuadrant-operators/templates/kuadrant/06-subscription.yaml
|
|
||
| # Include local environment setup modules | ||
| # Load variables first, then all other modules | ||
| include ./make/vars.mk |
There was a problem hiding this comment.
Not needed because of the following line
There was a problem hiding this comment.
this is importing the vars first as the other make files need it as well. One the next line is actually importing all the other make files, except this one.
| # Include local environment setup modules | ||
| # Load variables first, then all other modules | ||
| include ./make/vars.mk | ||
| include $(filter-out ./make/vars.mk,$(wildcard ./make/*.mk)) |
There was a problem hiding this comment.
Here is the make/vars.mk two times if I understand the wildcard corrently
There was a problem hiding this comment.
this is importing the vars first as the other make files need it as well. One the next line is actually importing all the other make files, except this one.
make/kuadrant.mk
Outdated
| helm install kuadrant-operator kuadrant/kuadrant-operator --create-namespace --namespace $(KUADRANT_NAMESPACE), \ | ||
| helm install kuadrant-operator kuadrant/kuadrant-operator --version $(KUADRANT_OPERATOR_VERSION) --create-namespace --namespace $(KUADRANT_NAMESPACE)) |
| 'metadata:' \ | ||
| ' name: kuadrant-sample' \ | ||
| ' namespace: $(KUADRANT_NAMESPACE)' \ | ||
| 'spec: {}' \ |
There was a problem hiding this comment.
In the future lets add observability and tracing
https://github.com/Kuadrant/helm-charts-olm/blob/main/charts/kuadrant-instances/templates/kuadrant/01-kuadrant.yaml
There was a problem hiding this comment.
will create issue for this
make/kuadrant.mk
Outdated
| endif | ||
|
|
||
| .PHONY: deploy-kuadrant-operator-local | ||
| deploy-kuadrant-operator-local: ## Deploy Kuadrant Operator from local build/image |
There was a problem hiding this comment.
If this is the OLM install, it wont work on Kind, rather remove it and just use kuadrant helm chart
There was a problem hiding this comment.
removed, added component mode.
make/local-setup.mk
Outdated
| $(MAKE) create-cluster-issuer | ||
| $(MAKE) $(GATEWAYAPI_PROVIDER)-install | ||
| $(MAKE) create-test-namespaces | ||
| $(MAKE) create-aws-credentials |
There was a problem hiding this comment.
Can be replaced with "apply additionalManifests" to also add other secrets needed
There was a problem hiding this comment.
reworked to do additionalManifests.
make/tools.mk
Outdated
| helm repo update; \ | ||
| helm install \ | ||
| --set=tools.keycloak.keycloakProvider=deployment \ | ||
| --set=tools.coredns.enable=false \ |
There was a problem hiding this comment.
This disable doesnt need to be here, coredns can be installed in kind
There was a problem hiding this comment.
set to true, instead
Signed-off-by: Alexander Cristurean <acristur@redhat.com>
Signed-off-by: Alexander Cristurean <acristur@redhat.com>
Signed-off-by: Alexander Cristurean <acristur@redhat.com>
Description
make local-setupcommand for one-step local Kuadrant environment creation using KindChanges
New Makefile Structure
make/directory:make/vars.mk- Centralized configuration variables with sensible defaultsmake/kind.mk- Kind cluster management (create, delete)make/dependencies.mk- Infrastructure dependencies (metrics-server, MetalLB, Gateway API, cert-manager)make/istio.mk- Istio gateway provider installationmake/envoygateway.mk- EnvoyGateway provider installationmake/kuadrant.mk- Kuadrant operator deployment and configurationmake/tools.mk- Testing tools deployment (Keycloak, Mockserver, etc.)make/local-setup.mk- Main local setup orchestrationLocal Setup Features
make local-setupcreates complete environmentGATEWAYAPI_PROVIDERvariableKuadrant Operator Configuration
patch-kuadrant-operator-envtarget merges custom env vars with Helm defaultsAUTH_SERVICE_TIMEOUT=1000msRATELIMIT_SERVICE_TIMEOUT=1000msRATELIMIT_CHECK_SERVICE_TIMEOUT=1000msRATELIMIT_REPORT_SERVICE_TIMEOUT=1000msjqto merge with existing env vars (preservesOPERATOR_NAMESPACE,RELATED_IMAGE_*, etc.)Documentation
Configuration
All configuration is centralized in
make/vars.mk: