-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Aleksandr Zimin <[email protected]>
- Loading branch information
1 parent
3d4de2a
commit fb237a4
Showing
39 changed files
with
2,596 additions
and
3,659 deletions.
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
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,32 @@ | ||
--- | ||
title: "Модуль csi-huawei: примеры" | ||
--- | ||
|
||
## Пример описания `HuaweiStorageConnection` | ||
|
||
```yaml | ||
apiVersion: storage.deckhouse.io/v1alpha1 | ||
kind: HuaweiStorageConnection | ||
metadata: | ||
name: hs-1 | ||
spec: | ||
storageType: OceanStorSAN | ||
pools: | ||
- storage-pool-1 | ||
- storage-pool-2 | ||
urls: | ||
- 172.22.1.10 | ||
- 172.22.1.11 | ||
login: "user-1" | ||
password: "secret-password" | ||
protocol: ISCSI | ||
portals: | ||
- portal1 | ||
maxClientThreads: 30 | ||
``` | ||
- Проверить создание объекта можно командой (Phase должен быть `Created`): | ||
|
||
```shell | ||
kubectl get huaweistorageconnection <имя cephclusterconnection> | ||
``` |
File renamed without changes.
102 changes: 102 additions & 0 deletions
102
images/controller/src/api/storage.deckhouse.io/v1alpha1/huawei_storage_connection.go
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,102 @@ | ||
/* | ||
Copyright 2024 Flant JSC | ||
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 | ||
|
||
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
|
||
const ( | ||
HuaweiStorageConnectionProtocolISCSI = "ISCSI" | ||
HuaweiStorageConnectionProtocolFC = "FC" | ||
HuaweiStorageConnectionProtocolROCE = "ROCE" | ||
HuaweiStorageConnectionProtocolFCnvme = "FC-NVME" | ||
HuaweiStorageConnectionProtocolNFS = "NFS" | ||
HuaweiStorageConnectionProtocolDPC = "DPC" | ||
HuaweiStorageConnectionProtocolSCSI = "SCSI" | ||
|
||
HuaweiStorageConnectionStorageTypeOceanStorSAN = "OceanStorSAN" | ||
HuaweiStorageConnectionStorageTypeOceanStorNAS = "OceanStorNAS" | ||
HuaweiStorageConnectionStorageTypeOceanStorDtree = "OceanStorDtree" | ||
HuaweiStorageConnectionStorageTypeFusionStorageSAN = "FusionStorageSAN" | ||
HuaweiStorageConnectionStorageTypeFusionStorageNAS = "FusionStorageNAS" | ||
) | ||
|
||
var ( | ||
HuaweiStorageConnectionProtocols = []string{ | ||
HuaweiStorageConnectionProtocolISCSI, | ||
HuaweiStorageConnectionProtocolFC, | ||
HuaweiStorageConnectionProtocolROCE, | ||
HuaweiStorageConnectionProtocolFCnvme, | ||
HuaweiStorageConnectionProtocolDPC, | ||
HuaweiStorageConnectionProtocolSCSI, | ||
} | ||
|
||
HuaweiStorageProtocolMapping = map[string]string{ | ||
HuaweiStorageConnectionProtocolISCSI: "iscsi", | ||
HuaweiStorageConnectionProtocolFC: "fc", | ||
HuaweiStorageConnectionProtocolROCE: "roce", | ||
HuaweiStorageConnectionProtocolFCnvme: "fc-nvme", | ||
HuaweiStorageConnectionProtocolNFS: "nfs", | ||
HuaweiStorageConnectionProtocolDPC: "dpc", | ||
HuaweiStorageConnectionProtocolSCSI: "scsi", | ||
} | ||
|
||
HuaweiStorageConnectionStorageTypes = []string{ | ||
HuaweiStorageConnectionStorageTypeOceanStorSAN, | ||
HuaweiStorageConnectionStorageTypeOceanStorNAS, | ||
HuaweiStorageConnectionStorageTypeOceanStorDtree, | ||
HuaweiStorageConnectionStorageTypeFusionStorageSAN, | ||
HuaweiStorageConnectionStorageTypeFusionStorageNAS, | ||
} | ||
|
||
HuaweiStorageTypeMapping = map[string]string{ | ||
HuaweiStorageConnectionStorageTypeOceanStorSAN: "oceanstor-san", | ||
HuaweiStorageConnectionStorageTypeOceanStorNAS: "oceanstor-nas", | ||
HuaweiStorageConnectionStorageTypeOceanStorDtree: "oceanstor-dtree", | ||
HuaweiStorageConnectionStorageTypeFusionStorageSAN: "fusionstorage-san", | ||
HuaweiStorageConnectionStorageTypeFusionStorageNAS: "fusionstorage-nas", | ||
} | ||
) | ||
|
||
type HuaweiStorageConnection struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
Spec HuaweiStorageConnectionSpec `json:"spec"` | ||
Status *HuaweiStorageConnectionStatus `json:"status,omitempty"` | ||
} | ||
|
||
// HuaweiStorageConnectionList contains a list of empty block device | ||
type HuaweiStorageConnectionList struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ListMeta `json:"metadata"` | ||
Items []HuaweiStorageConnection `json:"items"` | ||
} | ||
|
||
type HuaweiStorageConnectionSpec struct { | ||
StorageType string `json:"storageType"` | ||
Pools []string `json:"pools"` | ||
URLs []string `json:"urls"` | ||
Login string `json:"login"` | ||
Password string `json:"password"` | ||
Protocol string `json:"protocol"` | ||
Portals []string `json:"portals"` | ||
MaxClientThreads int `json:"maxClientThreads"` | ||
} | ||
|
||
type HuaweiStorageConnectionStatus struct { | ||
Phase string `json:"phase,omitempty"` | ||
Reason string `json:"reason,omitempty"` | ||
} |
37 changes: 37 additions & 0 deletions
37
images/controller/src/api/storage.deckhouse.io/v1alpha1/json_schemas.go
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,37 @@ | ||
/* | ||
Copyright 2024 Flant JSC | ||
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 | ||
|
||
type HuaweiCSIConfigMapData struct { | ||
Backends Backend `json:"backends"` | ||
} | ||
|
||
type Backend struct { | ||
Name string `json:"name"` | ||
Namespace string `json:"namespace"` | ||
Storage string `json:"storage"` | ||
URLs []string `json:"urls"` | ||
Pools []string `json:"pools"` | ||
MaxClientThreads string `json:"maxClientThreads"` | ||
Provisioner string `json:"provisioner"` | ||
Parameters BackendParameters `json:"parameters"` | ||
} | ||
|
||
type BackendParameters struct { | ||
Protocol string `json:"protocol"` | ||
Portals []string `json:"portals,omitempty"` | ||
} |
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
79 changes: 79 additions & 0 deletions
79
images/controller/src/api/storage.deckhouse.io/v1alpha1/zz_generated.deepcopy.go
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,79 @@ | ||
/* | ||
Copyright 2024 Flant JSC | ||
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 | ||
|
||
import "k8s.io/apimachinery/pkg/runtime" | ||
|
||
// HuaweiStorageConnection | ||
|
||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. | ||
func (in *HuaweiStorageConnection) DeepCopyInto(out *HuaweiStorageConnection) { | ||
*out = *in | ||
out.TypeMeta = in.TypeMeta | ||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) | ||
|
||
} | ||
|
||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EmptyBlockDevice. | ||
func (in *HuaweiStorageConnection) DeepCopy() *HuaweiStorageConnection { | ||
if in == nil { | ||
return nil | ||
} | ||
out := new(HuaweiStorageConnection) | ||
in.DeepCopyInto(out) | ||
return out | ||
} | ||
|
||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. | ||
func (in *HuaweiStorageConnection) DeepCopyObject() runtime.Object { | ||
if c := in.DeepCopy(); c != nil { | ||
return c | ||
} | ||
return nil | ||
} | ||
|
||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. | ||
func (in *HuaweiStorageConnectionList) DeepCopyInto(out *HuaweiStorageConnectionList) { | ||
*out = *in | ||
out.TypeMeta = in.TypeMeta | ||
in.ListMeta.DeepCopyInto(&out.ListMeta) | ||
if in.Items != nil { | ||
in, out := &in.Items, &out.Items | ||
*out = make([]HuaweiStorageConnection, len(*in)) | ||
for i := range *in { | ||
(*in)[i].DeepCopyInto(&(*out)[i]) | ||
} | ||
} | ||
} | ||
|
||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GuestbookList. | ||
func (in *HuaweiStorageConnectionList) DeepCopy() *HuaweiStorageConnectionList { | ||
if in == nil { | ||
return nil | ||
} | ||
out := new(HuaweiStorageConnectionList) | ||
in.DeepCopyInto(out) | ||
return out | ||
} | ||
|
||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. | ||
func (in *HuaweiStorageConnectionList) DeepCopyObject() runtime.Object { | ||
if c := in.DeepCopy(); c != nil { | ||
return c | ||
} | ||
return nil | ||
} |
44 changes: 0 additions & 44 deletions
44
images/controller/src/api/v1alpha1/ceph_cluster_authentication.go
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.