-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release PolarDB-X Operator v1.3.0-alpha.1
- Loading branch information
Showing
377 changed files
with
39,295 additions
and
779 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 was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
Copyright 2021 Alibaba Group Holding Limited. | ||
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 v1 | ||
|
||
// BackupStorageProvider defines the configuration of storage for storing backup files. | ||
type BackupStorageProvider struct { | ||
// StorageName defines the storage medium used to perform backup | ||
StorageName BackupStorage `json:"storageName,omitempty"` | ||
|
||
// Sink defines the storage configuration choose to perform backup | ||
Sink string `json:"sink,omitempty"` | ||
// TODO: Add Nas Provider | ||
} | ||
|
||
// BackupStorage defines the storage of backup | ||
type BackupStorage string | ||
|
||
const ( | ||
OSS BackupStorage = "oss" | ||
SFTP BackupStorage = "sftp" | ||
) |
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,56 @@ | ||
/* | ||
Copyright 2021 Alibaba Group Holding Limited. | ||
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 polardbx | ||
|
||
import "strings" | ||
|
||
type FileStorageInfo struct { | ||
// +kubebuilder:validation:Pattern=`^(?i)innodb|mrg_myisam|blackhole|myisam|csv|archive|performance_schema|federated|local_disk|s3|oss$` | ||
// +kubebuilder:validation:Required | ||
|
||
// Engine describes the engine type of file storage | ||
Engine string `json:"engine,omitempty"` | ||
} | ||
|
||
type EngineType string | ||
|
||
const ( | ||
EngineTypeInnodb EngineType = "INNODB" | ||
EngineTypeMrgMyisam EngineType = "MRG_MYISAM" | ||
EngineTypeBlackhole EngineType = "BLACKHOLE" | ||
EngineTypeMyisam EngineType = "MYISAM" | ||
EngineTypeCsv EngineType = "CSV" | ||
EngineTypeArchive EngineType = "ARCHIVE" | ||
EngineTypePerformanceSchema EngineType = "PERFORMANCE_SCHEMA" | ||
EngineTypeFederated EngineType = "FEDERATED" | ||
EngineTypeLocalDisk EngineType = "LOCAL_DISK" | ||
EngineTypeS3 EngineType = "S3" | ||
EngineTypeOss EngineType = "OSS" | ||
) | ||
|
||
func (info *FileStorageInfo) GetEngineType() EngineType { | ||
return EngineType(strings.ToUpper(info.Engine)) | ||
} | ||
|
||
func (info *FileStorageInfo) CheckEngineExists(existedFileStorages []FileStorageInfo) bool { | ||
for _, existedFileStorage := range existedFileStorages { | ||
if info.GetEngineType() == existedFileStorage.GetEngineType() { | ||
return true | ||
} | ||
} | ||
return false | ||
} |
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,33 @@ | ||
/* | ||
Copyright 2022 Alibaba Group Holding Limited. | ||
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 polardbx | ||
|
||
const ( | ||
RolingRestart = "rollingRestart" | ||
Restart = "restart" | ||
) | ||
|
||
type ParameterTemplate struct { | ||
// parameter template | ||
// +optional | ||
Name string `json:"name,omitempty"` | ||
} | ||
|
||
type RestartingPods struct { | ||
LastDeletedPod string `json:"lastDeletedPod,omitempty"` | ||
ToDeletePod []string `json:"toDeletePod,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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
Copyright 2021 Alibaba Group Holding Limited. | ||
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 polardbx | ||
|
||
import "k8s.io/apimachinery/pkg/util/intstr" | ||
|
||
type ReadonlyParam struct { | ||
CnReplicas int `json:"cnReplicas,omitempty"` | ||
Name string `json:"name,omitempty"` | ||
ExtraParams map[string]intstr.IntOrString `json:"extraParams,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
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.