Documentation ¶
Overview ¶
+k8s:deepcopy-gen=package,register +groupName=unikorn-cloud.org
Index ¶
- Constants
- Variables
- func CompareClusterManager(a, b ClusterManager) int
- func CompareClusterManagerApplicationBundle(a, b ClusterManagerApplicationBundle) 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 ClusterManager
- func (in *ClusterManager) DeepCopy() *ClusterManager
- func (in *ClusterManager) DeepCopyInto(out *ClusterManager)
- func (in *ClusterManager) DeepCopyObject() runtime.Object
- func (c ClusterManager) Entropy() []byte
- func (c *ClusterManager) Paused() bool
- func (c *ClusterManager) ResourceLabels() (labels.Set, error)
- func (c *ClusterManager) StatusConditionRead(t unikornv1core.ConditionType) (*unikornv1core.Condition, error)
- func (c *ClusterManager) StatusConditionWrite(t unikornv1core.ConditionType, status corev1.ConditionStatus, ...)
- func (c ClusterManager) UpgradeSpec() *ApplicationBundleAutoUpgradeSpec
- type ClusterManagerApplicationBundle
- type ClusterManagerApplicationBundleList
- func (in *ClusterManagerApplicationBundleList) DeepCopy() *ClusterManagerApplicationBundleList
- func (in *ClusterManagerApplicationBundleList) DeepCopyInto(out *ClusterManagerApplicationBundleList)
- func (in *ClusterManagerApplicationBundleList) DeepCopyObject() runtime.Object
- func (l ClusterManagerApplicationBundleList) Get(name string) *ClusterManagerApplicationBundle
- func (l ClusterManagerApplicationBundleList) Upgradable() *ClusterManagerApplicationBundleList
- type ClusterManagerList
- type ClusterManagerSpec
- type ClusterManagerStatus
- type File
- type KubernetesCluster
- func (c *KubernetesCluster) AutoscalingEnabled() 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) GPUOperatorEnabled() bool
- func (c *KubernetesCluster) GetWorkloadPool(name string) *KubernetesClusterWorkloadPoolsPoolSpec
- func (c *KubernetesCluster) Paused() bool
- func (c *KubernetesCluster) ResourceLabels() (labels.Set, error)
- func (c *KubernetesCluster) StatusConditionRead(t unikornv1core.ConditionType) (*unikornv1core.Condition, error)
- func (c *KubernetesCluster) StatusConditionWrite(t unikornv1core.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 KubernetesClusterFeaturesSpec
- type KubernetesClusterList
- type KubernetesClusterNetworkSpec
- type KubernetesClusterSpec
- type KubernetesClusterStatus
- type KubernetesClusterWorkloadPoolsPoolSpec
- type KubernetesClusterWorkloadPoolsSpec
- type KubernetesWorkloadPoolSpec
- type MachineGenericAutoscaling
Constants ¶
const ( // GroupName is the Kubernetes API group our resources belong to. GroupName = "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 ( // 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 )
Functions ¶
func CompareClusterManager ¶
func CompareClusterManager(a, b ClusterManager) int
func CompareClusterManagerApplicationBundle ¶
func CompareClusterManagerApplicationBundle(a, b ClusterManagerApplicationBundle) 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 unikornv1core.SemanticVersion `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) (*unikornv1core.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 *unikornv1core.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 ClusterManager ¶
type ClusterManager struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ClusterManagerSpec `json:"spec"` Status ClusterManagerStatus `json:"status,omitempty"` }
ClusterManager 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="display name",type="string",JSONPath=".metadata.labels['unikorn-cloud\\.org/name']" +kubebuilder:printcolumn:name="bundle",type="string",JSONPath=".spec.applicationBundle" +kubebuilder:printcolumn:name="status",type="string",JSONPath=".status.conditions[?(@.type==\"Available\")].reason" +kubebuilder:printcolumn:name="age",type="date",JSONPath=".metadata.creationTimestamp"
func (*ClusterManager) DeepCopy ¶
func (in *ClusterManager) DeepCopy() *ClusterManager
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterManager.
func (*ClusterManager) DeepCopyInto ¶
func (in *ClusterManager) DeepCopyInto(out *ClusterManager)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterManager) DeepCopyObject ¶
func (in *ClusterManager) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (ClusterManager) Entropy ¶
func (c ClusterManager) Entropy() []byte
func (*ClusterManager) Paused ¶
func (c *ClusterManager) Paused() bool
Paused implements the ReconcilePauser interface.
func (*ClusterManager) ResourceLabels ¶
func (c *ClusterManager) 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 (*ClusterManager) StatusConditionRead ¶
func (c *ClusterManager) StatusConditionRead(t unikornv1core.ConditionType) (*unikornv1core.Condition, error)
StatusConditionRead scans the status conditions for an existing condition whose type matches.
func (*ClusterManager) StatusConditionWrite ¶
func (c *ClusterManager) StatusConditionWrite(t unikornv1core.ConditionType, status corev1.ConditionStatus, reason unikornv1core.ConditionReason, message string)
StatusConditionWrite either adds or updates a condition in the cluster manager status. If the condition, status and message match an existing condition the update is ignored.
func (ClusterManager) UpgradeSpec ¶
func (c ClusterManager) UpgradeSpec() *ApplicationBundleAutoUpgradeSpec
type ClusterManagerApplicationBundle ¶
type ClusterManagerApplicationBundle struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ApplicationBundleSpec `json:"spec"` Status ApplicationBundleStatus `json:"status,omitempty"` }
ClusterManagerApplicationBundle defines a bundle of applications related with a particular custom resource e.g. a ClusterManager 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 cluster managers etc. +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:resource:scope=Namespaced,categories=unikorn +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 (*ClusterManagerApplicationBundle) DeepCopy ¶
func (in *ClusterManagerApplicationBundle) DeepCopy() *ClusterManagerApplicationBundle
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterManagerApplicationBundle.
func (*ClusterManagerApplicationBundle) DeepCopyInto ¶
func (in *ClusterManagerApplicationBundle) DeepCopyInto(out *ClusterManagerApplicationBundle)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterManagerApplicationBundle) DeepCopyObject ¶
func (in *ClusterManagerApplicationBundle) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterManagerApplicationBundleList ¶
type ClusterManagerApplicationBundleList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ClusterManagerApplicationBundle `json:"items"` }
ClusterManagerApplicationBundleList defines a list of application bundles. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*ClusterManagerApplicationBundleList) DeepCopy ¶
func (in *ClusterManagerApplicationBundleList) DeepCopy() *ClusterManagerApplicationBundleList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterManagerApplicationBundleList.
func (*ClusterManagerApplicationBundleList) DeepCopyInto ¶
func (in *ClusterManagerApplicationBundleList) DeepCopyInto(out *ClusterManagerApplicationBundleList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterManagerApplicationBundleList) DeepCopyObject ¶
func (in *ClusterManagerApplicationBundleList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (ClusterManagerApplicationBundleList) Get ¶
func (l ClusterManagerApplicationBundleList) Get(name string) *ClusterManagerApplicationBundle
Get retrieves the named bundle.
func (ClusterManagerApplicationBundleList) Upgradable ¶
func (l ClusterManagerApplicationBundleList) Upgradable() *ClusterManagerApplicationBundleList
Upgradable returns a new list of bundles that are "stable" e.g. not end of life and not a preview.
type ClusterManagerList ¶
type ClusterManagerList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ClusterManager `json:"items"` }
ClusterManagerList is a typed list of cluster managers. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*ClusterManagerList) DeepCopy ¶
func (in *ClusterManagerList) DeepCopy() *ClusterManagerList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterManagerList.
func (*ClusterManagerList) DeepCopyInto ¶
func (in *ClusterManagerList) DeepCopyInto(out *ClusterManagerList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterManagerList) DeepCopyObject ¶
func (in *ClusterManagerList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterManagerSpec ¶
type ClusterManagerSpec struct { // Pause, if true, will inhibit reconciliation. Pause bool `json:"pause,omitempty"` // ApplicationBundle defines the applications used to create the cluster manager. // 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"` }
ClusterManagerSpec defines any cluster manager specific options.
func (*ClusterManagerSpec) DeepCopy ¶
func (in *ClusterManagerSpec) DeepCopy() *ClusterManagerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterManagerSpec.
func (*ClusterManagerSpec) DeepCopyInto ¶
func (in *ClusterManagerSpec) DeepCopyInto(out *ClusterManagerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterManagerStatus ¶
type ClusterManagerStatus struct { // Current service state of a cluster manager. Conditions []unikornv1core.Condition `json:"conditions,omitempty"` }
ClusterManagerStatus defines the status of the project.
func (*ClusterManagerStatus) DeepCopy ¶
func (in *ClusterManagerStatus) DeepCopy() *ClusterManagerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterManagerStatus.
func (*ClusterManagerStatus) DeepCopyInto ¶
func (in *ClusterManagerStatus) DeepCopyInto(out *ClusterManagerStatus)
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 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="display name",type="string",JSONPath=".metadata.labels['unikorn-cloud\\.org/name']" +kubebuilder:printcolumn:name="bundle",type="string",JSONPath=".spec.applicationBundle" +kubebuilder:printcolumn:name="version",type="string",JSONPath=".spec.version" +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) 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) GPUOperatorEnabled ¶ added in v0.2.38
func (c *KubernetesCluster) GPUOperatorEnabled() bool
GPUOperatorEnabled indicates whether to install the GPU operator.
func (*KubernetesCluster) GetWorkloadPool ¶ added in v0.2.42
func (c *KubernetesCluster) GetWorkloadPool(name string) *KubernetesClusterWorkloadPoolsPoolSpec
func (*KubernetesCluster) Paused ¶
func (c *KubernetesCluster) Paused() bool
Paused implements the ReconcilePauser interface.
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 unikornv1core.ConditionType) (*unikornv1core.Condition, error)
StatusConditionRead scans the status conditions for an existing condition whose type matches.
func (*KubernetesCluster) StatusConditionWrite ¶
func (c *KubernetesCluster) StatusConditionWrite(t unikornv1core.ConditionType, status corev1.ConditionStatus, reason unikornv1core.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 []unikornv1core.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 ClusterManager 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 cluster managers etc. +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:resource:scope=Namespaced,categories=unikorn +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 KubernetesClusterFeaturesSpec ¶
type KubernetesClusterFeaturesSpec struct { // Autoscaling enables the provision of a cluster autoscaler. // This is only installed if a workload pool has autoscaling enabled. Autoscaling *bool `json:"autoscaling,omitempty"` // GPUOperator enables the provision of a GPU operator. // This is only installed if a workload pool has a flavor that defines // a valid GPU specification and vendor. GPUOperator *bool `json:"gpuOperator,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 { unikornv1core.NetworkGeneric `json:",inline"` // PodNetwork is the IPv4 prefix for the pod network. PodNetwork *unikornv1core.IPv4Prefix `json:"podNetwork"` // ServiceNetwork is the IPv4 prefix for the service network. ServiceNetwork *unikornv1core.IPv4Prefix `json:"serviceNetwork"` }
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 KubernetesClusterSpec ¶
type KubernetesClusterSpec struct { // Pause, if true, will inhibit reconciliation. Pause bool `json:"pause,omitempty"` // Region to provision the cluster in. RegionID string `json:"regionId"` // ClusterManager that provides lifecycle management for the cluster. ClusterManagerID string `json:"clusterManagerId"` // Version is the Kubernetes version to install. For performance // reasons this should match what is already pre-installed on the // provided image. Version *unikornv1core.SemanticVersion `json:"version"` // Network defines the Kubernetes networking. Network *KubernetesClusterNetworkSpec `json:"network"` // API defines Kubernetes API specific options. API *KubernetesClusterAPISpec `json:"api,omitempty"` // ControlPlane defines the cluster manager topology. ControlPlane *unikornv1core.MachineGeneric `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 []unikornv1core.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 { unikornv1core.MachineGeneric `json:",inline"` // Name is the name of the pool. Name string `json:"name"` // 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 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"` }
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.