-
Notifications
You must be signed in to change notification settings - Fork 70
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
controller crash when patching YAMLs with non-ASCII characters #140
Comments
Can you post here the YAML with the policy comments please? |
---
apiVersion: image.toolkit.fluxcd.io/v1alpha1
kind: ImagePolicy
metadata:
name: l2l-core
spec:
imageRepositoryRef:
name: l2l-core
filterTags:
pattern: '^sc\.(?P<ver>.*)'
extract: '$ver'
policy:
semver:
range: '>1.0.0'
---
apiVersion: image.toolkit.fluxcd.io/v1alpha1
kind: ImagePolicy
metadata:
name: l2l-activity
spec:
imageRepositoryRef:
name: l2l-activity
filterTags:
pattern: '^prod\.(?P<ver>.*)'
extract: '$ver'
policy:
semver:
range: '>1.0.0'
---
apiVersion: image.toolkit.fluxcd.io/v1alpha1
kind: ImagePolicy
metadata:
name: l2l-activity-h5
spec:
imageRepositoryRef:
name: l2l-activity-h5
filterTags:
pattern: '^prod\.(?P<ver>.*)'
extract: '$ver'
policy:
semver:
range: '>1.0.0' |
@ywyt738 can you post also the YAML files where the policy setters are used? e.g. |
kind: Deployment
metadata:
labels:
io.kompose.service: l2l-core
name: l2l-core
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: l2l-core
strategy:
type: Recreate
template:
metadata:
labels:
io.kompose.service: l2l-core
spec:
containers:
image: registry.xxx.com/l2l/l2l-core:sc.1.0.1 # {"$imagepolicy": "default:l2l-core"}
imagePullPolicy: IfNotPresent
name: l2l-core
resources:
limits:
memory: 1600Mi
requests:
memory: 1000Mi
ports:
- containerPort: 8060
dnsPolicy: ClusterFirst
restartPolicy: Always
terminationGracePeriodSeconds: 30 |
@stefanprodan Do you have workaround? |
Seems to be related to kubernetes-sigs/kustomize#3605 |
@ywyt738 can you remove any non-ASCII characters from your YAMLs and see if that fixes it? |
A bit more info: the stack trace shows it's a bug in yaml.v3, and our best guess is the unicode-handling bug linked above. I don't see any non-ASCII in the examples, but perhaps it was lost in editing. |
@stefanprodan Thank you very much indeed. |
image-automation-controller version 0.6.1 and 0.7.0 also have this issue.
image-automation-controller crashed when the ImageUpdateAutomation is created.
The image-automation-controller log
The text was updated successfully, but these errors were encountered: