Skip to content

Commit

Permalink
remove the storageprofile apis
Browse files Browse the repository at this point in the history
storageprofile was depricated and it is not used

remove changes of below commits:
8809ca0 #2276
c29859e #2288

Signed-off-by: Nitin Goyal <[email protected]>
  • Loading branch information
iamniting committed Feb 5, 2025
1 parent e2ee49f commit 8e4ec5d
Show file tree
Hide file tree
Showing 25 changed files with 13 additions and 973 deletions.
8 changes: 0 additions & 8 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,6 @@ resources:
kind: OCSInitialization
path: github.com/red-hat-storage/ocs-operator/api/v4/v1
version: v1
- api:
crdVersion: v1
namespaced: true
domain: openshift.io
group: ocs
kind: StorageProfile
path: github.com/red-hat-storage/ocs-operator/api/v4/v1
version: v1
- api:
crdVersion: v1
namespaced: true
Expand Down
1 change: 0 additions & 1 deletion api/v1/groupversion_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(GroupVersion,
&OCSInitialization{}, &OCSInitializationList{},
&StorageCluster{}, &StorageClusterList{},
&StorageProfile{}, &StorageProfileList{},
&StorageClusterPeer{}, &StorageClusterPeerList{},
)
metav1.AddToGroupVersion(scheme, GroupVersion)
Expand Down
93 changes: 0 additions & 93 deletions api/v1/storageprofile_types.go

This file was deleted.

91 changes: 0 additions & 91 deletions api/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions config/crd/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ resources:
- bases/ocs.openshift.io_storageclusters.yaml
- bases/ocs.openshift.io_storageconsumers.yaml
- bases/ocs.openshift.io_storagerequests.yaml
- bases/ocs.openshift.io_storageprofiles.yaml
- bases/ocs.openshift.io_storageclusterpeers.yaml
# +kubebuilder:scaffold:crdkustomizeresource

Expand All @@ -17,7 +16,6 @@ resources:
#- patches/webhook_in_storageclusters.yaml
#- patches/webhook_in_storageconsumers.yaml
#- patches/webhook_in_storagerequests.yaml
#- patches/webhook_in_storageprofiles.yaml
#- patches/webhook_in_storageclusterpeers.yaml
# +kubebuilder:scaffold:crdkustomizewebhookpatch

Expand All @@ -27,7 +25,6 @@ resources:
#- patches/cainjection_in_storageclusters.yaml
#- patches/cainjection_in_storageconsumers.yaml
#- patches/cainjection_in_storagerequests.yaml
#- patches/cainjection_in_storageprofiles.yaml
#- patches/cainjection_in_storageclusterpeers.yaml
# +kubebuilder:scaffold:crdkustomizecainjectionpatch

Expand Down
8 changes: 0 additions & 8 deletions config/crd/patches/cainjection_in_storageprofiles.yaml

This file was deleted.

17 changes: 0 additions & 17 deletions config/crd/patches/webhook_in_storageprofiles.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ spec:
apiservicedefinitions: {}
customresourcedefinitions:
owned:
- description: StorageProfile is the Schema for the storageprofiles API
displayName: Storage Profile
kind: StorageProfile
name: storageprofiles.ocs.openshift.io
version: v1
- description: OCSInitialization represents the initial data to be created when
the operator is installed.
displayName: OCS Initialization
Expand Down Expand Up @@ -44,11 +49,6 @@ spec:
kind: StorageConsumer
name: storageconsumers.ocs.openshift.io
version: v1alpha1
- description: StorageProfile is the Schema for the storageprofiles API
displayName: Storage Profile
kind: StorageProfile
name: storageprofiles.ocs.openshift.io
version: v1
- description: StorageRequest is the Schema for the StorageRequests API
displayName: Storage Request
kind: StorageRequest
Expand Down
24 changes: 0 additions & 24 deletions config/rbac/storageprofile_editor_role.yaml

This file was deleted.

20 changes: 0 additions & 20 deletions config/rbac/storageprofile_viewer_role.yaml

This file was deleted.

1 change: 0 additions & 1 deletion config/samples/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ resources:
- ocs_v1_ocsinitialization.yaml
- ocs_v1_storagecluster.yaml
- ocs_v1alpha1_storageconsumer.yaml
- ocs_v1_storageprofile.yaml
- ocs_v1_storageclusterpeer.yaml
# +kubebuilder:scaffold:manifestskustomizesamples
6 changes: 0 additions & 6 deletions config/samples/ocs_v1_storageprofile.yaml

This file was deleted.

22 changes: 4 additions & 18 deletions controllers/storagecluster/cephfilesystem_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,33 +22,19 @@ func TestCephFileSystem(t *testing.T) {
remoteStorageConsumers bool
}{
{
label: "Not in provider mode",
createRuntimeObjects: false,
remoteStorageConsumers: false,
},
{
label: "In provider mode",
createRuntimeObjects: false,
remoteStorageConsumers: true,
label: "case 1",
createRuntimeObjects: false,
},
}
spList := getMockStorageProfiles()

for _, c := range cases {
var objects []client.Object
t, reconciler, cr, request := initStorageClusterResourceCreateUpdateTest(t, objects, nil)

providerModeSpec := &api.StorageClusterSpec{
AllowRemoteStorageConsumers: c.remoteStorageConsumers,
ProviderAPIServerServiceType: "",
}

t, reconcilerOCSInit, cr, requestOCSInit, _ := initStorageClusterResourceCreateUpdateTestProviderMode(
t, objects, providerModeSpec, spList, c.remoteStorageConsumers)
if c.createRuntimeObjects {
objects = createUpdateRuntimeObjects(t) //nolint:staticcheck //no need to use objects as they update in runtime
}
assertCephFileSystem(t, reconcilerOCSInit, cr, requestOCSInit)

assertCephFileSystem(t, reconciler, cr, request)
}
}

Expand Down
Loading

0 comments on commit 8e4ec5d

Please sign in to comment.