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

install CRDs with helm #1029

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

huww98
Copy link
Contributor

@huww98 huww98 commented Apr 19, 2024

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Snapshot CRDs are now installed with helm.

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Apr 19, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: huww98
Once this PR has been reviewed and has the lgtm label, please assign mowangdk for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@huww98
Copy link
Contributor Author

huww98 commented Apr 19, 2024

Note that this version of CRDs are copied from external-snapshotter client/v4.1.0 which is the first version that change storage version from v1beta1 to v1. It is not the latest version, and also not the same as the current version in this repo.

The diff with current version:

diff -u -N /var/folders/kc/jv1f0gpx6671wxsfd_0hzbbm0000gp/T/LIVE-3604708064/apiextensions.k8s.io.v1.CustomResourceDefinition..volumesnapshotclasses.snapshot.storage.k8s.io /var/folders/kc/jv1f0gpx6671wxsfd_0hzbbm0000gp/T/MERGED-3996406821/apiextensions.k8s.io.v1.CustomResourceDefinition..volumesnapshotclasses.snapshot.storage.k8s.io
--- /var/folders/kc/jv1f0gpx6671wxsfd_0hzbbm0000gp/T/LIVE-3604708064/apiextensions.k8s.io.v1.CustomResourceDefinition..volumesnapshotclasses.snapshot.storage.k8s.io	2024-04-19 17:57:16
+++ /var/folders/kc/jv1f0gpx6671wxsfd_0hzbbm0000gp/T/MERGED-3996406821/apiextensions.k8s.io.v1.CustomResourceDefinition..volumesnapshotclasses.snapshot.storage.k8s.io	2024-04-19 17:57:16
@@ -5,7 +5,7 @@
     api-approved.kubernetes.io: https://github.com/kubernetes-csi/external-snapshotter/pull/419
     controller-gen.kubebuilder.io/version: v0.4.0
   creationTimestamp: "2024-02-04T06:08:02Z"
-  generation: 1
+  generation: 2
   name: volumesnapshotclasses.snapshot.storage.k8s.io
   resourceVersion: "1515"
   uid: 4c119411-9272-442d-83ac-bbcb598012af
@@ -91,6 +91,9 @@
     - jsonPath: .metadata.creationTimestamp
       name: Age
       type: date
+    deprecated: true
+    deprecationWarning: snapshot.storage.k8s.io/v1beta1 VolumeSnapshotClass is deprecated;
+      use snapshot.storage.k8s.io/v1 VolumeSnapshotClass
     name: v1beta1
     schema:
       openAPIV3Schema:
diff -u -N /var/folders/kc/jv1f0gpx6671wxsfd_0hzbbm0000gp/T/LIVE-3604708064/apiextensions.k8s.io.v1.CustomResourceDefinition..volumesnapshotcontents.snapshot.storage.k8s.io /var/folders/kc/jv1f0gpx6671wxsfd_0hzbbm0000gp/T/MERGED-3996406821/apiextensions.k8s.io.v1.CustomResourceDefinition..volumesnapshotcontents.snapshot.storage.k8s.io
--- /var/folders/kc/jv1f0gpx6671wxsfd_0hzbbm0000gp/T/LIVE-3604708064/apiextensions.k8s.io.v1.CustomResourceDefinition..volumesnapshotcontents.snapshot.storage.k8s.io	2024-04-19 17:57:16
+++ /var/folders/kc/jv1f0gpx6671wxsfd_0hzbbm0000gp/T/MERGED-3996406821/apiextensions.k8s.io.v1.CustomResourceDefinition..volumesnapshotcontents.snapshot.storage.k8s.io	2024-04-19 17:57:16
@@ -5,7 +5,7 @@
     api-approved.kubernetes.io: https://github.com/kubernetes-csi/external-snapshotter/pull/419
     controller-gen.kubebuilder.io/version: v0.4.0
   creationTimestamp: "2024-02-04T06:08:02Z"
-  generation: 1
+  generation: 2
   name: volumesnapshotcontents.snapshot.storage.k8s.io
   resourceVersion: "1521"
   uid: f933ddad-f47f-4dcf-92fc-b118f1743edc
