-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #124 from red-hat-storage/sync_ds--main
Syncing latest changes from main for ocs-client-operator
- Loading branch information
Showing
426 changed files
with
33,971 additions
and
22,760 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Build the manager binary | ||
FROM golang:1.20 as builder | ||
FROM golang:1.21 as builder | ||
|
||
WORKDIR /workspace | ||
|
||
|
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,92 @@ | ||
/* | ||
Copyright 2022 Red Hat, Inc. | ||
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" | ||
) | ||
|
||
type storageClaimState string | ||
|
||
const ( | ||
// StorageClaimInitializing represents Initializing state of StorageClaim | ||
StorageClaimInitializing storageClaimState = "Initializing" | ||
// StorageClaimValidating represents Validating state of StorageClaim | ||
StorageClaimValidating storageClaimState = "Validating" | ||
// StorageClaimFailed represents Failed state of StorageClaim | ||
StorageClaimFailed storageClaimState = "Failed" | ||
// StorageClaimCreating represents Configuring state of StorageClaim | ||
StorageClaimCreating storageClaimState = "Creating" | ||
// StorageClaimConfiguring represents Configuring state of StorageClaim | ||
StorageClaimConfiguring storageClaimState = "Configuring" | ||
// StorageClaimReady represents Ready state of StorageClaim | ||
StorageClaimReady storageClaimState = "Ready" | ||
// StorageClaimDeleting represents Deleting state of StorageClaim | ||
StorageClaimDeleting storageClaimState = "Deleting" | ||
) | ||
|
||
// StorageClaimStatus defines the observed state of StorageClaim | ||
type StorageClaimStatus struct { | ||
Phase storageClaimState `json:"phase,omitempty"` | ||
} | ||
|
||
type StorageClientNamespacedName struct { | ||
Name string `json:"name"` | ||
Namespace string `json:"namespace"` | ||
} | ||
|
||
// StorageClaimSpec defines the desired state of StorageClaim | ||
type StorageClaimSpec struct { | ||
//+kubebuilder:validation:Enum=block;sharedfile | ||
Type string `json:"type"` | ||
EncryptionMethod string `json:"encryptionMethod,omitempty"` | ||
StorageProfile string `json:"storageProfile,omitempty"` | ||
StorageClient *StorageClientNamespacedName `json:"storageClient"` | ||
} | ||
|
||
//+kubebuilder:object:root=true | ||
//+kubebuilder:subresource:status | ||
//+kubebuilder:resource:scope=Cluster | ||
//+kubebuilder:printcolumn:name="StorageType",type="string",JSONPath=".spec.type" | ||
//+kubebuilder:printcolumn:name="StorageProfile",type="string",JSONPath=".spec.storageProfile" | ||
//+kubebuilder:printcolumn:name="StorageClientName",type="string",JSONPath=".spec.storageClient.name" | ||
//+kubebuilder:printcolumn:name="StorageClientNamespace",type="string",JSONPath=".spec.storageClient.namespace" | ||
//+kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase" | ||
|
||
// StorageClaim is the Schema for the storageclaims API | ||
type StorageClaim struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
||
//+kubebuilder:validation:Required | ||
//+kubebuilder:validation:XValidation:rule="oldSelf == self",message="spec is immutable" | ||
Spec StorageClaimSpec `json:"spec,omitempty"` | ||
Status StorageClaimStatus `json:"status,omitempty"` | ||
} | ||
|
||
//+kubebuilder:object:root=true | ||
|
||
// StorageClaimList contains a list of StorageClaim | ||
type StorageClaimList struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ListMeta `json:"metadata,omitempty"` | ||
Items []StorageClaim `json:"items"` | ||
} | ||
|
||
func init() { | ||
SchemeBuilder.Register(&StorageClaim{}, &StorageClaimList{}) | ||
} |
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.