From c4c073c3f97fbc7c81a5cf21de8e736ed7372697 Mon Sep 17 00:00:00 2001 From: gabemontero Date: Tue, 5 Oct 2021 12:55:31 -0400 Subject: [PATCH 1/3] switch to final agreed upon name for shared resource csi driver name --- operator/v1/types_csi_cluster_driver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/operator/v1/types_csi_cluster_driver.go b/operator/v1/types_csi_cluster_driver.go index beff5e93b74..827c76dd813 100644 --- a/operator/v1/types_csi_cluster_driver.go +++ b/operator/v1/types_csi_cluster_driver.go @@ -52,7 +52,7 @@ const ( ManilaCSIDriver CSIDriverName = "manila.csi.openstack.org" OvirtCSIDriver CSIDriverName = "csi.ovirt.org" KubevirtCSIDriver CSIDriverName = "csi.kubevirt.io" - SharedResourcesCSIDriver CSIDriverName = "csi.shared-resources.openshift.io" + SharedResourcesCSIDriver CSIDriverName = "csi.sharedresource.openshift.io" AlibabaDiskCSIDriver CSIDriverName = "diskplugin.csi.alibabacloud.com" IBMVPCBlockCSIDriver CSIDriverName = "vpc.block.csi.ibm.io" ) From b0bc582a200b011593369e3eb73e9a2dfe52106c Mon Sep 17 00:00:00 2001 From: gabemontero Date: Tue, 5 Oct 2021 15:39:32 -0400 Subject: [PATCH 2/3] ConfigMapReference -> SharedConfigMapReference --- sharedresource/v1alpha1/types_shared_configmap.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sharedresource/v1alpha1/types_shared_configmap.go b/sharedresource/v1alpha1/types_shared_configmap.go index fee35d02706..0032b8a8924 100644 --- a/sharedresource/v1alpha1/types_shared_configmap.go +++ b/sharedresource/v1alpha1/types_shared_configmap.go @@ -59,8 +59,8 @@ type SharedConfigMapList struct { Items []SharedConfigMap `json:"items"` } -// ConfigMapReference contains information about which ConfigMap to share -type ConfigMapReference struct { +// SharedConfigMapReference contains information about which ConfigMap to share +type SharedConfigMapReference struct { // name represents the name of the ConfigMap that is being referenced. // +kubebuilder:validation:Required Name string `json:"name"` @@ -74,7 +74,7 @@ type ConfigMapReference struct { type SharedConfigMapSpec struct { //configMapRef is a reference to the ConfigMap to share // +kubebuilder:validation:Required - ConfigMapRef ConfigMapReference `json:"configMapRef"` + ConfigMapRef SharedConfigMapReference `json:"configMapRef"` // description is a user readable explanation of what the backing resource provides. Description string `json:"description,omitempty"` } From 6590cc93ed195ea0449183982b8f2148b0817e44 Mon Sep 17 00:00:00 2001 From: gabemontero Date: Tue, 5 Oct 2021 15:40:28 -0400 Subject: [PATCH 3/3] make update --- .../v1alpha1/zz_generated.deepcopy.go | 32 +++++++++---------- .../zz_generated.swagger_doc_generated.go | 20 ++++++------ 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/sharedresource/v1alpha1/zz_generated.deepcopy.go b/sharedresource/v1alpha1/zz_generated.deepcopy.go index 593b5a46b7f..3c6bf8b4296 100644 --- a/sharedresource/v1alpha1/zz_generated.deepcopy.go +++ b/sharedresource/v1alpha1/zz_generated.deepcopy.go @@ -9,22 +9,6 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConfigMapReference) DeepCopyInto(out *ConfigMapReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapReference. -func (in *ConfigMapReference) DeepCopy() *ConfigMapReference { - if in == nil { - return nil - } - out := new(ConfigMapReference) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SharedConfigMap) DeepCopyInto(out *SharedConfigMap) { *out = *in @@ -86,6 +70,22 @@ func (in *SharedConfigMapList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SharedConfigMapReference) DeepCopyInto(out *SharedConfigMapReference) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedConfigMapReference. +func (in *SharedConfigMapReference) DeepCopy() *SharedConfigMapReference { + if in == nil { + return nil + } + out := new(SharedConfigMapReference) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SharedConfigMapSpec) DeepCopyInto(out *SharedConfigMapSpec) { *out = *in diff --git a/sharedresource/v1alpha1/zz_generated.swagger_doc_generated.go b/sharedresource/v1alpha1/zz_generated.swagger_doc_generated.go index 65189405274..94cfc12fd9a 100644 --- a/sharedresource/v1alpha1/zz_generated.swagger_doc_generated.go +++ b/sharedresource/v1alpha1/zz_generated.swagger_doc_generated.go @@ -11,16 +11,6 @@ package v1alpha1 // Those methods can be generated by using hack/update-swagger-docs.sh // AUTO-GENERATED FUNCTIONS START HERE -var map_ConfigMapReference = map[string]string{ - "": "ConfigMapReference contains information about which ConfigMap to share", - "name": "name represents the name of the ConfigMap that is being referenced.", - "namespace": "namespace represents the namespace where the referenced ConfigMap is located.", -} - -func (ConfigMapReference) SwaggerDoc() map[string]string { - return map_ConfigMapReference -} - var map_SharedConfigMap = map[string]string{ "": "SharedConfigMap allows a ConfigMap to be shared across namespaces. Pods can mount the shared ConfigMap by adding a CSI volume to the pod specification using the \"csi.sharedresource.openshift.io\" CSI driver and a reference to the SharedConfigMap in the volume attributes:\n\nspec:\n volumes:\n - name: shared-configmap\n csi:\n driver: csi.sharedresource.openshift.io\n volumeAttributes:\n sharedConfigMap: my-share\n\nFor the mount to be successful, the pod's service account must be granted permission to 'use' the named SharedConfigMap object within its namespace with an appropriate Role and RoleBinding. For compactness, here are example `oc` invocations for creating such Role and RoleBinding objects.\n\n `oc create role shared-resource-my-share --verb=use --resource=sharedconfigmaps.sharedresource.openshift.io --resource-name=my-share`\n `oc create rolebinding shared-resource-my-share --role=shared-resource-my-share --serviceaccount=my-namespace:default`\n\nShared resource objects, in this case ConfigMaps, have default permissions of list, get, and watch for system authenticated users.\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. These capabilities should not be used by applications needing long term support.", "spec": "spec is the specification of the desired shared configmap", @@ -39,6 +29,16 @@ func (SharedConfigMapList) SwaggerDoc() map[string]string { return map_SharedConfigMapList } +var map_SharedConfigMapReference = map[string]string{ + "": "SharedConfigMapReference contains information about which ConfigMap to share", + "name": "name represents the name of the ConfigMap that is being referenced.", + "namespace": "namespace represents the namespace where the referenced ConfigMap is located.", +} + +func (SharedConfigMapReference) SwaggerDoc() map[string]string { + return map_SharedConfigMapReference +} + var map_SharedConfigMapSpec = map[string]string{ "": "SharedConfigMapSpec defines the desired state of a SharedConfigMap", "configMapRef": "configMapRef is a reference to the ConfigMap to share",