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] Kyverno 1.10.1+ broke ability to clone secrets with names > 63 characters #8447

Closed
2 tasks done
thesuperzapper opened this issue Sep 19, 2023 · 9 comments · Fixed by #8466
Closed
2 tasks done
Assignees
Labels
bug Something isn't working generation Issues pertaining to the generate ability.

Comments

@thesuperzapper
Copy link
Contributor

Kyverno Version

1.10.3

Description

First, its important to note that Kubernetes Secrets can have names up to 253 characters long.

In Kyverno 1.10.0, ClusterPolicies which cloned secrets were able to clone secrets of any name length, but in Kyverno 1.10.1+ it can only clone secrets with name length up to 63 characters.

This is because #7436 introduced a new label generate.kyverno.io/source-name which is added to the generated secret. However, labels are only allowed to be 63 characters in length, which obviously will not work if the source secret has a longer name than that.

I propose we either:

  1. change it to an annotation (which can be multiple KB in length)
  2. remove the generate.kyverno.io/source-name label
  3. keep the label, but replace it with a hash that results in less than 63 characters (which might defeat the user-visibility of this label)

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.
@thesuperzapper thesuperzapper added bug Something isn't working triage Default label assigned to all new issues indicating label curation is needed to fully organize. labels Sep 19, 2023
@MariamFahmy98 MariamFahmy98 self-assigned this Sep 19, 2023
@MariamFahmy98 MariamFahmy98 added generation Issues pertaining to the generate ability. and removed triage Default label assigned to all new issues indicating label curation is needed to fully organize. labels Sep 19, 2023
@Chandan-DK
Copy link
Contributor

@MariamFahmy98 Are you working on this? I think this is a duplicate of #4675. I had assigned myself #4675 previously. Is it ok if I continue working on it?

@MariamFahmy98
Copy link
Collaborator

Yeah sure. Go ahead. I will assign it to you.

@thesuperzapper
Copy link
Contributor Author

@Chandan-DK I am interested in which approach you plan to take, I am partial to the idea of using annotations, because it will still be human readable, but can be uncapped in terms of length.

The only caveat is that it is a little more complex (and less efficient) to do filtering than with labels, so if that is a concern, we might have to use the hash approach.

@Chandan-DK
Copy link
Contributor

@thesuperzapper This is the approach mentioned by @realshuting #4675 (comment)

@thesuperzapper
Copy link
Contributor Author

thesuperzapper commented Oct 4, 2023

@eddycharly, I just want to make sure this is going to be included in the next release of Kyverno, given its a significant regression. (It is preventing many people from upgrading beyond 1.10.0).

@thesuperzapper
Copy link
Contributor Author

@realshuting @vishal-chdhry @MariamFahmy98, I just want to confirm the status of this issue, as it was a pretty significant regression in 1.10.1 and I strongly believe this must block the release of Kyverno 1.11.0.

@thesuperzapper
Copy link
Contributor Author

@JimBugwadia @MariamFahmy98 I am quite worried about the progression of 1.11.0 release candidates when this issue is not resolved.

If this is not patched before the final 1.11.0, it will mean that 1.10.0 was the latest version that is correctly able to execute generate policies on secrets with names longer than 63 characters, as this was broken in 1.10.1.

I want to highlight that this is not the only recent case of a significant breaking regression that is not yet resolved, for example, #7718 (which is less pressing than the one in this thread, but still important).

I worry that breaking regressions are not seen as a priority to the maintainers of the Kyverno project. I will likely stop using Kyerno (and recommend others do the same) if the serious regression (raised in this thread) is not resolved before 1.11.0.

@MariamFahmy98 MariamFahmy98 added this to the Kyverno Release 1.11.0 milestone Oct 24, 2023
@JimBugwadia
Copy link
Member

@thesuperzapper - thanks for the feedback. We discussed this earlier in the week and are tracking for 1.11.0.

@thesuperzapper
Copy link
Contributor Author

This issue also affects mutate rules with targets defined, I have raised a separate issue:

The mutate issue is present for all versions from 1.10.1 to 1.11.1, so 1.10.0 is still the only "safe" version (but it has lots of other issues that were fixed in later releases, so it's annoying to have to keep using it).

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

Successfully merging a pull request may close this issue.

4 participants