Closed mleneveut closed 3 years ago
I tested with kustomize 3.1.0 and 3.6.1. We are using Traefik 2.2 on Kubernetes 1.16.7
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle rotten
You should put namePrefix: prefix-
into the overlay. Transformers in base will only be applied to resources in base.
Hello,
We have a need for a Traefik ingressRoute in specific overlays and not all of them. In the develop overlay we want it, but not in the production overlay (the resource is not publicly exposed)
If we set the ingress.yaml in the "template", the namePrefix works but we don't have the feature to delete the ingress.yaml resource in the production overlay (we tested $patch: delete but it doesn't work for a whole file).
So we removed the ingress.yaml from the "template" and set it only in the needed overlays. But switching from "patchStrategicMerge" to "resources" broke the namePrefix transformation for the metadata/name in the Traefik ingress.
Working configuration with setting an ingressRoute in ALL overlays :
./base/template/kustomization.yaml :
./base/template/service.yaml
./base/template/ingress.yaml
./base/template/crd.yaml
./base/kustomization.yaml :
./overlays/develop/kustomization.yaml
./overlays/develop/ingress.yaml
cd overlays/develop && kustomise build .
=> The metadate/name and spec/routes/services/name are well transformed with the prefix.
NOT working configuration with ingressRoute in only some overlays :
(showing only the changes)
./overlays/develop/kustomization.yaml
./base/template/kustomization.yaml :
cd overlays/develop && kustomise build .
=> The metadate/name for the Service and the spec/routes/services/name for the ingressRoute are well transformed with the prefix, but the not metadata/name for the ingressRoute.
I tried to add this in the template/crd.yaml but without success :
Do I need to add a crd.json in the template/kutomization.yaml containing the JSON definition of the Treafik ingressRoute CRD ?