Comments (10)
/triage accepted
/kind bug
This issue should be fixed by #5519 once it merges.
from kustomize.
/triage duplicate
Duplicate of #5031
from kustomize.
@stormqueen1990 it is not replaced but added two new lines:
creationTimestamp: "null"
creationTimestamp: null
Both of them were not presented in previous build.
from kustomize.
/remove-triage duplicate
After further inspection, I noticed that this is a separate issue from #5031. It seems the extra creationTimestamp: null
field is being added solely to the MutatingWebhookConfiguration
and ValidatingWebhookConfiguration
resources.
from kustomize.
/remove-triage bug
I took a better look at this and noticed that the creationTimestamp: null
fields are present in both the source MutatingWebhookConfiguration
and ValidatingWebhookConfiguration
resources:
- https://github.com/kubernetes-sigs/aws-load-balancer-controller/blob/c4471defda10f8184173192b9f9df4e411ee5dac/config/webhook/manifests.yaml#L1-L5
- https://github.com/kubernetes-sigs/aws-load-balancer-controller/blob/c4471defda10f8184173192b9f9df4e411ee5dac/config/webhook/manifests.yaml#L47-L51
I believe the prior behaviour of Kustomize was less desirable than the current one, since it would remove fields present on the source YAMLs. As for the rendering of creationTimestamp
as a string value, the merging of #5519 should have fixed it.
@koba1t @varshaprasad96 what are your opinions about this change in behaviour of Kustomize between v4 and v5?
from kustomize.
@stormqueen1990: Those labels are not set on the issue: triage/bug
In response to this:
/remove-triage bug
I took a better look at this and noticed that the
creationTimestamp: null
fields are present in both the sourceMutatingWebhookConfiguration
andValidatingWebhookConfiguration
resources:
- https://github.com/kubernetes-sigs/aws-load-balancer-controller/blob/c4471defda10f8184173192b9f9df4e411ee5dac/config/webhook/manifests.yaml#L1-L5
- https://github.com/kubernetes-sigs/aws-load-balancer-controller/blob/c4471defda10f8184173192b9f9df4e411ee5dac/config/webhook/manifests.yaml#L47-L51
I believe the prior behaviour of Kustomize was less desirable than the current one, since it would remove fields present on the source YAMLs. As for the rendering of
creationTimestamp
as a string value, the merging of #5519 should have fixed it.@koba1t @varshaprasad96 what are your opinions about this change in behaviour of Kustomize between v4 and v5?
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/test-infra repository.
from kustomize.
/remove-triage accepted
/remove-kind bug
from kustomize.
I believe this behavior is caused by the patches
transformer.
I don't know why, but if we apply patch
two or more times, we can't handle null
values.
For example
YAML
# kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- manifests.yaml
patches:
- path: patch.yaml
- path: patch2.yaml
# manifests.yaml
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
creationTimestamp: null
name: webhook
---
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
creationTimestamp: null
name: webhook
# patch.yaml
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
name: webhook
annotations:
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
---
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
name: webhook
annotations:
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
# patch2.yaml
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
name: webhook
annotations:
secondannotation: "dummythings"
---
# apiVersion: admissionregistration.k8s.io/v1
# kind: ValidatingWebhookConfiguration
# metadata:
# name: webhook
# annotations:
# secondannotation: "dummythings"
result
$ kustomize build .
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
annotations:
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
secondannotation: dummythings
creationTimestamp: "null"
name: webhook
---
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
annotations:
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
creationTimestamp: null
name: webhook
I think the addition of the creationTimestamp
field is a misconfiguration.
But I feel that it contains value for fixing this problem.
/kind bug
/triage accepted
from kustomize.
I think the addition of the
creationTimestamp
field is a misconfiguration. But I feel that it contains value for fixing this problem.
Hi there, @koba1t!
I was under the impression that the transformation of null
values into "null"
was fixed with #5519. I rebuilt Kustomize from master after the merge of that PR and wasn't able to reproduce this issue any longer.
from kustomize.
Thanks @stormqueen1990. You Are entirely right.
I forgot we haven't released the binary recently....
In the master version, this problem is solved.
$ ~/go/bin/kustomize build .
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
annotations:
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
secondannotation: dummythings
creationTimestamp: null
name: webhook
---
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
annotations:
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
creationTimestamp: null
name: webhook
The removal of the creationTimestamp
was a problem. I think the current behavior is better than before.
/triage duplicate
from kustomize.
Related Issues (20)
- git retrieval failures (such as a timeout) are not reported in certain scenarios HOT 2
- Bases deprecated - multiple resources in kustomization.yaml causes previous to be overwritten HOT 4
- Document the `fields` option for the `labels` built-in transformer HOT 4
- patches cause an error with $patch:delete in files with multiple patches HOT 1
- Documentation site not indexed by search engines HOT 2
- Buil fails when using components and strategic merge patch and null node HOT 2
- kustomize install from binaries with curl no longer working HOT 1
- `kustomize` should leave all ConfigMap values as quoted strings, since no other type is legal. HOT 8
- Allow Helm Chart Overlay Merges HOT 1
- When using ConfigMapGenerator merge as a resource. says "cannot merge or replace" HOT 3
- Installing through install_kustomize.sh is not working from v5.0.1 HOT 2
- Standardized behavior for `kustomize edit` HOT 1
- Define labels selector with crds HOT 1
- Kustomize doesn't pass namespace to helmCharts, resulting in inconsistent output HOT 4
- Multiple sources and string interpolation for targets in replacements. HOT 2
- Replacement inbetween HOT 1
- replacement in base kustomization missing custom nameSuffix HOT 1
- Failing to apply multiple patches using labelSelector/annotationSelector targeting the same files HOT 2
- Kustomize patches overwritten by namespace HOT 2
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.