v1alpha1

package
v0.0.0-...-188620a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2024 License: Apache-2.0 Imports: 3 Imported by: 19

Documentation

Overview

+groupName=sharedresource.openshift.io Package v1alplha1 is the v1alpha1 version of the API.

Index

Constants

View Source
const (
	Version   = "v1alpha1"
	GroupName = "sharedresource.openshift.io"
)

Variables

View Source
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 Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

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 {
	metav1.TypeMeta `json:",inline"`

	// metadata is the standard object's metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// spec is the specification of the desired shared configmap
	// +required
	Spec SharedConfigMapSpec `json:"spec,omitempty"`

	// status is the observed status of the shared configmap
	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 {
	metav1.TypeMeta `json:",inline"`

	// metadata is the standard list's metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	metav1.ListMeta `json:"metadata,omitempty"`

	Items []SharedConfigMap `json:"items"`
}

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 {
	// name represents the name of the ConfigMap that is being referenced.
	// +required
	Name string `json:"name"`
	// namespace represents the namespace where the referenced ConfigMap is located.
	// +required
	Namespace string `json:"namespace"`
}

SharedConfigMapReference contains information about which ConfigMap to share

func (*SharedConfigMapReference) DeepCopy

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 {
	//configMapRef is a reference to the ConfigMap to share
	// +required
	ConfigMapRef SharedConfigMapReference `json:"configMapRef"`
	// description is a user readable explanation of what the backing resource provides.
	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 {
	// conditions represents any observations made on this particular shared resource by the underlying CSI driver or Share controller.
	// +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

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 {
	metav1.TypeMeta `json:",inline"`

	// metadata is the standard object's metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// spec is the specification of the desired shared secret
	// +required
	Spec SharedSecretSpec `json:"spec,omitempty"`

	// status is the observed status of the shared secret
	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 {
	metav1.TypeMeta `json:",inline"`

	// metadata is the standard list's metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	metav1.ListMeta `json:"metadata,omitempty"`

	Items []SharedSecret `json:"items"`
}

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 {
	// name represents the name of the Secret that is being referenced.
	// +required
	Name string `json:"name"`
	// namespace represents the namespace where the referenced Secret is located.
	// +required
	Namespace string `json:"namespace"`
}

SharedSecretReference contains information about which Secret to share

func (*SharedSecretReference) DeepCopy

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 {
	// secretRef is a reference to the Secret to share
	// +required
	SecretRef SharedSecretReference `json:"secretRef"`
	// description is a user readable explanation of what the backing resource provides.
	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 {
	// conditions represents any observations made on this particular shared resource by the underlying CSI driver or Share controller.
	// +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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL