-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
namePrefix Configuration is broken #5272
Comments
Tried this with the same kustomization.yaml files but only difference being these files
got this result
It seems firstly the kustomization file is skipping the namePrefix completely and only picking the configurations option and secondly it ignores the skip statement in the config-prefix as the above example for pod (tried for service also same result) |
on trying with a kustomization.yaml file like this
Resultant file
|
I can't find any documentation on this /assign @ncapps |
Hi @natasha41575, I was not able to find any references of a Example below# kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namePrefix: foo-
namespace: ns1
resources:
- deployment.yaml
- config.yaml
configurations:
- name-prefix-rules.yaml # deployment.yaml
apiVersion: apps/v1
metadata:
name: deployment1
kind: Deployment # config.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: config # name-prefix-rules.yaml
namePrefix:
- path: metadata/name
apiVersion: v1
kind: Deployment OutputThis example shows that a apiVersion: v1
kind: ConfigMap
metadata:
name: config
namespace: ns1
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: foo-deployment1
namespace: ns1 |
Thank you @ncapps for the thorough investigation! Agree that the For this issue, looks like the alternative configuration in #5272 (comment) that Nick suggested might be sufficient for this use case. @sass1997 Could you give it a try and let us know if this resolves your issue? /triage resolved |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close not-planned |
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
What happened?
I do have resources where I don't want to add the namePrefix: e.x. PriorityClass. I want to blacklist them via configuration
What did you expect to happen?
I expected that only the prefix is skipped for the
PriorityClass
. Unfortantly it's then removed for all current and future resources. What is needed to reactivate is that you explicity add one by one namePrefix you want to have. Funny thing if you add a conifguration where the namePrefix needs to be added the rule with lowercase doesn't work and you need to name it like it's expected in Pascalcase.How can we reproduce it (as minimally and precisely as possible)?
Expected output
Actual output
Kustomize version
v5.1.0
Operating system
None
The text was updated successfully, but these errors were encountered: