forked from csi-addons/kubernetes-csi-addons
-
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.
Merge pull request csi-addons#230 from red-hat-storage/sync_us--main
Syncing latest changes from upstream main for kubernetes-csi-addons
- Loading branch information
Showing
291 changed files
with
31,545 additions
and
94 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,67 @@ | ||
/* | ||
Copyright 2022 The Kubernetes-CSI-Addons Authors. | ||
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" | ||
) | ||
|
||
// NetworkFenceClassSpec specifies parameters that an underlying storage system uses | ||
// to get client for network fencing. Upon creating a NetworkFenceClass object, a RPC will be set | ||
// to the storage system that matches the provisioner to get the client for network fencing. | ||
// +kubebuilder:validation:XValidation:rule="has(self.parameters) == has(oldSelf.parameters)",message="parameters are immutable" | ||
type NetworkFenceClassSpec struct { | ||
// Provisioner is the name of storage provisioner | ||
// +kubebuilder:validation:Required | ||
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="provisioner is immutable" | ||
Provisioner string `json:"provisioner"` | ||
// Parameters is a key-value map with storage provisioner specific configurations for | ||
// creating volume replicas | ||
// +kubebuilder:validation:Optional | ||
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="parameters are immutable" | ||
Parameters map[string]string `json:"parameters,omitempty"` | ||
} | ||
|
||
// NetworkFenceClassStatus defines the observed state of NetworkFenceClass | ||
type NetworkFenceClassStatus struct { | ||
} | ||
|
||
//+kubebuilder:object:root=true | ||
//+kubebuilder:subresource:status | ||
//+kubebuilder:resource:scope=Cluster | ||
|
||
// NetworkFenceClass is the Schema for the networkfenceclasses API | ||
type NetworkFenceClass struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
||
Spec NetworkFenceClassSpec `json:"spec,omitempty"` | ||
Status NetworkFenceClassStatus `json:"status,omitempty"` | ||
} | ||
|
||
//+kubebuilder:object:root=true | ||
|
||
// NetworkFenceClassList contains a list of NetworkFenceClass | ||
type NetworkFenceClassList struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ListMeta `json:"metadata,omitempty"` | ||
Items []NetworkFenceClass `json:"items"` | ||
} | ||
|
||
func init() { | ||
SchemeBuilder.Register(&NetworkFenceClass{}, &NetworkFenceClassList{}) | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
74 changes: 74 additions & 0 deletions
74
config/crd/bases/csiaddons.openshift.io_networkfenceclasses.yaml
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,74 @@ | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.16.5 | ||
name: networkfenceclasses.csiaddons.openshift.io | ||
spec: | ||
group: csiaddons.openshift.io | ||
names: | ||
kind: NetworkFenceClass | ||
listKind: NetworkFenceClassList | ||
plural: networkfenceclasses | ||
singular: networkfenceclass | ||
scope: Cluster | ||
versions: | ||
- name: v1alpha1 | ||
schema: | ||
openAPIV3Schema: | ||
description: NetworkFenceClass is the Schema for the networkfenceclasses API | ||
properties: | ||
apiVersion: | ||
description: |- | ||
APIVersion defines the versioned schema of this representation of an object. | ||
Servers should convert recognized schemas to the latest internal value, and | ||
may reject unrecognized values. | ||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | ||
type: string | ||
kind: | ||
description: |- | ||
Kind is a string value representing the REST resource this object represents. | ||
Servers may infer this from the endpoint the client submits requests to. | ||
Cannot be updated. | ||
In CamelCase. | ||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | ||
type: string | ||
metadata: | ||
type: object | ||
spec: | ||
description: |- | ||
NetworkFenceClassSpec specifies parameters that an underlying storage system uses | ||
to get client for network fencing. Upon creating a NetworkFenceClass object, a RPC will be set | ||
to the storage system that matches the provisioner to get the client for network fencing. | ||
properties: | ||
parameters: | ||
additionalProperties: | ||
type: string | ||
description: |- | ||
Parameters is a key-value map with storage provisioner specific configurations for | ||
creating volume replicas | ||
type: object | ||
x-kubernetes-validations: | ||
- message: parameters are immutable | ||
rule: self == oldSelf | ||
provisioner: | ||
description: Provisioner is the name of storage provisioner | ||
type: string | ||
x-kubernetes-validations: | ||
- message: provisioner is immutable | ||
rule: self == oldSelf | ||
required: | ||
- provisioner | ||
type: object | ||
x-kubernetes-validations: | ||
- message: parameters are immutable | ||
rule: has(self.parameters) == has(oldSelf.parameters) | ||
status: | ||
description: NetworkFenceClassStatus defines the observed state of NetworkFenceClass | ||
type: object | ||
type: object | ||
served: true | ||
storage: true | ||
subresources: | ||
status: {} |
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,27 @@ | ||
# permissions for end users to edit networkfenceclasses. | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: kubernetes-csi-addons | ||
app.kubernetes.io/managed-by: kustomize | ||
name: csiaddons-networkfenceclass-editor-role | ||
rules: | ||
- apiGroups: | ||
- csiaddons.openshift.io | ||
resources: | ||
- networkfenceclasses | ||
verbs: | ||
- create | ||
- delete | ||
- get | ||
- list | ||
- patch | ||
- update | ||
- watch | ||
- apiGroups: | ||
- csiaddons.openshift.io | ||
resources: | ||
- networkfenceclasses/status | ||
verbs: | ||
- get |
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,23 @@ | ||
# permissions for end users to view networkfenceclasses. | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: kubernetes-csi-addons | ||
app.kubernetes.io/managed-by: kustomize | ||
name: csiaddons-networkfenceclass-viewer-role | ||
rules: | ||
- apiGroups: | ||
- csiaddons.openshift.io | ||
resources: | ||
- networkfenceclasses | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- csiaddons.openshift.io | ||
resources: | ||
- networkfenceclasses/status | ||
verbs: | ||
- get |
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,9 @@ | ||
apiVersion: csiaddons.openshift.io/v1alpha1 | ||
kind: NetworkFenceClass | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: kubernetes-csi-addons | ||
app.kubernetes.io/managed-by: kustomize | ||
name: networkfenceclass-sample | ||
spec: | ||
# TODO(user): Add fields here |
Oops, something went wrong.