Documentation ¶
Overview ¶
+k8s:deepcopy-gen=package,register +groupName=unikorn.eschercloud.ai
Index ¶
- Constants
- Variables
- func CompareControlPlane(a, b ControlPlane) int
- func CompareControlPlaneApplicationBundle(a, b ControlPlaneApplicationBundle) int
- func CompareKubernetesCluster(a, b KubernetesCluster) int
- func CompareKubernetesClusterApplicationBundle(a, b KubernetesClusterApplicationBundle) int
- func Resource(resource string) schema.GroupResource
- type ApplicationBundleAutoUpgradeSpec
- type ApplicationBundleAutoUpgradeWeekDaySpec
- type ApplicationBundleAutoUpgradeWindowSpec
- type ApplicationBundleSpec
- type ApplicationBundleStatus
- type ApplicationNamedReference
- type ControlPlane
- func (in *ControlPlane) DeepCopy() *ControlPlane
- func (in *ControlPlane) DeepCopyInto(out *ControlPlane)
- func (in *ControlPlane) DeepCopyObject() runtime.Object
- func (c ControlPlane) Entropy() []byte
- func (c *ControlPlane) Paused() bool
- func (c *ControlPlane) ResourceLabels() (labels.Set, error)
- func (c *ControlPlane) StatusConditionRead(t coreunikornv1.ConditionType) (*coreunikornv1.Condition, error)
- func (c *ControlPlane) StatusConditionWrite(t coreunikornv1.ConditionType, status corev1.ConditionStatus, ...)
- func (c ControlPlane) UpgradeSpec() *ApplicationBundleAutoUpgradeSpec
- type ControlPlaneApplicationBundle
- type ControlPlaneApplicationBundleList
- func (in *ControlPlaneApplicationBundleList) DeepCopy() *ControlPlaneApplicationBundleList
- func (in *ControlPlaneApplicationBundleList) DeepCopyInto(out *ControlPlaneApplicationBundleList)
- func (in *ControlPlaneApplicationBundleList) DeepCopyObject() runtime.Object
- func (l ControlPlaneApplicationBundleList) Get(name string) *ControlPlaneApplicationBundle
- func (l ControlPlaneApplicationBundleList) Upgradable() *ControlPlaneApplicationBundleList
- type ControlPlaneList
- type ControlPlaneSpec
- type ControlPlaneStatus
- type File
- type IPv4Address
- func (in *IPv4Address) DeepCopy() *IPv4Address
- func (in *IPv4Address) DeepCopyInto(out *IPv4Address)
- func (a IPv4Address) MarshalJSON() ([]byte, error)
- func (IPv4Address) OpenAPISchemaFormat() string
- func (IPv4Address) OpenAPISchemaType() []string
- func (a IPv4Address) ToUnstructured() interface{}
- func (a *IPv4Address) UnmarshalJSON(b []byte) error
- type IPv4Prefix
- func (in *IPv4Prefix) DeepCopy() *IPv4Prefix
- func (p *IPv4Prefix) DeepCopyInto(out *IPv4Prefix)
- func (p IPv4Prefix) MarshalJSON() ([]byte, error)
- func (IPv4Prefix) OpenAPISchemaFormat() string
- func (IPv4Prefix) OpenAPISchemaType() []string
- func (p IPv4Prefix) ToUnstructured() interface{}
- func (p *IPv4Prefix) UnmarshalJSON(b []byte) error
- type KubernetesCluster
- func (c *KubernetesCluster) AutoscalingEnabled() bool
- func (c *KubernetesCluster) CertManagerEnabled() bool
- func (in *KubernetesCluster) DeepCopy() *KubernetesCluster
- func (in *KubernetesCluster) DeepCopyInto(out *KubernetesCluster)
- func (in *KubernetesCluster) DeepCopyObject() runtime.Object
- func (c KubernetesCluster) Entropy() []byte
- func (c *KubernetesCluster) FileStorageEnabled() bool
- func (c *KubernetesCluster) IngressEnabled() bool
- func (c *KubernetesCluster) KubernetesDashboardEnabled() bool
- func (c *KubernetesCluster) NvidiaOperatorEnabled() bool
- func (c *KubernetesCluster) Paused() bool
- func (c *KubernetesCluster) PrometheusEnabled() bool
- func (c *KubernetesCluster) ResourceLabels() (labels.Set, error)
- func (c *KubernetesCluster) StatusConditionRead(t coreunikornv1.ConditionType) (*coreunikornv1.Condition, error)
- func (c *KubernetesCluster) StatusConditionWrite(t coreunikornv1.ConditionType, status corev1.ConditionStatus, ...)
- func (c KubernetesCluster) UpgradeSpec() *ApplicationBundleAutoUpgradeSpec
- type KubernetesClusterAPISpec
- type KubernetesClusterApplicationBundle
- type KubernetesClusterApplicationBundleList
- func (in *KubernetesClusterApplicationBundleList) DeepCopy() *KubernetesClusterApplicationBundleList
- func (in *KubernetesClusterApplicationBundleList) DeepCopyInto(out *KubernetesClusterApplicationBundleList)
- func (in *KubernetesClusterApplicationBundleList) DeepCopyObject() runtime.Object
- func (l KubernetesClusterApplicationBundleList) Get(name string) *KubernetesClusterApplicationBundle
- func (l KubernetesClusterApplicationBundleList) Upgradable() *KubernetesClusterApplicationBundleList
- type KubernetesClusterControlPlaneSpec
- type KubernetesClusterFeaturesSpec
- type KubernetesClusterList
- type KubernetesClusterNetworkSpec
- type KubernetesClusterOpenstackSpec
- type KubernetesClusterSpec
- type KubernetesClusterStatus
- type KubernetesClusterWorkloadPoolsPoolSpec
- type KubernetesClusterWorkloadPoolsSpec
- type KubernetesWorkloadPoolSpec
- type MachineGeneric
- type MachineGenericAutoscaling
- type MachineGenericAutoscalingScheduler
- type MachineGenericAutoscalingSchedulerGPU
- type Project
- func (in *Project) DeepCopy() *Project
- func (in *Project) DeepCopyInto(out *Project)
- func (in *Project) DeepCopyObject() runtime.Object
- func (c *Project) Paused() bool
- func (c *Project) ResourceLabels() (labels.Set, error)
- func (c *Project) StatusConditionRead(t coreunikornv1.ConditionType) (*coreunikornv1.Condition, error)
- func (c *Project) StatusConditionWrite(t coreunikornv1.ConditionType, status corev1.ConditionStatus, ...)
- type ProjectList
- type ProjectSpec
- type ProjectStatus
- type SemanticVersion
Constants ¶
const ( // GroupName is the Kubernetes API group our resources belong to. GroupName = "unikorn.eschercloud.ai" // GroupVersion is the version of our custom resources. GroupVersion = "v1alpha1" // Group is group/version of our resources. Group = GroupName + "/" + GroupVersion // ProjectKind is the API kind for a project. ProjectKind = "Projects" // ProjectResource is the API endpoint for a project. ProjectResource = "projects" // ControlPlaneKind is the API kind of a control plane. ControlPlaneKind = "ControlPlane" // ControlPlaneResource is the API endpoint for control plane resources. ControlPlaneResource = "controlplanes" // KubernetesClusterKind is the API kind for a cluster. // NOTE: This is deliberately explicit to avoid a clash with CAPI Cluster // objects (yes it's namespaced by group, but this makes it easier), and // to provide future expansion... KubernetesClusterKind = "KubernetesCluster" // KubernetesClusterResource is the API endpoint for a cluster resource. KubernetesClusterResource = "kubernetesclusters" // ControlPlaneApplicationBundleKind is the API kind for a bundle of applications. ControlPlaneApplicationBundleKind = "ControlPlaneApplicationBundle" // ControlPlaneApplicationBundleResource is the API endpoint for bundles of applications. ControlPlaneApplicationBundleResource = "controlplaneapplicationbundles" // KubernetesClusterApplicationBundleKind is the API kind for a bundle of applications. KubernetesClusterApplicationBundleKind = "KubernetesClusterApplicationBundle" // KubernetesClusterApplicationBundleResource is the API endpoint for bundles of applications. KubernetesClusterApplicationBundleResource = "kubernetesclusterapplicationbundles" )
Variables ¶
var ( // ErrStatuscoreunikornv1.ConditionLookup is raised when a condition is not found in // the resource status. ErrStatusConditionLookup = errors.New("status condition not found") // ErrMissingLabel is raised when an expected label is not present on // a resource. ErrMissingLabel = errors.New("expected label is missing") // ErrApplicationLookup is raised when the named application is not // present in an application bundle bundle. ErrApplicationLookup = errors.New("failed to lookup an application") )
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 )
var (
ErrJSONUnmarshal = errors.New("failed to unmarshal JSON")
)
Functions ¶
func CompareControlPlane ¶
func CompareControlPlane(a, b ControlPlane) int
func CompareControlPlaneApplicationBundle ¶
func CompareControlPlaneApplicationBundle(a, b ControlPlaneApplicationBundle) int
func CompareKubernetesCluster ¶
func CompareKubernetesCluster(a, b KubernetesCluster) int
func CompareKubernetesClusterApplicationBundle ¶
func CompareKubernetesClusterApplicationBundle(a, b KubernetesClusterApplicationBundle) int
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource maps a resource type to a group resource.
Types ¶
type ApplicationBundleAutoUpgradeSpec ¶
type ApplicationBundleAutoUpgradeSpec struct { // WeekDay allows specification of upgrade time windows on individual // days of the week. The platform will select a random upgrade // slot within the specified time windows in order to load balance and // mitigate against defects. WeekDay *ApplicationBundleAutoUpgradeWeekDaySpec `json:"weekday,omitempty"` }
func (*ApplicationBundleAutoUpgradeSpec) DeepCopy ¶
func (in *ApplicationBundleAutoUpgradeSpec) DeepCopy() *ApplicationBundleAutoUpgradeSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationBundleAutoUpgradeSpec.
func (*ApplicationBundleAutoUpgradeSpec) DeepCopyInto ¶
func (in *ApplicationBundleAutoUpgradeSpec) DeepCopyInto(out *ApplicationBundleAutoUpgradeSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ApplicationBundleAutoUpgradeWeekDaySpec ¶
type ApplicationBundleAutoUpgradeWeekDaySpec struct { // Sunday, when specified, provides an upgrade window on that day. Sunday *ApplicationBundleAutoUpgradeWindowSpec `json:"sunday,omitempty"` // Monday, when specified, provides an upgrade window on that day. Monday *ApplicationBundleAutoUpgradeWindowSpec `json:"monday,omitempty"` // Tuesday, when specified, provides an upgrade window on that day. Tuesday *ApplicationBundleAutoUpgradeWindowSpec `json:"tuesday,omitempty"` // Wednesday, when specified, provides an upgrade window on that day. Wednesday *ApplicationBundleAutoUpgradeWindowSpec `json:"wednesday,omitempty"` // Thursday, when specified, provides an upgrade window on that day. Thursday *ApplicationBundleAutoUpgradeWindowSpec `json:"thursday,omitempty"` // Friday, when specified, provides an upgrade window on that day. Friday *ApplicationBundleAutoUpgradeWindowSpec `json:"friday,omitempty"` // Saturday, when specified, provides an upgrade window on that day. Saturday *ApplicationBundleAutoUpgradeWindowSpec `json:"saturday,omitempty"` }
func (*ApplicationBundleAutoUpgradeWeekDaySpec) DeepCopy ¶
func (in *ApplicationBundleAutoUpgradeWeekDaySpec) DeepCopy() *ApplicationBundleAutoUpgradeWeekDaySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationBundleAutoUpgradeWeekDaySpec.
func (*ApplicationBundleAutoUpgradeWeekDaySpec) DeepCopyInto ¶
func (in *ApplicationBundleAutoUpgradeWeekDaySpec) DeepCopyInto(out *ApplicationBundleAutoUpgradeWeekDaySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ApplicationBundleAutoUpgradeWeekDaySpec) Weekdays ¶
func (s ApplicationBundleAutoUpgradeWeekDaySpec) Weekdays() []time.Weekday
Weekdays returns the days of the week that are set in the spec.
type ApplicationBundleAutoUpgradeWindowSpec ¶
type ApplicationBundleAutoUpgradeWindowSpec struct { // Start is the upgrade window start hour in UTC. Upgrades will be // deterministically scheduled between start and end to balance load // across the platform. Windows can span days, so start=22 and end=07 // will start at 22:00 on the selected day, and end 07:00 the following // one. // +kubebuilder:validation:Minimum=0 // +kubebuilder:validation:Maximum=23 Start int `json:"start"` // End is the upgrade window end hour in UTC. // +kubebuilder:validation:Minimum=0 // +kubebuilder:validation:Maximum=23 End int `json:"end"` }
func (*ApplicationBundleAutoUpgradeWindowSpec) DeepCopy ¶
func (in *ApplicationBundleAutoUpgradeWindowSpec) DeepCopy() *ApplicationBundleAutoUpgradeWindowSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationBundleAutoUpgradeWindowSpec.
func (*ApplicationBundleAutoUpgradeWindowSpec) DeepCopyInto ¶
func (in *ApplicationBundleAutoUpgradeWindowSpec) DeepCopyInto(out *ApplicationBundleAutoUpgradeWindowSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ApplicationBundleSpec ¶
type ApplicationBundleSpec struct { // Version is a semantic version of the bundle, must be unique. Version *string `json:"version"` // Preview indicates that this bundle is a preview and should not be // used by default. Preview *bool `json:"preview,omitempty"` // EndOfLife marks when this bundle should not be advertised any more // by Unikorn server. It also provides a hint that users should upgrade // ahead of the deadline, or that a forced upgrade should be triggered. EndOfLife *metav1.Time `json:"endOfLife,omitempty"` // Applications is a list of application references for the bundle. Applications []ApplicationNamedReference `json:"applications,omitempty"` }
ApplicationBundleSpec defines the requested resource state.
func (*ApplicationBundleSpec) DeepCopy ¶
func (in *ApplicationBundleSpec) DeepCopy() *ApplicationBundleSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationBundleSpec.
func (*ApplicationBundleSpec) DeepCopyInto ¶
func (in *ApplicationBundleSpec) DeepCopyInto(out *ApplicationBundleSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ApplicationBundleSpec) GetApplication ¶
func (s ApplicationBundleSpec) GetApplication(name string) (*coreunikornv1.ApplicationReference, error)
type ApplicationBundleStatus ¶
type ApplicationBundleStatus struct{}
func (*ApplicationBundleStatus) DeepCopy ¶
func (in *ApplicationBundleStatus) DeepCopy() *ApplicationBundleStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationBundleStatus.
func (*ApplicationBundleStatus) DeepCopyInto ¶
func (in *ApplicationBundleStatus) DeepCopyInto(out *ApplicationBundleStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ApplicationNamedReference ¶
type ApplicationNamedReference struct { // Name is the name of the application. This must match what is encoded into // Unikorn's application management engine. Name *string `json:"name"` // Reference is a reference to the application definition. Reference *coreunikornv1.ApplicationReference `json:"reference"` }
func (*ApplicationNamedReference) DeepCopy ¶
func (in *ApplicationNamedReference) DeepCopy() *ApplicationNamedReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationNamedReference.
func (*ApplicationNamedReference) DeepCopyInto ¶
func (in *ApplicationNamedReference) DeepCopyInto(out *ApplicationNamedReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ControlPlane ¶
type ControlPlane struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ControlPlaneSpec `json:"spec"` Status ControlPlaneStatus `json:"status,omitempty"` }
ControlPlane is an abstraction around resource provisioning, for example it may contain a provider like Cluster API that can provision KubernetesCluster resources. +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:resource:scope=Namespaced,categories=unikorn +kubebuilder:subresource:status +kubebuilder:printcolumn:name="bundle",type="string",JSONPath=".spec.applicationBundle" +kubebuilder:printcolumn:name="namespace",type="string",JSONPath=".status.namespace" +kubebuilder:printcolumn:name="status",type="string",JSONPath=".status.conditions[?(@.type==\"Available\")].reason" +kubebuilder:printcolumn:name="age",type="date",JSONPath=".metadata.creationTimestamp"
func (*ControlPlane) DeepCopy ¶
func (in *ControlPlane) DeepCopy() *ControlPlane
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlPlane.
func (*ControlPlane) DeepCopyInto ¶
func (in *ControlPlane) DeepCopyInto(out *ControlPlane)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ControlPlane) DeepCopyObject ¶
func (in *ControlPlane) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (ControlPlane) Entropy ¶
func (c ControlPlane) Entropy() []byte
func (*ControlPlane) Paused ¶
func (c *ControlPlane) Paused() bool
Paused implements the ReconcilePauser interface.
func (*ControlPlane) ResourceLabels ¶
func (c *ControlPlane) ResourceLabels() (labels.Set, error)
ResourceLabels generates a set of labels to uniquely identify the resource if it were to be placed in a single global namespace.
func (*ControlPlane) StatusConditionRead ¶
func (c *ControlPlane) StatusConditionRead(t coreunikornv1.ConditionType) (*coreunikornv1.Condition, error)
StatusConditionRead scans the status conditions for an existing condition whose type matches.
func (*ControlPlane) StatusConditionWrite ¶
func (c *ControlPlane) StatusConditionWrite(t coreunikornv1.ConditionType, status corev1.ConditionStatus, reason coreunikornv1.ConditionReason, message string)
StatusConditionWrite either adds or updates a condition in the control plane status. If the condition, status and message match an existing condition the update is ignored.
func (ControlPlane) UpgradeSpec ¶
func (c ControlPlane) UpgradeSpec() *ApplicationBundleAutoUpgradeSpec
type ControlPlaneApplicationBundle ¶
type ControlPlaneApplicationBundle struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ApplicationBundleSpec `json:"spec"` Status ApplicationBundleStatus `json:"status,omitempty"` }
ControlPlaneApplicationBundle defines a bundle of applications related with a particular custom resource e.g. a ControlPlane has vcluster, cert-manager and cluster-api applications associated with it. This forms the backbone of upgrades by allowing bundles to be switched out in control planes etc. +genclient +genclient:nonNamespaced +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:resource:scope=Cluster,categories=unikorn +kubebuilder:printcolumn:name="kind",type="string",JSONPath=".spec.kind" +kubebuilder:printcolumn:name="version",type="string",JSONPath=".spec.version" +kubebuilder:printcolumn:name="preview",type="string",JSONPath=".spec.preview" +kubebuilder:printcolumn:name="end of life",type="string",JSONPath=".spec.endOfLife" +kubebuilder:printcolumn:name="age",type="date",JSONPath=".metadata.creationTimestamp"
func (*ControlPlaneApplicationBundle) DeepCopy ¶
func (in *ControlPlaneApplicationBundle) DeepCopy() *ControlPlaneApplicationBundle
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlPlaneApplicationBundle.
func (*ControlPlaneApplicationBundle) DeepCopyInto ¶
func (in *ControlPlaneApplicationBundle) DeepCopyInto(out *ControlPlaneApplicationBundle)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ControlPlaneApplicationBundle) DeepCopyObject ¶
func (in *ControlPlaneApplicationBundle) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ControlPlaneApplicationBundleList ¶
type ControlPlaneApplicationBundleList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ControlPlaneApplicationBundle `json:"items"` }
ControlPlaneApplicationBundleList defines a list of application bundles. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*ControlPlaneApplicationBundleList) DeepCopy ¶
func (in *ControlPlaneApplicationBundleList) DeepCopy() *ControlPlaneApplicationBundleList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlPlaneApplicationBundleList.
func (*ControlPlaneApplicationBundleList) DeepCopyInto ¶
func (in *ControlPlaneApplicationBundleList) DeepCopyInto(out *ControlPlaneApplicationBundleList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ControlPlaneApplicationBundleList) DeepCopyObject ¶
func (in *ControlPlaneApplicationBundleList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (ControlPlaneApplicationBundleList) Get ¶
func (l ControlPlaneApplicationBundleList) Get(name string) *ControlPlaneApplicationBundle
Get retrieves the named bundle.
func (ControlPlaneApplicationBundleList) Upgradable ¶
func (l ControlPlaneApplicationBundleList) Upgradable() *ControlPlaneApplicationBundleList
Upgradable returns a new list of bundles that are "stable" e.g. not end of life and not a preview.
type ControlPlaneList ¶
type ControlPlaneList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ControlPlane `json:"items"` }
ControlPlaneList is a typed list of control planes. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*ControlPlaneList) DeepCopy ¶
func (in *ControlPlaneList) DeepCopy() *ControlPlaneList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlPlaneList.
func (*ControlPlaneList) DeepCopyInto ¶
func (in *ControlPlaneList) DeepCopyInto(out *ControlPlaneList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ControlPlaneList) DeepCopyObject ¶
func (in *ControlPlaneList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ControlPlaneSpec ¶
type ControlPlaneSpec struct { // Pause, if true, will inhibit reconciliation. Pause bool `json:"pause,omitempty"` // Timeout defines how long a control plane is allowed to provision for before // a timeout is triggerd and the request aborts. // +kubebuilder:default="10m" Timeout *metav1.Duration `json:"timeout,omitempty"` // ApplicationBundle defines the applications used to create the control plane. // Change this to a new bundle to start an upgrade. ApplicationBundle *string `json:"applicationBundle"` // ApplicationBundleAutoUpgrade enables automatic upgrade of application bundles. // When no properties are set in the specification, the platform will automatically // choose an upgrade time for your resource. This will be before a working day // (Mon-Fri) and before working hours (00:00-07:00 UTC). When any property is set // the platform will follow the rules for the upgrade method. ApplicationBundleAutoUpgrade *ApplicationBundleAutoUpgradeSpec `json:"applicationBundleAutoUpgrade,omitempty"` }
ControlPlaneSpec defines any control plane specific options.
func (*ControlPlaneSpec) DeepCopy ¶
func (in *ControlPlaneSpec) DeepCopy() *ControlPlaneSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlPlaneSpec.
func (*ControlPlaneSpec) DeepCopyInto ¶
func (in *ControlPlaneSpec) DeepCopyInto(out *ControlPlaneSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ControlPlaneStatus ¶
type ControlPlaneStatus struct { // Namespace defines the namespace a control plane resides in. Namespace string `json:"namespace,omitempty"` // Current service state of a control plane. Conditions []coreunikornv1.Condition `json:"conditions,omitempty"` }
ControlPlaneStatus defines the status of the project.
func (*ControlPlaneStatus) DeepCopy ¶
func (in *ControlPlaneStatus) DeepCopy() *ControlPlaneStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlPlaneStatus.
func (*ControlPlaneStatus) DeepCopyInto ¶
func (in *ControlPlaneStatus) DeepCopyInto(out *ControlPlaneStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type File ¶
type File struct { // Path is the absolute path to create the file in. Path *string `json:"path"` // Content is the file contents. Content []byte `json:"content"` }
File is a file that can be deployed to a cluster node on creation.
func (*File) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new File.
func (*File) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IPv4Address ¶
+kubebuilder:validation:Type=string +kubebuilder:validation:Pattern="^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])$"
func IPv4AddressSliceFromIPSlice ¶
func IPv4AddressSliceFromIPSlice(in []net.IP) []IPv4Address
IPv4AddressSliceFromIPSlice is a simple converter from Go types to API types.
func (*IPv4Address) DeepCopy ¶
func (in *IPv4Address) DeepCopy() *IPv4Address
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPv4Address.
func (*IPv4Address) DeepCopyInto ¶
func (in *IPv4Address) DeepCopyInto(out *IPv4Address)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (IPv4Address) MarshalJSON ¶
func (a IPv4Address) MarshalJSON() ([]byte, error)
func (IPv4Address) OpenAPISchemaFormat ¶
func (IPv4Address) OpenAPISchemaFormat() string
func (IPv4Address) OpenAPISchemaType ¶
func (IPv4Address) OpenAPISchemaType() []string
There is no interface defined for these. See https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators for reference.
func (IPv4Address) ToUnstructured ¶
func (a IPv4Address) ToUnstructured() interface{}
func (*IPv4Address) UnmarshalJSON ¶
func (a *IPv4Address) UnmarshalJSON(b []byte) error
type IPv4Prefix ¶
See https://regex101.com/r/QUfWrF/1 +kubebuilder:validation:Type=string +kubebuilder:validation:Pattern="^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\/(?:3[0-2]|[1-2]?[0-9])$"
func (*IPv4Prefix) DeepCopy ¶
func (in *IPv4Prefix) DeepCopy() *IPv4Prefix
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPv4Prefix.
func (*IPv4Prefix) DeepCopyInto ¶
func (p *IPv4Prefix) DeepCopyInto(out *IPv4Prefix)
DeepCopyInto implements the interface deepcopy-gen is totally unable to do by itself.
func (IPv4Prefix) MarshalJSON ¶
func (p IPv4Prefix) MarshalJSON() ([]byte, error)
func (IPv4Prefix) OpenAPISchemaFormat ¶
func (IPv4Prefix) OpenAPISchemaFormat() string
func (IPv4Prefix) OpenAPISchemaType ¶
func (IPv4Prefix) OpenAPISchemaType() []string
There is no interface defined for these. See https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators for reference.
func (IPv4Prefix) ToUnstructured ¶
func (p IPv4Prefix) ToUnstructured() interface{}
func (*IPv4Prefix) UnmarshalJSON ¶
func (p *IPv4Prefix) UnmarshalJSON(b []byte) error
type KubernetesCluster ¶
type KubernetesCluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec KubernetesClusterSpec `json:"spec"` Status KubernetesClusterStatus `json:"status,omitempty"` }
KubernetesCluster is an object representing a Kubernetes cluster. For now, this is a monolith for simplicity. In future it may reference a provider specific implementation e.g. if CAPI goes out of favour for some other new starlet. +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:resource:scope=Namespaced,categories=unikorn +kubebuilder:subresource:status +kubebuilder:printcolumn:name="bundle",type="string",JSONPath=".spec.applicationBundle" +kubebuilder:printcolumn:name="version",type="string",JSONPath=".spec.controlPlane.version" +kubebuilder:printcolumn:name="image",type="string",JSONPath=".spec.controlPlane.image" +kubebuilder:printcolumn:name="flavor",type="string",JSONPath=".spec.controlPlane.flavor" +kubebuilder:printcolumn:name="replicas",type="string",JSONPath=".spec.controlPlane.replicas" +kubebuilder:printcolumn:name="status",type="string",JSONPath=".status.conditions[?(@.type==\"Available\")].reason" +kubebuilder:printcolumn:name="age",type="date",JSONPath=".metadata.creationTimestamp"
func (*KubernetesCluster) AutoscalingEnabled ¶
func (c *KubernetesCluster) AutoscalingEnabled() bool
AutoscalingEnabled indicates whether cluster autoscaling is enabled for the cluster.
func (*KubernetesCluster) CertManagerEnabled ¶
func (c *KubernetesCluster) CertManagerEnabled() bool
CertManagerEnabled indicates whether cert-manager is required.
func (*KubernetesCluster) DeepCopy ¶
func (in *KubernetesCluster) DeepCopy() *KubernetesCluster
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesCluster.
func (*KubernetesCluster) DeepCopyInto ¶
func (in *KubernetesCluster) DeepCopyInto(out *KubernetesCluster)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*KubernetesCluster) DeepCopyObject ¶
func (in *KubernetesCluster) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (KubernetesCluster) Entropy ¶
func (c KubernetesCluster) Entropy() []byte
func (*KubernetesCluster) FileStorageEnabled ¶
func (c *KubernetesCluster) FileStorageEnabled() bool
FileStorageEnabled indicates whether a POSIX file storage CSI is required.
func (*KubernetesCluster) IngressEnabled ¶
func (c *KubernetesCluster) IngressEnabled() bool
IngressEnabled indicates whether an ingress controller is required.
func (*KubernetesCluster) KubernetesDashboardEnabled ¶
func (c *KubernetesCluster) KubernetesDashboardEnabled() bool
KubernetesDashboardEnabled indicates whether the Kubernetes dashboard is required.
func (*KubernetesCluster) NvidiaOperatorEnabled ¶
func (c *KubernetesCluster) NvidiaOperatorEnabled() bool
NvidiaOperatorEnabled indicates whether to install the Nvidia GPU operator.
func (*KubernetesCluster) Paused ¶
func (c *KubernetesCluster) Paused() bool
Paused implements the ReconcilePauser interface.
func (*KubernetesCluster) PrometheusEnabled ¶
func (c *KubernetesCluster) PrometheusEnabled() bool
PrometheusEnabled indicates whether the Prometheus Operator is required.
func (*KubernetesCluster) ResourceLabels ¶
func (c *KubernetesCluster) ResourceLabels() (labels.Set, error)
ResourceLabels generates a set of labels to uniquely identify the resource if it were to be placed in a single global namespace.
func (*KubernetesCluster) StatusConditionRead ¶
func (c *KubernetesCluster) StatusConditionRead(t coreunikornv1.ConditionType) (*coreunikornv1.Condition, error)
StatusConditionRead scans the status conditions for an existing condition whose type matches.
func (*KubernetesCluster) StatusConditionWrite ¶
func (c *KubernetesCluster) StatusConditionWrite(t coreunikornv1.ConditionType, status corev1.ConditionStatus, reason coreunikornv1.ConditionReason, message string)
StatusConditionWrite either adds or updates a condition in the cluster status. If the condition, status and message match an existing condition the update is ignored.
func (KubernetesCluster) UpgradeSpec ¶
func (c KubernetesCluster) UpgradeSpec() *ApplicationBundleAutoUpgradeSpec
type KubernetesClusterAPISpec ¶
type KubernetesClusterAPISpec struct { // SubjectAlternativeNames is a list of X.509 SANs to add to the API // certificate. SubjectAlternativeNames []string `json:"subjectAlternativeNames,omitempty"` // AllowedPrefixes is a list of all IPv4 prefixes that are allowed to access // the API. AllowedPrefixes []IPv4Prefix `json:"allowedPrefixes,omitempty"` }
func (*KubernetesClusterAPISpec) DeepCopy ¶
func (in *KubernetesClusterAPISpec) DeepCopy() *KubernetesClusterAPISpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesClusterAPISpec.
func (*KubernetesClusterAPISpec) DeepCopyInto ¶
func (in *KubernetesClusterAPISpec) DeepCopyInto(out *KubernetesClusterAPISpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KubernetesClusterApplicationBundle ¶
type KubernetesClusterApplicationBundle struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ApplicationBundleSpec `json:"spec"` Status ApplicationBundleStatus `json:"status,omitempty"` }
KubernetesClusterApplicationBundle defines a bundle of applications related with a particular custom resource e.g. a ControlPlane has vcluster, cert-manager and cluster-api applications associated with it. This forms the backbone of upgrades by allowing bundles to be switched out in control planes etc. +genclient +genclient:nonNamespaced +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:resource:scope=Cluster,categories=unikorn +kubebuilder:printcolumn:name="kind",type="string",JSONPath=".spec.kind" +kubebuilder:printcolumn:name="version",type="string",JSONPath=".spec.version" +kubebuilder:printcolumn:name="preview",type="string",JSONPath=".spec.preview" +kubebuilder:printcolumn:name="end of life",type="string",JSONPath=".spec.endOfLife" +kubebuilder:printcolumn:name="age",type="date",JSONPath=".metadata.creationTimestamp"
func (*KubernetesClusterApplicationBundle) DeepCopy ¶
func (in *KubernetesClusterApplicationBundle) DeepCopy() *KubernetesClusterApplicationBundle
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesClusterApplicationBundle.
func (*KubernetesClusterApplicationBundle) DeepCopyInto ¶
func (in *KubernetesClusterApplicationBundle) DeepCopyInto(out *KubernetesClusterApplicationBundle)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*KubernetesClusterApplicationBundle) DeepCopyObject ¶
func (in *KubernetesClusterApplicationBundle) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type KubernetesClusterApplicationBundleList ¶
type KubernetesClusterApplicationBundleList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []KubernetesClusterApplicationBundle `json:"items"` }
KubernetesClusterApplicationBundleList defines a list of application bundles. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*KubernetesClusterApplicationBundleList) DeepCopy ¶
func (in *KubernetesClusterApplicationBundleList) DeepCopy() *KubernetesClusterApplicationBundleList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesClusterApplicationBundleList.
func (*KubernetesClusterApplicationBundleList) DeepCopyInto ¶
func (in *KubernetesClusterApplicationBundleList) DeepCopyInto(out *KubernetesClusterApplicationBundleList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*KubernetesClusterApplicationBundleList) DeepCopyObject ¶
func (in *KubernetesClusterApplicationBundleList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (KubernetesClusterApplicationBundleList) Get ¶
func (l KubernetesClusterApplicationBundleList) Get(name string) *KubernetesClusterApplicationBundle
func (KubernetesClusterApplicationBundleList) Upgradable ¶
func (l KubernetesClusterApplicationBundleList) Upgradable() *KubernetesClusterApplicationBundleList
type KubernetesClusterControlPlaneSpec ¶
type KubernetesClusterControlPlaneSpec struct {
MachineGeneric `json:",inline"`
}
func (*KubernetesClusterControlPlaneSpec) DeepCopy ¶
func (in *KubernetesClusterControlPlaneSpec) DeepCopy() *KubernetesClusterControlPlaneSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesClusterControlPlaneSpec.
func (*KubernetesClusterControlPlaneSpec) DeepCopyInto ¶
func (in *KubernetesClusterControlPlaneSpec) DeepCopyInto(out *KubernetesClusterControlPlaneSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KubernetesClusterFeaturesSpec ¶
type KubernetesClusterFeaturesSpec struct { // Autoscaling, if true, provisions a cluster autoscaler // and allows workload pools to specify autoscaling configuration. Autoscaling *bool `json:"autoscaling,omitempty"` // Ingress, if true, provisions an Nginx ingress controller. Ingress *bool `json:"ingress,omitempty"` // CertManager, if true, provisions cert-manager. CertManager *bool `json:"certManager,omitempty"` // KubernetesDashboard, if true, provisions the kubernetes dashboard. // Clients must also enable the Ingress and CertManager features. KubernetesDashboard *bool `json:"kubernetesDashboard,omitempty"` // FileStorage, if true, enables a POSIX read/write many file storage. FileStorage *bool `json:"fileStorage,omitempty"` // Prometheus, if true, installs the Prometheus Operator. Prometheus *bool `json:"prometheus,omitempty"` // NvidiaOperator, if false do not install the Nvidia Operator, otherwise // install if GPU flavors are detected NvidiaOperator *bool `json:"nvidiaOperator,omitempty"` }
func (*KubernetesClusterFeaturesSpec) DeepCopy ¶
func (in *KubernetesClusterFeaturesSpec) DeepCopy() *KubernetesClusterFeaturesSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesClusterFeaturesSpec.
func (*KubernetesClusterFeaturesSpec) DeepCopyInto ¶
func (in *KubernetesClusterFeaturesSpec) DeepCopyInto(out *KubernetesClusterFeaturesSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KubernetesClusterList ¶
type KubernetesClusterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []KubernetesCluster `json:"items"` }
KubernetesClusterList is a typed list of kubernetes clusters. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*KubernetesClusterList) DeepCopy ¶
func (in *KubernetesClusterList) DeepCopy() *KubernetesClusterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesClusterList.
func (*KubernetesClusterList) DeepCopyInto ¶
func (in *KubernetesClusterList) DeepCopyInto(out *KubernetesClusterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*KubernetesClusterList) DeepCopyObject ¶
func (in *KubernetesClusterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type KubernetesClusterNetworkSpec ¶
type KubernetesClusterNetworkSpec struct { // NodeNetwork is the IPv4 prefix for the node network. NodeNetwork *IPv4Prefix `json:"nodeNetwork"` // PodNetwork is the IPv4 prefix for the pod network. PodNetwork *IPv4Prefix `json:"podNetwork"` // ServiceNetwork is the IPv4 prefix for the service network. ServiceNetwork *IPv4Prefix `json:"serviceNetwork"` // DNSNameservers sets the DNS nameservers for pods. // At present due to some technical challenges, this must contain // only one DNS server. // +listType=set // +kubebuilder:validation:MinItems=1 DNSNameservers []IPv4Address `json:"dnsNameservers"` }
func (*KubernetesClusterNetworkSpec) DeepCopy ¶
func (in *KubernetesClusterNetworkSpec) DeepCopy() *KubernetesClusterNetworkSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesClusterNetworkSpec.
func (*KubernetesClusterNetworkSpec) DeepCopyInto ¶
func (in *KubernetesClusterNetworkSpec) DeepCopyInto(out *KubernetesClusterNetworkSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KubernetesClusterOpenstackSpec ¶
type KubernetesClusterOpenstackSpec struct { // CACert is the CA used to trust the Openstack endpoint. CACert *[]byte `json:"caCert,omitempty"` // CloudConfig is a base64 encoded minimal clouds.yaml file for // use by the ControlPlane to provision the IaaS bits. CloudConfig *[]byte `json:"cloudConfig"` // Cloud is the clouds.yaml key that identifes the configuration // to use for provisioning. Cloud *string `json:"cloud"` // SSHKeyName is the SSH key name to use to provide access to the VMs. SSHKeyName *string `json:"sshKeyName,omitempty"` // FailureDomain is the global failure domain to use. The control plane // will always be deployed in this region. Individual worload pools will // default to this, but can override it. FailureDomain *string `json:"failureDomain"` // VolumeFailureDomain is the default failure domain to use for volumes // as these needn't match compute. For legacy reasons, this will default // to FailureDomain, but you shouldn't reply on this behaviour. VolumeFailureDomain *string `json:"volumeFailureDomain,omitempty"` // ExternalNetworkID is the Openstack external network ID. ExternalNetworkID *string `json:"externalNetworkId"` }
func (*KubernetesClusterOpenstackSpec) DeepCopy ¶
func (in *KubernetesClusterOpenstackSpec) DeepCopy() *KubernetesClusterOpenstackSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesClusterOpenstackSpec.
func (*KubernetesClusterOpenstackSpec) DeepCopyInto ¶
func (in *KubernetesClusterOpenstackSpec) DeepCopyInto(out *KubernetesClusterOpenstackSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KubernetesClusterSpec ¶
type KubernetesClusterSpec struct { // Pause, if true, will inhibit reconciliation. Pause bool `json:"pause,omitempty"` // Timeout is the maximum time to attempt to provision a cluster before aborting. // +kubebuilder:default="20m" Timeout *metav1.Duration `json:"timeout"` // Openstack defines global Openstack related configuration. Openstack *KubernetesClusterOpenstackSpec `json:"openstack"` // Network defines the Kubernetes networking. Network *KubernetesClusterNetworkSpec `json:"network"` // API defines Kubernetes API specific options. API *KubernetesClusterAPISpec `json:"api,omitempty"` // ControlPlane defines the control plane topology. ControlPlane *KubernetesClusterControlPlaneSpec `json:"controlPlane"` // WorkloadPools defines the workload cluster topology. WorkloadPools *KubernetesClusterWorkloadPoolsSpec `json:"workloadPools"` // Features defines add-on features that can be enabled for the cluster. Features *KubernetesClusterFeaturesSpec `json:"features,omitempty"` // ApplicationBundle defines the applications used to create the cluster. // Change this to a new bundle to start an upgrade. ApplicationBundle *string `json:"applicationBundle"` // ApplicationBundleAutoUpgrade enables automatic upgrade of application bundles. // When no properties are set in the specification, the platform will automatically // choose an upgrade time for your resource. This will be before a working day // (Mon-Fri) and before working hours (00:00-07:00 UTC). When any property is set // the platform will follow the rules for the upgrade method. ApplicationBundleAutoUpgrade *ApplicationBundleAutoUpgradeSpec `json:"applicationBundleAutoUpgrade,omitempty"` }
KubernetesClusterSpec defines the requested state of the Kubernetes cluster.
func (*KubernetesClusterSpec) DeepCopy ¶
func (in *KubernetesClusterSpec) DeepCopy() *KubernetesClusterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesClusterSpec.
func (*KubernetesClusterSpec) DeepCopyInto ¶
func (in *KubernetesClusterSpec) DeepCopyInto(out *KubernetesClusterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KubernetesClusterStatus ¶
type KubernetesClusterStatus struct { // Namespace defines the namespace a cluster resides in. Namespace string `json:"namespace,omitempty"` // Current service state of a Kubernetes cluster. Conditions []coreunikornv1.Condition `json:"conditions,omitempty"` }
KubernetesClusterStatus defines the observed state of the Kubernetes cluster.
func (*KubernetesClusterStatus) DeepCopy ¶
func (in *KubernetesClusterStatus) DeepCopy() *KubernetesClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesClusterStatus.
func (*KubernetesClusterStatus) DeepCopyInto ¶
func (in *KubernetesClusterStatus) DeepCopyInto(out *KubernetesClusterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KubernetesClusterWorkloadPoolsPoolSpec ¶
type KubernetesClusterWorkloadPoolsPoolSpec struct {
KubernetesWorkloadPoolSpec `json:",inline"`
}
func (*KubernetesClusterWorkloadPoolsPoolSpec) DeepCopy ¶
func (in *KubernetesClusterWorkloadPoolsPoolSpec) DeepCopy() *KubernetesClusterWorkloadPoolsPoolSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesClusterWorkloadPoolsPoolSpec.
func (*KubernetesClusterWorkloadPoolsPoolSpec) DeepCopyInto ¶
func (in *KubernetesClusterWorkloadPoolsPoolSpec) DeepCopyInto(out *KubernetesClusterWorkloadPoolsPoolSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KubernetesClusterWorkloadPoolsSpec ¶
type KubernetesClusterWorkloadPoolsSpec struct { // Pools contains an inline set of pools. This field will be ignored // when Selector is set. Inline pools are expected to be used for UI // generated clusters. Pools []KubernetesClusterWorkloadPoolsPoolSpec `json:"pools,omitempty"` }
func (*KubernetesClusterWorkloadPoolsSpec) DeepCopy ¶
func (in *KubernetesClusterWorkloadPoolsSpec) DeepCopy() *KubernetesClusterWorkloadPoolsSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesClusterWorkloadPoolsSpec.
func (*KubernetesClusterWorkloadPoolsSpec) DeepCopyInto ¶
func (in *KubernetesClusterWorkloadPoolsSpec) DeepCopyInto(out *KubernetesClusterWorkloadPoolsSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KubernetesWorkloadPoolSpec ¶
type KubernetesWorkloadPoolSpec struct { MachineGeneric `json:",inline"` // Name is the name of the pool. Name string `json:"name"` // FailureDomain is the failure domain to use for the pool. FailureDomain *string `json:"failureDomain,omitempty"` // Labels is the set of node labels to apply to the pool on // initialisation/join. Labels map[string]string `json:"labels,omitempty"` // Files are a set of files that can be installed onto the node // on initialisation/join. Files []File `json:"files,omitempty"` // Autoscaling contains optional sclaing limits and scheduling // hints for autoscaling. Autoscaling *MachineGenericAutoscaling `json:"autoscaling,omitempty"` }
KubernetesWorkloadPoolSpec defines the requested machine pool state.
func (*KubernetesWorkloadPoolSpec) DeepCopy ¶
func (in *KubernetesWorkloadPoolSpec) DeepCopy() *KubernetesWorkloadPoolSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesWorkloadPoolSpec.
func (*KubernetesWorkloadPoolSpec) DeepCopyInto ¶
func (in *KubernetesWorkloadPoolSpec) DeepCopyInto(out *KubernetesWorkloadPoolSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MachineGeneric ¶
type MachineGeneric struct { // Version is the Kubernetes version to install. For performance // reasons this should match what is already pre-installed on the // provided image. Version *SemanticVersion `json:"version"` // Image is the OpenStack Glance image to deploy with. Image *string `json:"image"` // Flavor is the OpenStack Nova flavor to deploy with. Flavor *string `json:"flavor"` // DiskSize is the persistent root disk size to deploy with. This // overrides the default ephemeral disk size defined in the flavor. DiskSize *resource.Quantity `json:"diskSize,omitempty"` // VolumeFailureDomain allows the volume failure domain to be set // on a per machine deployment basis. VolumeFailureDomain *string `json:"volumeFailureDomain,omitempty"` // Replicas is the initial pool size to deploy. // +kubebuilder:validation:Minimum=0 // +kubebuilder:default=3 Replicas *int `json:"replicas,omitempty"` // ServerGroupID sets the server group of the control plane in // order to maintain anti-affinity rules. ServerGroupID *string `json:"serverGroupId,omitempty"` }
MachineGeneric contains common things across all pool types, including Kubernetes control plane nodes and workload pools.
func (*MachineGeneric) DeepCopy ¶
func (in *MachineGeneric) DeepCopy() *MachineGeneric
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineGeneric.
func (*MachineGeneric) DeepCopyInto ¶
func (in *MachineGeneric) DeepCopyInto(out *MachineGeneric)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MachineGenericAutoscaling ¶
type MachineGenericAutoscaling struct { // MinimumReplicas defines the minimum number of replicas that // this pool can be scaled down to. // +kubebuilder:validation:Minimum=0 MinimumReplicas *int `json:"minimumReplicas"` // MaximumReplicas defines the maximum numer of replicas that // this pool can be scaled up to. // +kubebuilder:validation:Minimum=1 MaximumReplicas *int `json:"maximumReplicas"` // Scheduler is required when scale-from-zero support is requested // i.e. MimumumReplicas is 0. This provides scheduling hints to // the autoscaler as it cannot derive CPU/memory constraints from // the machine flavor. Scheduler *MachineGenericAutoscalingScheduler `json:"scheduler,omitempty"` }
MachineGenericAutoscaling defines generic autoscaling configuration. +kubebuilder:validation:XValidation:message="maximumReplicas must be greater than minimumReplicas",rule=(self.maximumReplicas > self.minimumReplicas)
func (*MachineGenericAutoscaling) DeepCopy ¶
func (in *MachineGenericAutoscaling) DeepCopy() *MachineGenericAutoscaling
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineGenericAutoscaling.
func (*MachineGenericAutoscaling) DeepCopyInto ¶
func (in *MachineGenericAutoscaling) DeepCopyInto(out *MachineGenericAutoscaling)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MachineGenericAutoscalingScheduler ¶
type MachineGenericAutoscalingScheduler struct { // CPU defines the number of CPUs for the pool flavor. // +kubebuilder:validation:Minimum=1 CPU *int `json:"cpu"` // Memory defines the amount of memory for the pool flavor. // Internally this will be rounded down to the nearest Gi. Memory *resource.Quantity `json:"memory"` // GPU needs to be set when the pool contains GPU resources so // the autoscaler can make informed choices when scaling up. GPU *MachineGenericAutoscalingSchedulerGPU `json:"gpu,omitempty"` }
MachineGenericAutoscalingScheduler defines generic autoscaling scheduling constraints.
func (*MachineGenericAutoscalingScheduler) DeepCopy ¶
func (in *MachineGenericAutoscalingScheduler) DeepCopy() *MachineGenericAutoscalingScheduler
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineGenericAutoscalingScheduler.
func (*MachineGenericAutoscalingScheduler) DeepCopyInto ¶
func (in *MachineGenericAutoscalingScheduler) DeepCopyInto(out *MachineGenericAutoscalingScheduler)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MachineGenericAutoscalingSchedulerGPU ¶
type MachineGenericAutoscalingSchedulerGPU struct { // Type is the type of GPU. // +kubebuilder:validation:Enum=nvidia.com/gpu Type *string `json:"type"` // Count is the number of GPUs for the pool flavor. // +kubebuilder:validation:Minimum=1 Count *int `json:"count"` }
MachineGenericAutoscalingSchedulerGPU defines generic autoscaling scheduling constraints for GPUs.
func (*MachineGenericAutoscalingSchedulerGPU) DeepCopy ¶
func (in *MachineGenericAutoscalingSchedulerGPU) DeepCopy() *MachineGenericAutoscalingSchedulerGPU
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineGenericAutoscalingSchedulerGPU.
func (*MachineGenericAutoscalingSchedulerGPU) DeepCopyInto ¶
func (in *MachineGenericAutoscalingSchedulerGPU) DeepCopyInto(out *MachineGenericAutoscalingSchedulerGPU)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Project ¶
type Project struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ProjectSpec `json:"spec"` Status ProjectStatus `json:"status,omitempty"` }
Project is an abstraction around control planes that provides namespacing of ControlPlanes. +genclient +genclient:nonNamespaced +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:resource:scope=Cluster,categories=unikorn +kubebuilder:subresource:status +kubebuilder:printcolumn:name="namespace",type="string",JSONPath=".status.namespace" +kubebuilder:printcolumn:name="status",type="string",JSONPath=".status.conditions[?(@.type==\"Available\")].reason" +kubebuilder:printcolumn:name="age",type="date",JSONPath=".metadata.creationTimestamp"
func (*Project) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Project.
func (*Project) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Project) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Project) ResourceLabels ¶
ResourceLabels generates a set of labels to uniquely identify the resource if it were to be placed in a single global namespace.
func (*Project) StatusConditionRead ¶
func (c *Project) StatusConditionRead(t coreunikornv1.ConditionType) (*coreunikornv1.Condition, error)
StatusConditionRead scans the status conditions for an existing condition whose type matches.
func (*Project) StatusConditionWrite ¶
func (c *Project) StatusConditionWrite(t coreunikornv1.ConditionType, status corev1.ConditionStatus, reason coreunikornv1.ConditionReason, message string)
StatusConditionWrite either adds or updates a condition in the control plane status. If the condition, status and message match an existing condition the update is ignored.
type ProjectList ¶
type ProjectList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Project `json:"items"` }
ProjectList is a typed list of projects. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*ProjectList) DeepCopy ¶
func (in *ProjectList) DeepCopy() *ProjectList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectList.
func (*ProjectList) DeepCopyInto ¶
func (in *ProjectList) DeepCopyInto(out *ProjectList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ProjectList) DeepCopyObject ¶
func (in *ProjectList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ProjectSpec ¶
type ProjectSpec struct { // Pause, if true, will inhibit reconciliation. Pause bool `json:"pause,omitempty"` }
ProjectSpec defines project specific metadata.
func (*ProjectSpec) DeepCopy ¶
func (in *ProjectSpec) DeepCopy() *ProjectSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectSpec.
func (*ProjectSpec) DeepCopyInto ¶
func (in *ProjectSpec) DeepCopyInto(out *ProjectSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ProjectStatus ¶
type ProjectStatus struct { // Namespace defines the namespace a project resides in. Namespace string `json:"namespace,omitempty"` // Current service state of a project. Conditions []coreunikornv1.Condition `json:"conditions,omitempty"` }
ProjectStatus defines the status of the project.
func (*ProjectStatus) DeepCopy ¶
func (in *ProjectStatus) DeepCopy() *ProjectStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectStatus.
func (*ProjectStatus) DeepCopyInto ¶
func (in *ProjectStatus) DeepCopyInto(out *ProjectStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SemanticVersion ¶
type SemanticVersion string
+kubebuilder:validation:Pattern="^v(?:[0-9]+\\.){2}(?:[0-9]+)$"