mirror of
https://github.com/outbackdingo/cozystack.git
synced 2026-01-28 02:18:36 +00:00
The lineage-controller-webhook makes a lot of outgoing API calls for every event it handles, contributing to a high API server latency, increasing the number of in-flight requests and generally degrading performance. This patch remedies this by separating the lineage component from the cozystack-controller and deploying it as a separate component on all control-plane nodes. Additionally, a new internal label is introduced to track if a resource has already been handled by the webhook. This label is used to exclude such resources from consideration. Addresses #1513. ```release-note [lineage] Break webhook out into a separate daemonset. Reduce unnecessary webhook calls by marking handled resources and excluding them from consideration by the webhook's object selector. ``` Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
19 lines
816 B
Makefile
19 lines
816 B
Makefile
NAME=lineage-controller-webhook
|
|
NAMESPACE=cozy-system
|
|
|
|
include ../../../scripts/common-envs.mk
|
|
include ../../../scripts/package.mk
|
|
|
|
image: image-lineage-controller-webhook
|
|
|
|
image-lineage-controller-webhook:
|
|
docker buildx build -f images/lineage-controller-webhook/Dockerfile ../../.. \
|
|
--tag $(REGISTRY)/lineage-controller-webhook:$(call settag,$(TAG)) \
|
|
--cache-from type=registry,ref=$(REGISTRY)/lineage-controller-webhook:latest \
|
|
--cache-to type=inline \
|
|
--metadata-file images/lineage-controller-webhook.json \
|
|
$(BUILDX_ARGS)
|
|
IMAGE="$(REGISTRY)/lineage-controller-webhook:$(call settag,$(TAG))@$$(yq e '."containerimage.digest"' images/lineage-controller-webhook.json -o json -r)" \
|
|
yq -i '.lineageControllerWebhook.image = strenv(IMAGE)' values.yaml
|
|
rm -f images/lineage-controller-webhook.json
|