Comments (6)
Yay! Let me know if there's anything else I can do to help out with this, and thank you for helping this product become even better! :-)
from kustomize.
BTW, this also seems to happen when I try using a PatchTransformer
. I tried doing this:
namespace: bar
transformers:
- |-
apiVersion: builtin
kind: PatchTransformer
metadata:
name: fix-kuma-namespace
patch: '[{"op": "replace", "path": "/metadata/namespace", "value": "kuma"}]'
target:
group: kuma.io
version: v1alpha1
kind: MeshMetric
And if you comment out the transformer, the namespace is wrong, but the label is proper, and if you uncomment the transformer, the label is wrong, and the namespace is correct:
laptop /tmp/t% kustomize build . > output.yaml && diff correct.yaml output.yaml
15c15
< namespace: kuma
---
> namespace: bar
laptop /tmp/t% kustomize build . > output.yaml && diff correct.yaml output.yaml
13c13
< kuma.io/mesh: foo-test
---
> kuma.io/mesh: test
laptop /tmp/t%
from kustomize.
If I had to choose, I'd prefer the solution that uses unsetOnly
, because then I can set namespaces where I need them to be in the base yaml, and just have the namespaced stuff live in it's namespace. But I thought you might be interested in knowing that just enabling a transformer of multiple types causes nameReference
transforms to stop working.
from kustomize.
@timothy-spencer there is definitely a bug here. I can reproduce the behaviour you're seeing on latest HEAD. I could not, however, reproduce the working behaviour you described without specifying a namespace: bar
field in the kustomization.yaml
. Could you please clarify the scenario where no transformer configurations are set, but the backreference works as expected?
/triage accepted
/lifecycle frozen
from kustomize.
If I understand your request, my first step was to take resources.yaml
and config.yaml
from above, and use this kustomization.yaml:
# kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: bar
namePrefix: foo-
resources:
- resources.yaml
configurations:
- config.yaml
This made it so that the namespace got splatted onto all resources, including the ones that I needed to live in the kuma namespace. Thus, my commentingnamespace: bar
out as I showed in my original kustomization.yaml
, and trying to use the transformer with unsetOnly: true
to fix that. But that's when I noticed the metadata/labels/kuma.io\/mesh
value reverting back to test
instead of foo-test
.
Does that answer your question?
from kustomize.
Does that answer your question?
Hi there, @timothy-spencer!
It does, yes. Thanks for clarifying. I also noticed this strange behaviour during my tests and just wanted to confirm that what I was able to reproduce was in fact the issue you reported.
from kustomize.
Related Issues (20)
- Usage of `namePrefix` or `nameSuffix` with Validating Admission Policy results in a silently broken `ValidatingAdmissionPolicyBinding` HOT 4
- Add redirect support for resource loading HOT 1
- Exec plug-in not found error needs to be more descriptive HOT 2
- Kustomize replaces double quotes with single quotes HOT 1
- Components: disable LoadRestrictions not working with Components HOT 1
- `add` works similarly `replace` HOT 2
- helmGlobals is not used when HelmChartInflationGenerator is used in generators field HOT 1
- Unable to Fetch Helm Chart from Self-hosted ChartMuseum Registry HOT 1
- Can't patch Pod - no matches for Id Pod.v1.[noGrp]/airbyte-minio-create-bucket.airbyte HOT 3
- Using nameSuffix is applied to everything but spec/template/spec/volumes/persistentVolumeClaim/claimName of a deployment HOT 2
- errors accumulating remote directories are not reported in certain situations HOT 1
- go linter fails on github actions and locally HOT 3
- Kustomize: apply patch results in error "add operation does not apply: doc is missing path" HOT 1
- kustomize cfg grep with no arguments causes panic HOT 2
- Document KUSTOMIZE_PLUGIN_HOME HOT 3
- Kustomize fails to process CR if it contains "spec.template" HOT 4
- kustomize build with KUSTOMIZE_PLUGIN_HOME tries to load wrong plugin - Error: loading generator plugins: failed to load generator: expected file with Go object code at: .../plugin/v1/secret/Secret.so HOT 1
- Suffix not added to ConfigMap name HOT 7
- element spec.rules.http.paths.backend.service.port of ingress resource is not inherited HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kustomize.