-
Notifications
You must be signed in to change notification settings - Fork 33
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
[ISSUE-1018] Custom Storage Group Feature #997
Merged
Merged
Changes from 84 commits
Commits
Show all changes
91 commits
Select commit
Hold shift + click to select a range
e194e8d
add StorageGroup property in proto message
CraneShiEMC 59ad30d
generate types.pb.go from types.proto
CraneShiEMC 765ecc3
make non-lvg volume creation consistent with storage group label
CraneShiEMC 55b0e23
set storageGroup to volume CR
CraneShiEMC 49f10e6
support syncing storage group label to LVG CR if necessary
CraneShiEMC 4dde7f1
fix
CraneShiEMC e5a693a
fix UT
CraneShiEMC 2bb28ef
remove setting storageGroup property in volume CR eventually
CraneShiEMC 2fce327
sync driveCR's storage-group label to AC
CraneShiEMC f0b3c83
fix UT
CraneShiEMC 231f3ec
fix UT
CraneShiEMC 50506da
Merge branch 'master' into feature-storage-group-poc-non-lvg-manual-l…
CraneShiEMC 13a4df4
Merge branch 'master' into feature-storage-group-poc-non-lvg-manual-l…
CraneShiEMC a19fa0e
Merge branch 'master' into feature-storage-group-poc-manual-label-drive
CraneShiEMC 78e986e
rename and extract the storagegroup label key as constants
CraneShiEMC 833a677
sync the storage-group label removal from drives to ACs
CraneShiEMC 09f9f3b
Merge branch 'master' into feature-storage-group-initial
CraneShiEMC 7d57051
remove sync storage-group label from drive to AC in capacitycontroller
CraneShiEMC c7225e4
Revert "remove sync storage-group label from drive to AC in capacityc…
CraneShiEMC 7abaaf1
Add StorageGroup Schema Definition and generated files
CraneShiEMC dd2911c
refine StorageGroup definition
CraneShiEMC 946359e
Add storagegroup controller
CraneShiEMC 237a282
Add storagegroup crd to scheme
CraneShiEMC dc427b3
handling of storagegroup creation
CraneShiEMC 668f002
remove sync storage-group label from drive to AC in capacitycontroller
CraneShiEMC 16d96be
Merge branch 'master' into feature-storage-group-initial
CraneShiEMC bc2a375
fix
CraneShiEMC 3d75309
add debug log
CraneShiEMC 086146e
support storage-group deletion
CraneShiEMC c67ede0
Merge branch 'master' into feature-storage-group-initial
CraneShiEMC 92b82f6
Handle invalidField and make MatchFields ANDed
CraneShiEMC 0a17dbf
support NumberDrivesPerNode in DriveSelector
CraneShiEMC 87f1db9
fix & add log for noDriveSelected and invalidField
CraneShiEMC 7abce20
refine log
CraneShiEMC 0f72b5b
fix issue in noDriveSelected and numberDrivesPerNode support
CraneShiEMC f966767
refine log
CraneShiEMC 25d33cc
fix matchFields issue on bool type
CraneShiEMC 52f933f
fix the issue that drive with non-lvg volume may be selected
CraneShiEMC 3448a18
Merge branch 'master' into feature-storage-group-initial
CraneShiEMC 1802e7e
fix golint
CraneShiEMC 7f35687
fix golint
CraneShiEMC eb41273
refine handleStorageGroupCreation
CraneShiEMC b36a14d
refine handleStorageGroupCreation
CraneShiEMC 7d61b3f
refine to fix golint error
CraneShiEMC 03049a9
fix golint
CraneShiEMC baf7afb
refine log
CraneShiEMC bb78b37
Change storagegroup print column
CraneShiEMC 520144d
Merge branch 'master' into feature-storage-group-initial
CraneShiEMC 3636d47
support manual storage-group labeling on drive again
CraneShiEMC 566f49e
Merge branch 'feature-storage-group-initial' of https://github.com/de…
CraneShiEMC f035c0d
only watch storagegroup delete event in storagegroup controller
CraneShiEMC 381ff9c
Refactor func to add/rm sg label and enhance manual sg labeling
CraneShiEMC 80a56c8
support to get ac for drive with lvg in drive sg label sync
CraneShiEMC 09f27be
Merge branch 'master' into feature-storage-group-initial
CraneShiEMC 9d10619
now also include drive del event for storagegroup controller
CraneShiEMC 4c558f9
fix log error
CraneShiEMC 82597ba
fix that no del event of sg is caught
CraneShiEMC 1c10de2
refine log & add initial draft of func syncDriveOnAllStorageGroups
CraneShiEMC d02dc02
support simple status tracking of storagegroup
CraneShiEMC 8364271
add support of storage group label sync on new drive creation
CraneShiEMC a3bdbfd
fix lint error
CraneShiEMC ee055c8
fix lint error
CraneShiEMC d6b0c18
Merge branch 'master' into feature-storage-group-initial
CraneShiEMC 9d1f096
service procedure only supports storage group whose numDrivesPerNode …
CraneShiEMC bd75ce6
fix sg nil annotation panic error
CraneShiEMC 5565239
service procedure support of storage group whose numDrivesPerNode>0
CraneShiEMC caa6679
fix go lint error
CraneShiEMC aa1ec1d
fix issue in reconcile of sg with numberDrivesPerNode>0
CraneShiEMC ab28f47
refine logic for reconcile of sg with numDrivesPerNode>0
CraneShiEMC 0a6452d
sg label restore on drive selected by sg with numDrviesPerNode>0
CraneShiEMC d96429f
refine the logic to sync drive label on sg with numDrivesPerNode>0
CraneShiEMC 1dd0b14
Revert syncing storage group label to LVG CR if necessary
CraneShiEMC 17fa105
fix error in log
CraneShiEMC 046da2c
add more log for adding sg label to drive
CraneShiEMC 1634127
refine log
CraneShiEMC 3e9accd
refine code comment and increase UT coverage
CraneShiEMC fcaf2f6
try increase UT coverage
CraneShiEMC 077d75e
Merge branch 'master' into feature-storage-group-initial
CraneShiEMC 9eebed9
resolve review comments
CraneShiEMC 0ce6eee
refine storagegroupcontroller updateEventFilter & nil labels case handle
CraneShiEMC ad569d9
try fix golint
CraneShiEMC b2d9c09
try to fix golint
CraneShiEMC cba700d
fix devkit base image tag to 15.4 to resolve devkit image build failure
CraneShiEMC f9e8688
nil map can still work for map entry read
CraneShiEMC d4463f0
refine error handling and error log
CraneShiEMC daf9fc3
add comments to main function
CraneShiEMC d861003
refine error messages for labeling and label removal in sg handling
CraneShiEMC 6c9ec1f
removal some deprecated bool flags
CraneShiEMC 2e544de
sync storage group label to LVG CR if necessary
CraneShiEMC 8341362
refine sg ctrl's drive update event predicate to include drive removal
CraneShiEMC 04f731e
still only focus on drive sg label update event
CraneShiEMC File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
Copyright © 2020 Dell Inc. or its subsidiaries. All Rights Reserved. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
// Package sgcrd contains API Schema definitions for the StorageGroup v1 API group | ||
// +groupName=csi-baremetal.dell.com | ||
// +versionName=v1 | ||
package sgcrd | ||
|
||
import ( | ||
"k8s.io/apimachinery/pkg/runtime/schema" | ||
crScheme "sigs.k8s.io/controller-runtime/pkg/scheme" | ||
|
||
v1 "github.com/dell/csi-baremetal/api/v1" | ||
) | ||
|
||
var ( | ||
// GroupVersionStorageGroup is group version used to register these objects | ||
GroupVersionStorageGroup = schema.GroupVersion{Group: v1.CSICRsGroupVersion, Version: v1.Version} | ||
|
||
// SchemeBuilderStorageGroup is used to add go types to the GroupVersionKind scheme | ||
SchemeBuilderStorageGroup = &crScheme.Builder{GroupVersion: GroupVersionStorageGroup} | ||
|
||
// AddToSchemeStorageGroup adds the types in this group-version to the given scheme. | ||
AddToSchemeStorageGroup = SchemeBuilderStorageGroup.AddToScheme | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
Copyright © 2020 Dell Inc. or its subsidiaries. All Rights Reserved. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package sgcrd | ||
|
||
import ( | ||
api "github.com/dell/csi-baremetal/api/generated/v1" | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
// +kubebuilder:object:root=true | ||
|
||
// StorageGroup is the Schema for the StorageGroups API | ||
// +kubebuilder:resource:scope=Cluster,shortName={sg,sgs} | ||
// +kubebuilder:printcolumn:name="DRIVES_PER_NODE",type="string",JSONPath=".spec.driveSelector.numberDrivesPerNode",description="numberDrivesPerNode of StorageGroup's DriveSelector" | ||
// +kubebuilder:printcolumn:name="TYPE",type="string",JSONPath=".spec.driveSelector.matchFields.Type",description="Drive Type of StorageGroup's DriveSelector" | ||
// +kubebuilder:printcolumn:name="SLOT",type="string",JSONPath=".spec.driveSelector.matchFields.Slot",description="Drive Slot of StorageGroup's DriveSelector" | ||
// +kubebuilder:printcolumn:name="PATH",type="string",JSONPath=".spec.driveSelector.matchFields.Path",description="Drive Path of StorageGroup's DriveSelector" | ||
// +kubebuilder:printcolumn:name="SYSTEM",type="string",JSONPath=".spec.driveSelector.matchFields.IsSystem",description="Whether StorageGroup's DriveSelector to Select System Drive" | ||
type StorageGroup struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
Spec api.StorageGroupSpec `json:"spec,omitempty"` | ||
} | ||
|
||
// +kubebuilder:object:root=true | ||
|
||
// StorageGroupList contains a list of StorageGroup | ||
//+kubebuilder:object:generate=true | ||
type StorageGroupList struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ListMeta `json:"metadata,omitempty"` | ||
Items []StorageGroup `json:"items"` | ||
} | ||
|
||
func init() { | ||
SchemeBuilderStorageGroup.Register(&StorageGroup{}, &StorageGroupList{}) | ||
} | ||
|
||
func (in *StorageGroup) DeepCopyInto(out *StorageGroup) { | ||
*out = *in | ||
out.TypeMeta = in.TypeMeta | ||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) | ||
out.Spec = in.Spec | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
also here need a PR on csi-baremetal-operator to add the new sg crd definition there.
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've actually had a PR on csi-baremetal-operator for the corresponding storage group feature including the addition of sg crd, dell/csi-baremetal-operator#180... Sorry for forgetting to provide it for your review before...