-
Notifications
You must be signed in to change notification settings - Fork 48
Manilla: Share Type Controller #681
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| /* | ||
| Copyright The ORC Authors. | ||
|
|
||
| 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 v1alpha1 | ||
|
|
||
| // ShareTypeResourceSpec contains the desired state of the resource. | ||
| // All fields are immutable after creation. | ||
| // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ShareTypeResourceSpec is immutable" | ||
| type ShareTypeResourceSpec struct { | ||
| // name will be the name of the created resource. If not specified, the | ||
| // name of the ORC object will be used. | ||
| // +optional | ||
| Name *OpenStackName `json:"name,omitempty"` | ||
|
|
||
| // isPublic indicates whether a share type is publicly accessible. | ||
| // +kubebuilder:default:=true | ||
| // +optional | ||
| IsPublic *bool `json:"isPublic,omitempty"` | ||
|
|
||
| // driverHandlesShareServers defines the driver mode for share server, or storage, life cycle management. | ||
| // This is a required extra specification for share types. | ||
| // +kubebuilder:default:=true | ||
| // +optional | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Per the API documentation, this field should be required.
Also, considering this field as required, I think we may want to remove the default value and let the user pass it. |
||
| DriverHandlesShareServers *bool `json:"driverHandlesShareServers,omitempty"` | ||
|
|
||
| // snapshotSupport filters back ends by whether they do or do not support share snapshots. | ||
| // +optional | ||
| SnapshotSupport *bool `json:"snapshotSupport,omitempty"` | ||
| } | ||
|
|
||
| // ShareTypeFilter defines an existing resource by its properties | ||
| // +kubebuilder:validation:MinProperties:=1 | ||
| type ShareTypeFilter struct { | ||
| // name of the existing resource | ||
| // +optional | ||
| Name *OpenStackName `json:"name,omitempty"` | ||
|
|
||
| // isPublic selects public types, private types, or both | ||
| // +optional | ||
| IsPublic *bool `json:"isPublic,omitempty"` | ||
| } | ||
|
|
||
| // ShareTypeResourceStatus represents the observed state of the resource. | ||
| type ShareTypeResourceStatus struct { | ||
| // name is a Human-readable name for the resource. Might not be unique. | ||
| // +kubebuilder:validation:MaxLength=1024 | ||
| // +optional | ||
| Name string `json:"name,omitempty"` | ||
|
|
||
| // isPublic indicates whether a share type is publicly accessible. | ||
| // +optional | ||
| IsPublic bool `json:"isPublic,omitempty"` | ||
|
|
||
| // extraSpecs contains the extra specifications for the share type. | ||
| // +optional | ||
| ExtraSpecs map[string]string `json:"extraSpecs,omitempty"` | ||
| } | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
This is because Gophercloud currently does not implement the update operation for Share types, right? If this is the case, +1 for keeping it as immutable.