Open ozooxo opened 1 year ago
This issue is currently awaiting triage.
SIG CLI takes a lead on issue triage for this repo, but any Kubernetes member can accept issues by applying the triage/accepted
label.
The triage/accepted
label can be added by org members by writing /triage accepted
in a comment.
checked up on this and it seems to deliver this issue on certain ranges of integer tags
for such cases it does not work
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/version: FOOBAR
name: app
spec:
template:
spec:
containers:
- image: foobar:10.129091212
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
labels:
app.kubernetes.io/version: 10.129091212
name: ingress
cases similar to below it displays the issue
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/version: FOOBAR
name: app
spec:
template:
spec:
containers:
- image: foobar:1012313123.129091212
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
labels:
app.kubernetes.io/version: 1.0123131231290913e+09
name: ingress
for string based values it does not show the issue
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/version: FOOBAR
name: app
spec:
template:
spec:
containers:
- image: foobar:appdev
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
labels:
app.kubernetes.io/version: appdev
name: ingress
/triage accepted
I think this is a valid issue and kustomize should try not to modify strings in this way. However, I have a suspicion that the root cause of this issue is in a yaml library that kustomize is consuming, so I am not sure how much we can actually control in kustomize.
If anyone is interested in fixing this, please feel free to find the root cause. If it is an issue with the yaml library, you can submit a fix upstream and see if they accept it.
@natasha41575: The label(s) triage/accept
cannot be applied, because the repository doesn't have them.
What happened?
I have a
replacements
in my Kustomize setup, to retrieve image version fromDeployment
and patch it to a metadata label. However, Kustomize changes my version20230921.12345678
to a scientific notation of2.023092112345678e+07
.https://github.com/ozooxo/kustomize-replacements-potential-bug is the code to reproduce it.
What did you expect to happen?
We should expect
instead of
How can we reproduce it (as minimally and precisely as possible)?
Expected output
Actual output
Kustomize version
My local environment is with Kustomize 4.5.5, and Helm 3.9.0.
This seems still a problem with Kustomize 5.0.1 and Helm 3.12.3 (tested in docker with the highest version I can find, and got same output).
Operating system
MacOS