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

Add back V1alpha1 policy report resources #2377

Merged
merged 2 commits into from
Sep 10, 2021

Conversation

realshuting
Copy link
Member

@realshuting realshuting commented Sep 10, 2021

Related issue

Closes #2376.

Milestone of this PR

/milestone 1.4.3

What type of PR is this

/kind api-change

Proposed Changes

Add v1alpha1 policy report schema back to handle backward compatibility during upgrade.

Proof Manifests

With Kyverno v1.4.2 installed on the cluster:

✗ k get -n kyverno pod -o yaml | grep image:
              f:image: {}
              f:image: {}
      image: ghcr.io/kyverno/kyverno:v1.4.2
    - image: ghcr.io/kyverno/kyvernopre:v1.4.2
      image: ghcr.io/kyverno/kyverno:v1.4.2
      image: ghcr.io/kyverno/kyvernopre:v1.4.2

Apply the local changes to upgrade Kyverno to use latest tag:

✗ k get -n kyverno pod -o yaml | grep image:
              f:image: {}
              f:image: {}
      image: ghcr.io/kyverno/kyverno:latest
    - image: ghcr.io/kyverno/kyvernopre:latest
      image: ghcr.io/kyverno/kyverno:latest
      image: ghcr.io/kyverno/kyvernopre:latest

The pod is running and the policy report is with version v1alpha2:

✗ k get pod -n kyverno
NAMESPACE            NAME                                         READY   STATUS    RESTARTS   AGE
kyverno              kyverno-698c7fdf97-lk89p                     1/1     Running   0          46s

✗ k get polr polr-ns-default
NAME              PASS   FAIL   WARN   ERROR   SKIP   AGE
polr-ns-default   0      0      0      0       0      11m

✗ k get polr polr-ns-default -o yaml
apiVersion: wgpolicyk8s.io/v1alpha2
kind: PolicyReport
metadata:
  creationTimestamp: "2021-09-10T00:08:11Z"
  generation: 2
...

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

cc @fjogeleit

@JimBugwadia JimBugwadia merged commit 51c8b5f into kyverno:main Sep 10, 2021
@realshuting realshuting deleted the v1alpha1_policy_report branch September 14, 2021 20:30
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.

Add v1alpha1 schema back to policy report CRD
2 participants