Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterDefaults(scheme *runtime.Scheme) error
- func Resource(resource string) schema.GroupResource
- func SetObjectDefaults_KubeUpgradePlan(in *KubeUpgradePlan)
- func SetObjectDefaults_KubeUpgradePlanList(in *KubeUpgradePlanList)
- func SetObjectDefaults_KubeUpgradeSpec(spec *KubeUpgradeSpec)
- func SetObjectDefaults_UpgradedConfig(cfg *UpgradedConfig)
- func ValidateObject_KubeUpgradePlan(plan *KubeUpgradePlan) error
- func ValidateObject_KubeUpgradeSpec(spec KubeUpgradeSpec) error
- func ValidateObject_KubeUpgradeStatus(status KubeUpgradeStatus) error
- func ValidateObject_UpgradedConfig(cfg *UpgradedConfig) error
- type KubeUpgradePlan
- type KubeUpgradePlanGroup
- type KubeUpgradePlanList
- type KubeUpgradeSpec
- type KubeUpgradeStatus
- type UpgradedConfig
Constants ¶
const ( PlanStatusUnknown = "Unknown" PlanStatusProgressing = "Progressing" PlanStatusWaiting = "Waiting" PlanStatusComplete = "Complete" )
const (
DefaultStatus = "Unknown"
)
Variables ¶
var ( SchemeBuilder runtime.SchemeBuilder AddToScheme = localSchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{
Group: "kubeupgrade.heathcliff.eu",
Version: "v1alpha1",
}
Define your schema name and the version
Functions ¶
func RegisterDefaults ¶
RegisterDefaults adds defaulters functions to the given scheme. Public to allow building arbitrary schemes. All generated defaulters are covering - they call all nested defaulters.
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
func SetObjectDefaults_KubeUpgradePlan ¶
func SetObjectDefaults_KubeUpgradePlan(in *KubeUpgradePlan)
func SetObjectDefaults_KubeUpgradePlanList ¶
func SetObjectDefaults_KubeUpgradePlanList(in *KubeUpgradePlanList)
func SetObjectDefaults_KubeUpgradeSpec ¶
func SetObjectDefaults_KubeUpgradeSpec(spec *KubeUpgradeSpec)
func SetObjectDefaults_UpgradedConfig ¶ added in v0.2.0
func SetObjectDefaults_UpgradedConfig(cfg *UpgradedConfig)
func ValidateObject_KubeUpgradePlan ¶ added in v0.3.0
func ValidateObject_KubeUpgradePlan(plan *KubeUpgradePlan) error
func ValidateObject_KubeUpgradeSpec ¶ added in v0.3.0
func ValidateObject_KubeUpgradeSpec(spec KubeUpgradeSpec) error
func ValidateObject_KubeUpgradeStatus ¶ added in v0.3.0
func ValidateObject_KubeUpgradeStatus(status KubeUpgradeStatus) error
func ValidateObject_UpgradedConfig ¶ added in v0.3.0
func ValidateObject_UpgradedConfig(cfg *UpgradedConfig) error
Types ¶
type KubeUpgradePlan ¶
type KubeUpgradePlan struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // +required Spec KubeUpgradeSpec `json:"spec" valid:"required"` // +optional Status KubeUpgradeStatus `json:"status,omitempty"` }
+genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:printcolumn:JSONPath=.spec.kubernetesVersion,name=Version,type=string,description="The targeted kubernetes version" +kubebuilder:printcolumn:JSONPath=.status.summary,name=Status,type=string,description="A summary of the overall status of the cluster" +kubebuilder:resource:scope=Cluster,shortName=plan +kubebuilder:object:root=true +kubebuilder:subresource:status
func (*KubeUpgradePlan) DeepCopy ¶
func (in *KubeUpgradePlan) DeepCopy() *KubeUpgradePlan
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeUpgradePlan.
func (*KubeUpgradePlan) DeepCopyInto ¶
func (in *KubeUpgradePlan) DeepCopyInto(out *KubeUpgradePlan)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*KubeUpgradePlan) DeepCopyObject ¶
func (in *KubeUpgradePlan) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type KubeUpgradePlanGroup ¶
type KubeUpgradePlanGroup struct { // Specify group(s) that should be upgraded first. // Should be used to ensure control-plane nodes are upgraded first. // +optional // +kubebuilder:example=control-plane DependsOn []string `json:"dependsOn,omitempty"` // The labels by which to filter for this group // +required // +kubebuilder:validation:MinProperties=1 // +kubebuilder:example="node-role.kubernetes.io/control-plane;node-role.kubernetes.io/compute" Labels map[string]string `json:"labels"` // The configuration for all upgraded daemons in the group. Overwrites global parameters. // +optional // +nullable Upgraded *UpgradedConfig `json:"upgraded,omitempty"` }
func (*KubeUpgradePlanGroup) DeepCopy ¶
func (in *KubeUpgradePlanGroup) DeepCopy() *KubeUpgradePlanGroup
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeUpgradePlanGroup.
func (*KubeUpgradePlanGroup) DeepCopyInto ¶
func (in *KubeUpgradePlanGroup) DeepCopyInto(out *KubeUpgradePlanGroup)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KubeUpgradePlanList ¶
type KubeUpgradePlanList struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ListMeta `json:"metadata,omitempty"` Items []KubeUpgradePlan `json:"items"` }
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:object:root=true
func (*KubeUpgradePlanList) DeepCopy ¶
func (in *KubeUpgradePlanList) DeepCopy() *KubeUpgradePlanList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeUpgradePlanList.
func (*KubeUpgradePlanList) DeepCopyInto ¶
func (in *KubeUpgradePlanList) DeepCopyInto(out *KubeUpgradePlanList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*KubeUpgradePlanList) DeepCopyObject ¶
func (in *KubeUpgradePlanList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type KubeUpgradeSpec ¶
type KubeUpgradeSpec struct { // The kubernetes version the cluster should be at. // If the actual version differs, the cluster will be upgraded // +required // +kubebuilder:example=v1.31.0 // +kubebuilder:validation:Pattern=^v[0-9]+\.[0-9]+\.[0-9]+$ KubernetesVersion string `json:"kubernetesVersion"` // The different groups in which the nodes will be upgraded. // At minimum needs to separate control-plane from compute nodes, to ensure that control-plane nodes will be upgraded first. // +required // +kubebuilder:validation:MinProperties=1 Groups map[string]KubeUpgradePlanGroup `json:"groups"` // The configuration for all upgraded daemons. Can be overwritten by group specific config. // +optional // +nullable Upgraded *UpgradedConfig `json:"upgraded,omitempty"` }
func (*KubeUpgradeSpec) DeepCopy ¶
func (in *KubeUpgradeSpec) DeepCopy() *KubeUpgradeSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeUpgradeSpec.
func (*KubeUpgradeSpec) DeepCopyInto ¶
func (in *KubeUpgradeSpec) DeepCopyInto(out *KubeUpgradeSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KubeUpgradeStatus ¶
type KubeUpgradeStatus struct { // A summary of the overall status of the cluster // +kubebuilder:validation:Enum=Unknown;Waiting;Progressing;Complete Summary string `json:"summary,omitempty"` // The current status of each group Groups map[string]string `json:"groups,omitempty"` }
func (*KubeUpgradeStatus) DeepCopy ¶
func (in *KubeUpgradeStatus) DeepCopy() *KubeUpgradeStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeUpgradeStatus.
func (*KubeUpgradeStatus) DeepCopyInto ¶
func (in *KubeUpgradeStatus) DeepCopyInto(out *KubeUpgradeStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UpgradedConfig ¶ added in v0.2.0
type UpgradedConfig struct { // The container image repository for os rebases // +optional // +default="ghcr.io/heathcliff26/fcos-k8s" // +kubebuilder:example="ghcr.io/heathcliff26/fcos-k8s" Stream string `json:"stream,omitempty"` // URL for the fleetlock server. Needs to be set either globally or for each node // +optional // +kubebuilder:example="https://fleetlock.example.com" FleetlockURL string `json:"fleetlock-url"` // The group to use for fleetlock // +default="default" // +kubebuilder:example="control-plane;compute" FleetlockGroup string `json:"fleetlock-group,omitempty"` // The interval between regular checks // +optional // +kubebuilder:validation:Format=duration // +default="3h" // +kubebuilder:example="3h;24h;30m" CheckInterval string `json:"check-interval,omitempty"` // The interval between retries when an operation fails // +optional // +kubebuilder:validation:Format=duration // +default="5m" // +kubebuilder:example="5m;1m;30s" RetryInterval string `json:"retry-interval,omitempty"` }
func (*UpgradedConfig) DeepCopy ¶ added in v0.2.0
func (in *UpgradedConfig) DeepCopy() *UpgradedConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpgradedConfig.
func (*UpgradedConfig) DeepCopyInto ¶ added in v0.2.0
func (in *UpgradedConfig) DeepCopyInto(out *UpgradedConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.