-
Notifications
You must be signed in to change notification settings - Fork 185
add private volumeGroupSnapshotClass Api #3231
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 private volumeGroupSnapshotClass Api #3231
Conversation
Skipping CI for Draft Pull Request. |
5b497ae
to
d8434e5
Compare
d8434e5
to
e460058
Compare
62b40c0
to
e245e10
Compare
c18b915
to
afdefc9
Compare
bc4165b
to
d9e9f1f
Compare
/hold For testing |
fbd7319
to
74829d3
Compare
/unhold |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The second commit is not about the vendor changes only, It is about all generated changes. I would like to see them separate if possible.
dd277b8
to
660a179
Compare
660a179
to
dd822ec
Compare
services/provider/server/server.go
Outdated
|
||
resources := getKubeResourcesForClass( | ||
consumer.Spec.VolumeGroupSnapshotClasses, | ||
"VolumeGroupSnapshotClass", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should have the whole class display name here?volumegroupsnapshotclass.groupsnapshot.storage.openshift.io.
@@ -117,6 +117,33 @@ var ( | |||
}, | |||
} | |||
} | |||
createOdfVolumeGroupSnapshotClassCRD = func() *extv1.CustomResourceDefinition { | |||
pluralName := "volumegroupsnapshotclasses" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we are using this only once, we can hardcode it
dd822ec
to
03e502f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as controllers/storagecluster/odfvolumegroupsnapshotterclasses.go
is copy of existing similar code not leaving comments on that to behave the same way of public vgsc reconciliation.
@ShravaniVangur there is a actual test failure in CI, ptal. |
03e502f
to
d294738
Compare
/test ocs-operator-bundle-e2e-aws |
d294738
to
dde5929
Compare
based on offline discussion, below is the required fix diff --git a/services/provider/server/server.go b/services/provider/server/server.go
index f1bdf9c6c..744bd17b9 100644
--- a/services/provider/server/server.go
+++ b/services/provider/server/server.go
@@ -2079,7 +2079,7 @@ func getKubeResourcesForClass[T CommonClassSpecAccessors](
klog.Warningf("Encountered unsupported provisioner in %s: %s", classDisplayName, srcName)
} else if errors.Is(err, util.UnsupportedDriver) {
klog.Warningf("Encountered unsupported driver in %s: %s", classDisplayName, srcName)
- } else if srcKubeObj == nil {
+ } else if reflect.ValueOf(srcKubeObj).IsNil() {
klog.Warningf("The name %s does not points to a builtin or an existing %s, skipping", classDisplayName, srcName)
} else if srcKubeObj.GetLabels()[util.ExternalClassLabelKey] == "true" {
klog.Warningf("The %s is an external %s, skipping", srcName, classDisplayName)
@@ -2087,7 +2087,7 @@ func getKubeResourcesForClass[T CommonClassSpecAccessors](
srcClassCache[srcName] = srcKubeObj
}
}
- if srcKubeObj != nil {
+ if _, exist := srcClassCache[srcName]; exist {
distKubeObj := srcKubeObj.DeepCopyObject().(client.Object)
distKubeObj.SetName(destName)
kubeResources = append(kubeResources, distKubeObj) RC is very well explained in https://www.jerf.org/iri/post/2957/
|
Creates the resources for private vgsc api. Signed-off-by: ShravaniVangur <[email protected]>
Vendor changes Signed-off-by: ShravaniVangur <[email protected]>
Signed-off-by: ShravaniVangur <[email protected]>
dde5929
to
37fe0f0
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: iamniting, leelavg, ShravaniVangur The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
e9e6230
into
red-hat-storage:main
Updating the ocs-operator to import the private
volumegroupsnapshotclass
api,enabling access to and utilization of the private fork of the sidecar available at https://github.com/red-hat-storage/external-snapshotter.VolumeGroupSnapshotClass Creation PR: Ocs-Client-Operator
Result:
With featuregate enabled: