Skip to content
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

[Bug] Building image context fails if an inner portion of name looks like a domain #9381

Closed
2 tasks done
chipzoller opened this issue Jan 11, 2024 · 4 comments
Closed
2 tasks done
Labels
bug Something isn't working mutation Issues pertaining to the mutate ability.

Comments

@chipzoller
Copy link
Member

Kyverno Version

1.11.1

Kubernetes Version

1.27.x

Kubernetes Platform

K3d

Kyverno Rule Type

Mutate

Description

Mutating the image field of a Pod fails if the mutation creates a string in which an inner portion of the mutated name has what appears to be a domain name.

See discussion #9368.

Steps to reproduce

  1. Run the Playground link here.

Expected behavior

The mutation is successful since the final result is still a valid image string. You can confirm this by trying to create a Pod with an image having the same string without Kyverno involved and it's allowed.

Screenshots

No response

Kyverno logs

No response

Slack discussion

No response

Troubleshooting

  • I have read and followed the documentation AND the troubleshooting guide.
  • I have searched other issues in this repository and mine is not recorded.
@chipzoller chipzoller added bug Something isn't working mutation Issues pertaining to the mutate ability. labels Jan 11, 2024
@JimBugwadia JimBugwadia added this to the Kyverno Release 1.12.0 milestone Jan 11, 2024
@vishal-chdhry
Copy link
Member

The issue with the playground is that there is an extra " at the end in line 30 of the policy, This works

cc @chipzoller

@chipzoller
Copy link
Member Author

Ah good catch. So we can close this then?

@vishal-chdhry
Copy link
Member

Yes, and I believe this PR solves the unauthorized issue mentioned in the discussion: #9838

@chipzoller
Copy link
Member Author

Nice job, Vishal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working mutation Issues pertaining to the mutate ability.
Projects
None yet
Development

No branches or pull requests

4 participants