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

Fix upgrade issue from 1.4.2 to 1.4.3-rc1 #2387

Merged
merged 4 commits into from
Sep 14, 2021
Merged

Conversation

realshuting
Copy link
Member

Related issue

Fixes #2384.

Milestone of this PR

/milestone 1.4.3

What type of PR is this

/kind bug

Proposed Changes

When we upgraded (Cluster)PolicyReport and (Cluster)ReportChangeRequest CRDs to v1alpha2, there wasn't a conversion webhook to update status to result for each rcr / crcr, thus Kyverno panicked when it tried to update summary of each report.

This PR adds a label app.kubernetes.io/version indicating which version of Kyverno is managing report change request and uses it to list existing RCRs / CRCRs. All old ones are removed automatically.

This PR also changes how we build the image tag from git tags. This is because we add another tag helm-chart-v* to trigger the Helm release.

Proof Manifests

There is no restart of Kyverno Pod when upgrading from 1.4.2 to this commit:

✗ k get -n kyverno pod -w
NAME                       READY   STATUS    RESTARTS   AGE
kyverno-7b7f89c6f7-ggdx9   1/1     Running   0          33s

✗ k -n kyverno logs -f kyverno-7b7f89c6f7-ggdx9
I0914 06:07:44.521747       1 version.go:17]  "msg"="Kyverno"  "Version"="v1.4.3-rc1-2-g791b5cdc4"
I0914 06:07:44.521806       1 version.go:18]  "msg"="Kyverno"  "BuildHash"="main/791b5cdc415ac974360aa754be383648460cb29c"
I0914 06:07:44.521814       1 version.go:19]  "msg"="Kyverno"  "BuildTime"="2021-09-13_11:05:49PM"

~ k get polr -w
NAME              PASS   FAIL   WARN   ERROR   SKIP   AGE
polr-ns-default   7      5      0      0       0      2s

Checklist

  • I have read the contributing guidelines.
  • I have added tests that prove my fix is effective or that my feature works.
  • [] My PR contains new or altered behavior to Kyverno and
    • [] I have added or changed the documentation myself in an existing PR and the link is:
    • [] I have raised an issue in kyverno/website to track the doc update and the link is:
    • [] I have read the PR documentation guide and followed the process including adding proof manifests to this PR.

Further Comments

Signed-off-by: Shuting Zhao <shutting06@gmail.com>
Signed-off-by: Shuting Zhao <shutting06@gmail.com>
Signed-off-by: Shuting Zhao <shutting06@gmail.com>
Signed-off-by: Shuting Zhao <shutting06@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Kyverno crashed when upgrading from 1.4.2 to 1.4.3-rc1
3 participants