Documentation ¶
Overview ¶
+k8s:deepcopy-gen=package,register +groupName=region.unikorn-cloud.org
Index ¶
- Constants
- Variables
- func Resource(resource string) schema.GroupResource
- type Identity
- type IdentityList
- type IdentitySpec
- type IdentitySpecOpenStack
- type IdentityStatus
- type NamespacedObject
- type OpenstackGPUDescriptor
- type Provider
- type Region
- type RegionList
- type RegionOpenstackComputeSpec
- type RegionOpenstackIdentitySpec
- type RegionOpenstackImageSpec
- type RegionOpenstackSpec
- type RegionSpec
- type RegionStatus
Constants ¶
const ( // GroupName is the Kubernetes API group our resources belong to. GroupName = "region.unikorn-cloud.org" // GroupVersion is the version of our custom resources. GroupVersion = "v1alpha1" // Group is group/version of our resources. Group = GroupName + "/" + GroupVersion )
Variables ¶
var ( // SchemeGroupVersion defines the GV of our resources. //nolint:gochecknoglobals SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: GroupVersion} // SchemeBuilder creates a mapping between GVK and type. //nolint:gochecknoglobals SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} // AddToScheme adds our GVK to resource mappings to an existing scheme. //nolint:gochecknoglobals AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource maps a resource type to a group resource.
Types ¶
type Identity ¶
type Identity struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec IdentitySpec `json:"spec"` Status IdentityStatus `json:"status"` }
Identity defines an on-demand cloud identity. The region controller must create any resources necessary to provide dynamic provisioning of clusters e.g. compute, storage and networking. This resource is used for persistence of information by the controller and not for manual lifecycle management. Any credentials should not be stored unless absolutely necessary, and should be passed to a client on initial identity creation only. +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:resource:scope=Namespaced,categories=unikorn +kubebuilder:printcolumn:name="provider",type="string",JSONPath=".spec.provider" +kubebuilder:printcolumn:name="status",type="string",JSONPath=".status.conditions[?(@.type==\"Available\")].reason" +kubebuilder:printcolumn:name="age",type="date",JSONPath=".metadata.creationTimestamp"
func (*Identity) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Identity.
func (*Identity) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Identity) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type IdentityList ¶
type IdentityList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Identity `json:"items"` }
IdentityList is a typed list of identities. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*IdentityList) DeepCopy ¶
func (in *IdentityList) DeepCopy() *IdentityList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IdentityList.
func (*IdentityList) DeepCopyInto ¶
func (in *IdentityList) DeepCopyInto(out *IdentityList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*IdentityList) DeepCopyObject ¶
func (in *IdentityList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type IdentitySpec ¶
type IdentitySpec struct { // Provider defines the provider type. Provider Provider `json:"provider"` // OpenStack is populated when the provider type is set to "openstack". OpenStack *IdentitySpecOpenStack `json:"openstack,omitempty"` }
IdentitySpec stores any state necessary to manage identity.
func (*IdentitySpec) DeepCopy ¶
func (in *IdentitySpec) DeepCopy() *IdentitySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IdentitySpec.
func (*IdentitySpec) DeepCopyInto ¶
func (in *IdentitySpec) DeepCopyInto(out *IdentitySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IdentitySpecOpenStack ¶
type IdentitySpecOpenStack struct { // UserID is the ID of the user created for the identity. UserID string // ProjectIS is the ID of the project created for the identity. ProjectID string }
func (*IdentitySpecOpenStack) DeepCopy ¶
func (in *IdentitySpecOpenStack) DeepCopy() *IdentitySpecOpenStack
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IdentitySpecOpenStack.
func (*IdentitySpecOpenStack) DeepCopyInto ¶
func (in *IdentitySpecOpenStack) DeepCopyInto(out *IdentitySpecOpenStack)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IdentityStatus ¶
type IdentityStatus struct { }
func (*IdentityStatus) DeepCopy ¶
func (in *IdentityStatus) DeepCopy() *IdentityStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IdentityStatus.
func (*IdentityStatus) DeepCopyInto ¶
func (in *IdentityStatus) DeepCopyInto(out *IdentityStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NamespacedObject ¶
type NamespacedObject struct { // Namespace is the namespace in which the object resides. Namespace string `json:"namespace"` // Name is the name of the object. Name string `json:"name"` }
func (*NamespacedObject) DeepCopy ¶
func (in *NamespacedObject) DeepCopy() *NamespacedObject
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespacedObject.
func (*NamespacedObject) DeepCopyInto ¶
func (in *NamespacedObject) DeepCopyInto(out *NamespacedObject)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OpenstackGPUDescriptor ¶
type OpenstackGPUDescriptor struct { // Property is the property name to examine e.g. "resources.VGPU". Property string `json:"property"` // Expression describes how to extract the number of GPUs from the property // if it exists. This must contain exactly one submatch that is a number // e.g. "^(\d+)$". Expression string `json:"expression"` }
func (*OpenstackGPUDescriptor) DeepCopy ¶
func (in *OpenstackGPUDescriptor) DeepCopy() *OpenstackGPUDescriptor
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenstackGPUDescriptor.
func (*OpenstackGPUDescriptor) DeepCopyInto ¶
func (in *OpenstackGPUDescriptor) DeepCopyInto(out *OpenstackGPUDescriptor)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Provider ¶
type Provider string
Provider is used to communicate the cloud type. +kubebuilder:validation:Enum=openstack
const (
ProviderOpenstack Provider = "openstack"
)
type Region ¶
type Region struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec RegionSpec `json:"spec"` Status RegionStatus `json:"status,omitempty"` }
Region defines a geographical region where clusters can be provisioned. A region defines the endpoints that can be used to derive information about the provider for that region. +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:resource:scope=Namespaced,categories=unikorn +kubebuilder:subresource:status +kubebuilder:printcolumn:name="display name",type="string",JSONPath=".metadata.labels['unikorn-cloud\\.org/name']" +kubebuilder:printcolumn:name="provider",type="string",JSONPath=".spec.provider" +kubebuilder:printcolumn:name="status",type="string",JSONPath=".status.conditions[?(@.type==\"Available\")].reason" +kubebuilder:printcolumn:name="age",type="date",JSONPath=".metadata.creationTimestamp"
func (*Region) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Region.
func (*Region) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Region) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type RegionList ¶
type RegionList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Region `json:"items"` }
RegionList is a typed list of regions. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*RegionList) DeepCopy ¶
func (in *RegionList) DeepCopy() *RegionList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegionList.
func (*RegionList) DeepCopyInto ¶
func (in *RegionList) DeepCopyInto(out *RegionList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RegionList) DeepCopyObject ¶
func (in *RegionList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type RegionOpenstackComputeSpec ¶
type RegionOpenstackComputeSpec struct { // ServerGroupPolicy defines the anti-affinity policy to use for // scheduling cluster nodes. Defaults to "soft-anti-affinity". ServerGroupPolicy *string `json:"serverGroupPolicy,omitempty"` // FlavorExtraSpecsExclude discards any flavors with the listed // extra specs keys. FlavorExtraSpecsExclude []string `json:"flavorExtraSpecsExclude,omitempty"` // GPUDescriptors defines a set of keys that can be probed to // list GPU topology information. GPUDescriptors []OpenstackGPUDescriptor `json:"gpuDescriptors,omitempty"` }
func (*RegionOpenstackComputeSpec) DeepCopy ¶
func (in *RegionOpenstackComputeSpec) DeepCopy() *RegionOpenstackComputeSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegionOpenstackComputeSpec.
func (*RegionOpenstackComputeSpec) DeepCopyInto ¶
func (in *RegionOpenstackComputeSpec) DeepCopyInto(out *RegionOpenstackComputeSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RegionOpenstackIdentitySpec ¶
type RegionOpenstackIdentitySpec struct { // ClusterRoles are the roles required to be assigned to an application // credential in order to provision, scale and deprovision a cluster, along // with any required for CNI/CSI functionality. ClusterRoles []string `json:"clusterRoles,omitempty"` }
func (*RegionOpenstackIdentitySpec) DeepCopy ¶
func (in *RegionOpenstackIdentitySpec) DeepCopy() *RegionOpenstackIdentitySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegionOpenstackIdentitySpec.
func (*RegionOpenstackIdentitySpec) DeepCopyInto ¶
func (in *RegionOpenstackIdentitySpec) DeepCopyInto(out *RegionOpenstackIdentitySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RegionOpenstackImageSpec ¶
type RegionOpenstackImageSpec struct { // PropertiesInclude defines the set of properties that must all exist // for an image to be advertised by the provider. PropertiesInclude []string `json:"propertiesInclude,omitempty"` // SigningKey defines a PEM encoded public ECDSA signing key used to verify // the image is trusted. If specified, an image must contain the "digest" // property, the value of which must be a base64 encoded ECDSA signature of // the SHA256 hash of the image ID. SigningKey []byte `json:"signingKey,omitempty"` }
func (*RegionOpenstackImageSpec) DeepCopy ¶
func (in *RegionOpenstackImageSpec) DeepCopy() *RegionOpenstackImageSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegionOpenstackImageSpec.
func (*RegionOpenstackImageSpec) DeepCopyInto ¶
func (in *RegionOpenstackImageSpec) DeepCopyInto(out *RegionOpenstackImageSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RegionOpenstackSpec ¶
type RegionOpenstackSpec struct { // Endpoint is the Keystone URL e.g. https://foo.bar:5000. Endpoint string `json:"endpoint"` // ServiceAccountSecretName points to the secret containing credentials // required to perform the tasks the provider needs to perform. ServiceAccountSecret *NamespacedObject `json:"serviceAccountSecret"` // Identity is configuration for the identity service. Identity *RegionOpenstackIdentitySpec `json:"identity,omitempty"` // Compute is configuration for the compute service. Compute *RegionOpenstackComputeSpec `json:"compute,omitempty"` // Image is configuration for the image service. Image *RegionOpenstackImageSpec `json:"image,omitempty"` }
func (*RegionOpenstackSpec) DeepCopy ¶
func (in *RegionOpenstackSpec) DeepCopy() *RegionOpenstackSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegionOpenstackSpec.
func (*RegionOpenstackSpec) DeepCopyInto ¶
func (in *RegionOpenstackSpec) DeepCopyInto(out *RegionOpenstackSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RegionSpec ¶
type RegionSpec struct { // Type defines the provider type. Provider Provider `json:"provider"` // Openstack is provider specific configuration for the region. Openstack *RegionOpenstackSpec `json:"openstack,omitempty"` }
RegionSpec defines metadata about the region.
func (*RegionSpec) DeepCopy ¶
func (in *RegionSpec) DeepCopy() *RegionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegionSpec.
func (*RegionSpec) DeepCopyInto ¶
func (in *RegionSpec) DeepCopyInto(out *RegionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RegionStatus ¶
type RegionStatus struct { // Current service state of a region. Conditions []unikornv1core.Condition `json:"conditions,omitempty"` }
RegionStatus defines the status of the region.
func (*RegionStatus) DeepCopy ¶
func (in *RegionStatus) DeepCopy() *RegionStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegionStatus.
func (*RegionStatus) DeepCopyInto ¶
func (in *RegionStatus) DeepCopyInto(out *RegionStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.