-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge develop into master 1.10.0 (#267)
- Loading branch information
Arbel Nathan
authored
Jul 26, 2022
1 parent
85cc3c3
commit 6f6f9af
Showing
214 changed files
with
8,852 additions
and
22,152 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/** | ||
* Copyright 2022 IBM Corp. | ||
* | ||
* 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 | ||
|
||
type DriverPhase string | ||
|
||
const ( | ||
DriverPhaseNone DriverPhase = "" | ||
DriverPhaseCreating DriverPhase = "Creating" | ||
DriverPhaseRunning DriverPhase = "Running" | ||
DriverPhaseFailed DriverPhase = "Failed" | ||
) |
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,89 @@ | ||
/** | ||
* Copyright 2022 IBM Corp. | ||
* | ||
* 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 | ||
|
||
import ( | ||
corev1 "k8s.io/api/core/v1" | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! | ||
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. | ||
|
||
// HostDefinerSpec defines the desired state of HostDefiner | ||
type HostDefinerSpec struct { | ||
HostDefiner IBMBlockHostDefinerSpec `json:"hostDefiner"` | ||
|
||
ImagePullSecrets []string `json:"imagePullSecrets,omitempty"` | ||
} | ||
|
||
// IBMBlockHostDefinerSpec defines the observed state of HostDefiner | ||
type IBMBlockHostDefinerSpec struct { | ||
Repository string `json:"repository"` | ||
Tag string `json:"tag"` | ||
|
||
// +kubebuilder:validation:Optional | ||
Prefix string `json:"prefix"` | ||
// +kubebuilder:validation:Optional | ||
ConnectivityType string `json:"connectivityType"` | ||
// +kubebuilder:validation:Optional | ||
ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy"` | ||
// +kubebuilder:validation:Optional | ||
Affinity *corev1.Affinity `json:"affinity,omitempty"` | ||
// +kubebuilder:validation:Optional | ||
Tolerations []corev1.Toleration `json:"tolerations,omitempty"` | ||
// +kubebuilder:validation:Optional | ||
// +kubebuilder:default:=true | ||
AllowDelete bool `json:"allowDelete,omitempty"` | ||
// +kubebuilder:validation:Optional | ||
// +kubebuilder:default:=false | ||
DynamicNodeLabeling bool `json:"dynamicNodeLabeling,omitempty"` | ||
} | ||
|
||
// HostDefinerStatus defines the observed state of HostDefiner | ||
type HostDefinerStatus struct { | ||
Phase DriverPhase `json:"phase"` | ||
HostDefinerReady bool `json:"hostDefinerReady"` | ||
|
||
// Version is the current driver version | ||
Version string `json:"version"` | ||
} | ||
|
||
//+kubebuilder:object:root=true | ||
//+kubebuilder:subresource:status | ||
|
||
// HostDefiner is the Schema for the hostdefiners API | ||
type HostDefiner struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
||
Spec HostDefinerSpec `json:"spec,omitempty"` | ||
Status HostDefinerStatus `json:"status,omitempty"` | ||
} | ||
|
||
//+kubebuilder:object:root=true | ||
|
||
// HostDefinerList contains a list of HostDefiner | ||
type HostDefinerList struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ListMeta `json:"metadata,omitempty"` | ||
Items []HostDefiner `json:"items"` | ||
} | ||
|
||
func init() { | ||
SchemeBuilder.Register(&HostDefiner{}, &HostDefinerList{}) | ||
} |
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,75 @@ | ||
/** | ||
* Copyright 2019 IBM Corp. | ||
* | ||
* 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 | ||
|
||
import ( | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! | ||
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. | ||
|
||
// HostDefinitionSpec defines the desired state of HostDefinition | ||
type HostDefinitionSpec struct { | ||
HostDefinition Definition `json:"hostDefinition"` | ||
} | ||
|
||
// Definition defines the observed state of HostDefinition | ||
type Definition struct { | ||
NodeName string `json:"nodeName"` | ||
|
||
// +kubebuilder:validation:Optional | ||
SecretName string `json:"secretName"` | ||
// +kubebuilder:validation:Optional | ||
SecretNamespace string `json:"secretNamespace"` | ||
// +kubebuilder:validation:Optional | ||
NodeId string `json:"nodeId"` | ||
} | ||
|
||
// HostDefinitionStatus defines the status of the host definition on the storage | ||
type HostDefinitionStatus struct { | ||
Phase DriverPhase `json:"phase"` | ||
} | ||
|
||
//+kubebuilder:object:root=true | ||
//+kubebuilder:subresource:status | ||
//+kubebuilder:resource:scope=Cluster | ||
|
||
// HostDefinition is the Schema for the hostdefinitions API | ||
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" | ||
// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase` | ||
// +kubebuilder:printcolumn:name="Node",type=string,JSONPath=`.spec.hostDefinition.nodeName` | ||
type HostDefinition struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
||
Spec HostDefinitionSpec `json:"spec,omitempty"` | ||
Status HostDefinitionStatus `json:"status,omitempty"` | ||
} | ||
|
||
//+kubebuilder:object:root=true | ||
|
||
// HostDefinitionList contains a list of HostDefinition | ||
type HostDefinitionList struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ListMeta `json:"metadata,omitempty"` | ||
Items []HostDefinition `json:"items"` | ||
} | ||
|
||
func init() { | ||
SchemeBuilder.Register(&HostDefinition{}, &HostDefinitionList{}) | ||
} |
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.