-
Notifications
You must be signed in to change notification settings - Fork 335
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(platform): validate storage info (#2093)
- Loading branch information
Lis
authored
Sep 29, 2022
1 parent
b850a39
commit 4ba2d41
Showing
4 changed files
with
213 additions
and
4 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
61 changes: 61 additions & 0 deletions
61
pkg/platform/provider/baremetal/validation/overridevalue.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,61 @@ | ||
/* | ||
* Tencent is pleased to support the open source community by making TKEStack | ||
* available. | ||
* | ||
* Copyright (C) 2012-2019 Tencent. 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 | ||
* | ||
* https://opensource.org/licenses/Apache-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 OF ANY KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations under the License. | ||
*/ | ||
|
||
package validation | ||
|
||
// StorageOverrideValue contains all the storage info used to validate from localization OverrideConfig | ||
type StorageOverrideValue struct { | ||
Global StorageGlobalCfg `json:"global"` | ||
NfsSubdirExternalProvisioner NfsSubdirExternalProvisioner `json:"nfs-subdir-external-provisioner"` | ||
CephCsiCephfs CephCsiCephfs `json:"ceph-csi-cephfs"` | ||
} | ||
type StorageGlobalCfg struct { | ||
EnableNFS bool `json:"enableNFS"` | ||
EnableCephFS bool `json:"enableCephFS"` | ||
} | ||
type Nfs struct { | ||
Server string `json:"server"` | ||
Path string `json:"path"` | ||
} | ||
type NfsSubdirExternalProvisioner struct { | ||
Nfs Nfs `json:"nfs"` | ||
} | ||
type CsiConfig struct { | ||
ClusterID string `json:"clusterID"` | ||
Monitors []string `json:"monitors"` | ||
} | ||
type StorageClass struct { | ||
ClusterID string `json:"clusterID"` | ||
FsName string `json:"fsName"` | ||
} | ||
type CephCsiSecret struct { | ||
AdminID string `json:"adminID"` | ||
AdminKey string `json:"adminKey"` | ||
} | ||
type CephCsiCephfs struct { | ||
CsiConfig []CsiConfig `json:"csiConfig"` | ||
StorageClass StorageClass `json:"storageClass"` | ||
Secret CephCsiSecret `json:"secret"` | ||
} | ||
|
||
type StorageInfo struct { | ||
EnableNFS bool | ||
EnableCephfs bool | ||
Nfs Nfs | ||
CsiConfig CsiConfig | ||
} |
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