@@ -183,9 +183,9 @@
                   with the "creation_time" value returned from the CSI "ListSnapshots"
                   gRPC call if the driver supports it. If not specified, it indicates
                   the creation time is unknown. The format of this field is a Unix
-                  nanoseconds time encoded as an int64. On Unix, the command date
-                  +%s%N returns the current time in nanoseconds since 1970-01-01 00:00:00
-                  UTC.
+                  nanoseconds time encoded as an int64. On Unix, the command `date
+                  +%s%N` returns the current time in nanoseconds since 1970-01-01
+                  00:00:00 UTC.
                 format: int64
                 type: integer
               error:
@@ -272,6 +272,9 @@
     - jsonPath: .metadata.creationTimestamp
       name: Age
       type: date
+    deprecated: true
+    deprecationWarning: snapshot.storage.k8s.io/v1beta1 VolumeSnapshotContent is deprecated;
+      use snapshot.storage.k8s.io/v1 VolumeSnapshotContent
     name: v1beta1
     schema:
       openAPIV3Schema:
@@ -398,9 +401,9 @@
                   with the "creation_time" value returned from the CSI "ListSnapshots"
                   gRPC call if the driver supports it. If not specified, it indicates
                   the creation time is unknown. The format of this field is a Unix
-                  nanoseconds time encoded as an int64. On Unix, the command date
-                  +%s%N returns the current time in nanoseconds since 1970-01-01 00:00:00
-                  UTC.
+                  nanoseconds time encoded as an int64. On Unix, the command `date
+                  +%s%N` returns the current time in nanoseconds since 1970-01-01
+                  00:00:00 UTC.
                 format: int64
                 type: integer
               error:
diff -u -N /var/folders/kc/jv1f0gpx6671wxsfd_0hzbbm0000gp/T/LIVE-3604708064/apiextensions.k8s.io.v1.CustomResourceDefinition..volumesnapshots.snapshot.storage.k8s.io /var/folders/kc/jv1f0gpx6671wxsfd_0hzbbm0000gp/T/MERGED-3996406821/apiextensions.k8s.io.v1.CustomResourceDefinition..volumesnapshots.snapshot.storage.k8s.io
--- /var/folders/kc/jv1f0gpx6671wxsfd_0hzbbm0000gp/T/LIVE-3604708064/apiextensions.k8s.io.v1.CustomResourceDefinition..volumesnapshots.snapshot.storage.k8s.io	2024-04-19 17:57:16
+++ /var/folders/kc/jv1f0gpx6671wxsfd_0hzbbm0000gp/T/MERGED-3996406821/apiextensions.k8s.io.v1.CustomResourceDefinition..volumesnapshots.snapshot.storage.k8s.io	2024-04-19 17:57:16
@@ -5,7 +5,7 @@
     api-approved.kubernetes.io: https://github.com/kubernetes-csi/external-snapshotter/pull/419
     controller-gen.kubebuilder.io/version: v0.4.0
   creationTimestamp: "2024-02-04T06:08:02Z"
-  generation: 1
+  generation: 2
   name: volumesnapshots.snapshot.storage.k8s.io
   resourceVersion: "1523"
   uid: ba71efb8-2d57-43ee-a952-22b6105fa4f5
@@ -240,6 +240,9 @@
     - jsonPath: .metadata.creationTimestamp
       name: Age
       type: date
+    deprecated: true
+    deprecationWarning: snapshot.storage.k8s.io/v1beta1 VolumeSnapshot is deprecated;
+      use snapshot.storage.k8s.io/v1 VolumeSnapshot
     name: v1beta1
     schema:
       openAPIV3Schema:

I would like to use another PR to upgrade the CRDs

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 17, 2024
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 18, 2024
@huww98
Copy link
Contributor Author

huww98 commented May 22, 2024

I found that helm will refuse to install the chart if the CRDs are rendered in templates. We instead put them in crds directory now and install them unconditionally.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 27, 2024
@k8s-ci-robot k8s-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels May 28, 2024
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants