Documentation ¶
Overview ¶
+groupName=sharedresource.openshift.io Package v1alplha1 is the v1alpha1 version of the API.
Index ¶
- Constants
- Variables
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- type SharedConfigMap
- type SharedConfigMapList
- type SharedConfigMapReference
- type SharedConfigMapSpec
- type SharedConfigMapStatus
- type SharedSecret
- type SharedSecretList
- type SharedSecretReference
- type SharedSecretSpec
- type SharedSecretStatus
Constants ¶
const ( Version = "v1alpha1" GroupName = "sharedresource.openshift.io" )
Variables ¶
var ( GroupVersion = schema.GroupVersion{Group: GroupName, Version: Version} SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // Install is a function which adds this version to a scheme Install = SchemeBuilder.AddToScheme // SchemeGroupVersion generated code relies on this name // Deprecated SchemeGroupVersion = GroupVersion // AddToScheme exists solely to keep the old generators creating valid code // DEPRECATED AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type SharedConfigMap ¶
type SharedConfigMap struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ObjectMeta `json:"metadata,omitempty"` // +required Spec SharedConfigMapSpec `json:"spec,omitempty"` Status SharedConfigMapStatus `json:"status,omitempty"` }
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:
spec:
volumes: - name: shared-configmap csi: driver: csi.sharedresource.openshift.io volumeAttributes: sharedConfigMap: my-share
For 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.
`oc create role shared-resource-my-share --verb=use --resource=sharedconfigmaps.sharedresource.openshift.io --resource-name=my-share` `oc create rolebinding shared-resource-my-share --role=shared-resource-my-share --serviceaccount=my-namespace:default`
Shared resource objects, in this case ConfigMaps, have default permissions of list, get, and watch for system authenticated users.
Compatibility 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. +kubebuilder:object:root=true +kubebuilder:resource:path=sharedconfigmaps,scope=Cluster +kubebuilder:subresource:status +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/979 +kubebuilder:metadata:annotations="description=Extension for sharing ConfigMaps across Namespaces" +kubebuilder:metadata:annotations="displayName=SharedConfigMap" +k8s:openapi-gen=true +openshift:compatibility-gen:level=4
func (*SharedConfigMap) DeepCopy ¶
func (in *SharedConfigMap) DeepCopy() *SharedConfigMap
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedConfigMap.
func (*SharedConfigMap) DeepCopyInto ¶
func (in *SharedConfigMap) DeepCopyInto(out *SharedConfigMap)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SharedConfigMap) DeepCopyObject ¶
func (in *SharedConfigMap) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (SharedConfigMap) SwaggerDoc ¶
func (SharedConfigMap) SwaggerDoc() map[string]string
type SharedConfigMapList ¶
type SharedConfigMapList struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ListMeta `json:"metadata,omitempty"` }
SharedConfigMapList contains a list of SharedConfigMap objects.
Compatibility 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. +openshift:compatibility-gen:level=4
func (*SharedConfigMapList) DeepCopy ¶
func (in *SharedConfigMapList) DeepCopy() *SharedConfigMapList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedConfigMapList.
func (*SharedConfigMapList) DeepCopyInto ¶
func (in *SharedConfigMapList) DeepCopyInto(out *SharedConfigMapList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SharedConfigMapList) DeepCopyObject ¶
func (in *SharedConfigMapList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (SharedConfigMapList) SwaggerDoc ¶
func (SharedConfigMapList) SwaggerDoc() map[string]string
type SharedConfigMapReference ¶
type SharedConfigMapReference struct { // +required Name string `json:"name"` // +required Namespace string `json:"namespace"` }
SharedConfigMapReference contains information about which ConfigMap to share
func (*SharedConfigMapReference) DeepCopy ¶
func (in *SharedConfigMapReference) DeepCopy() *SharedConfigMapReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedConfigMapReference.
func (*SharedConfigMapReference) DeepCopyInto ¶
func (in *SharedConfigMapReference) DeepCopyInto(out *SharedConfigMapReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (SharedConfigMapReference) SwaggerDoc ¶
func (SharedConfigMapReference) SwaggerDoc() map[string]string
type SharedConfigMapSpec ¶
type SharedConfigMapSpec struct { // +required ConfigMapRef SharedConfigMapReference `json:"configMapRef"` Description string `json:"description,omitempty"` }
SharedConfigMapSpec defines the desired state of a SharedConfigMap +k8s:openapi-gen=true
func (*SharedConfigMapSpec) DeepCopy ¶
func (in *SharedConfigMapSpec) DeepCopy() *SharedConfigMapSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedConfigMapSpec.
func (*SharedConfigMapSpec) DeepCopyInto ¶
func (in *SharedConfigMapSpec) DeepCopyInto(out *SharedConfigMapSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (SharedConfigMapSpec) SwaggerDoc ¶
func (SharedConfigMapSpec) SwaggerDoc() map[string]string
type SharedConfigMapStatus ¶
type SharedConfigMapStatus struct { // +patchMergeKey=type // +patchStrategy=merge Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` }
SharedSecretStatus contains the observed status of the shared resource
func (*SharedConfigMapStatus) DeepCopy ¶
func (in *SharedConfigMapStatus) DeepCopy() *SharedConfigMapStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedConfigMapStatus.
func (*SharedConfigMapStatus) DeepCopyInto ¶
func (in *SharedConfigMapStatus) DeepCopyInto(out *SharedConfigMapStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (SharedConfigMapStatus) SwaggerDoc ¶
func (SharedConfigMapStatus) SwaggerDoc() map[string]string
type SharedSecret ¶
type SharedSecret struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ObjectMeta `json:"metadata,omitempty"` // +required Spec SharedSecretSpec `json:"spec,omitempty"` Status SharedSecretStatus `json:"status,omitempty"` }
SharedSecret allows a Secret to be shared across namespaces. Pods can mount the shared Secret by adding a CSI volume to the pod specification using the "csi.sharedresource.openshift.io" CSI driver and a reference to the SharedSecret in the volume attributes:
spec:
volumes: - name: shared-secret csi: driver: csi.sharedresource.openshift.io volumeAttributes: sharedSecret: my-share
For the mount to be successful, the pod's service account must be granted permission to 'use' the named SharedSecret object within its namespace with an appropriate Role and RoleBinding. For compactness, here are example `oc` invocations for creating such Role and RoleBinding objects.
`oc create role shared-resource-my-share --verb=use --resource=sharedsecrets.sharedresource.openshift.io --resource-name=my-share` `oc create rolebinding shared-resource-my-share --role=shared-resource-my-share --serviceaccount=my-namespace:default`
Shared resource objects, in this case Secrets, have default permissions of list, get, and watch for system authenticated users.
Compatibility 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. +openshift:compatibility-gen:level=4 +kubebuilder:object:root=true +kubebuilder:resource:path=sharedsecrets,scope=Cluster +kubebuilder:subresource:status +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/979 +kubebuilder:metadata:annotations="description=Extension for sharing Secrets across Namespaces" +kubebuilder:metadata:annotations="displayName=SharedSecret"
func (*SharedSecret) DeepCopy ¶
func (in *SharedSecret) DeepCopy() *SharedSecret
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedSecret.
func (*SharedSecret) DeepCopyInto ¶
func (in *SharedSecret) DeepCopyInto(out *SharedSecret)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SharedSecret) DeepCopyObject ¶
func (in *SharedSecret) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (SharedSecret) SwaggerDoc ¶
func (SharedSecret) SwaggerDoc() map[string]string
type SharedSecretList ¶
type SharedSecretList struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ListMeta `json:"metadata,omitempty"` }
SharedSecretList contains a list of SharedSecret objects.
Compatibility 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. +openshift:compatibility-gen:level=4
func (*SharedSecretList) DeepCopy ¶
func (in *SharedSecretList) DeepCopy() *SharedSecretList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedSecretList.
func (*SharedSecretList) DeepCopyInto ¶
func (in *SharedSecretList) DeepCopyInto(out *SharedSecretList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SharedSecretList) DeepCopyObject ¶
func (in *SharedSecretList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (SharedSecretList) SwaggerDoc ¶
func (SharedSecretList) SwaggerDoc() map[string]string
type SharedSecretReference ¶
type SharedSecretReference struct { // +required Name string `json:"name"` // +required Namespace string `json:"namespace"` }
SharedSecretReference contains information about which Secret to share
func (*SharedSecretReference) DeepCopy ¶
func (in *SharedSecretReference) DeepCopy() *SharedSecretReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedSecretReference.
func (*SharedSecretReference) DeepCopyInto ¶
func (in *SharedSecretReference) DeepCopyInto(out *SharedSecretReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (SharedSecretReference) SwaggerDoc ¶
func (SharedSecretReference) SwaggerDoc() map[string]string
type SharedSecretSpec ¶
type SharedSecretSpec struct { // +required SecretRef SharedSecretReference `json:"secretRef"` Description string `json:"description,omitempty"` }
SharedSecretSpec defines the desired state of a SharedSecret +k8s:openapi-gen=true
func (*SharedSecretSpec) DeepCopy ¶
func (in *SharedSecretSpec) DeepCopy() *SharedSecretSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedSecretSpec.
func (*SharedSecretSpec) DeepCopyInto ¶
func (in *SharedSecretSpec) DeepCopyInto(out *SharedSecretSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (SharedSecretSpec) SwaggerDoc ¶
func (SharedSecretSpec) SwaggerDoc() map[string]string
type SharedSecretStatus ¶
type SharedSecretStatus struct { // +patchMergeKey=type // +patchStrategy=merge Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` }
SharedSecretStatus contains the observed status of the shared resource
func (*SharedSecretStatus) DeepCopy ¶
func (in *SharedSecretStatus) DeepCopy() *SharedSecretStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedSecretStatus.
func (*SharedSecretStatus) DeepCopyInto ¶
func (in *SharedSecretStatus) DeepCopyInto(out *SharedSecretStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (SharedSecretStatus) SwaggerDoc ¶
func (SharedSecretStatus) SwaggerDoc() map[string]string