Documentation ¶
Overview ¶
Package kubernetes provides cluster-wide kubernetes utilities.
Index ¶
- func DetectLowestVersion(ctx context.Context, cluster UpgradeProvider, options UpgradeOptions) (string, error)
- func UpgradeTalosManaged(ctx context.Context, cluster UpgradeProvider, options UpgradeOptions) error
- type K8sComponentItem
- type K8sComponentRemovedItemsError
- func (e K8sComponentRemovedItemsError) Error() string
- func (e K8sComponentRemovedItemsError) ErrorOrNil() error
- func (e *K8sComponentRemovedItemsError) PopulateRemovedAdmissionPlugins(node, component string, apiServerCLIFlags []string, ...)
- func (e *K8sComponentRemovedItemsError) PopulateRemovedCLIFlags(node, component string, apiServerCLIFlags []string, removedFlags []string)
- func (e *K8sComponentRemovedItemsError) PopulateRemovedFeatureGates(node, component string, apiServerCLIFlags []string, ...)
- type K8sUpgradeChecks
- type UpgradeOptions
- type UpgradeProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DetectLowestVersion ¶
func DetectLowestVersion(ctx context.Context, cluster UpgradeProvider, options UpgradeOptions) (string, error)
DetectLowestVersion returns lowest Kubernetes components versions in the cluster.
func UpgradeTalosManaged ¶
func UpgradeTalosManaged(ctx context.Context, cluster UpgradeProvider, options UpgradeOptions) error
UpgradeTalosManaged the Kubernetes control plane.
Types ¶
type K8sComponentItem ¶
K8sComponentItem represents a component item.
type K8sComponentRemovedItemsError ¶
type K8sComponentRemovedItemsError struct { AdmissionFlags []K8sComponentItem CLIFlags []K8sComponentItem FeatureGates []K8sComponentItem }
K8sComponentRemovedItemsError is an error type for removed items.
func (K8sComponentRemovedItemsError) Error ¶
func (e K8sComponentRemovedItemsError) Error() string
Error returns the error message.
func (K8sComponentRemovedItemsError) ErrorOrNil ¶
func (e K8sComponentRemovedItemsError) ErrorOrNil() error
ErrorOrNil returns the error if it exists.
func (*K8sComponentRemovedItemsError) PopulateRemovedAdmissionPlugins ¶
func (e *K8sComponentRemovedItemsError) PopulateRemovedAdmissionPlugins(node, component string, apiServerCLIFlags []string, removedAdmissionPlugins []string)
PopulateRemovedAdmissionPlugins populates the removed admission plugins.
func (*K8sComponentRemovedItemsError) PopulateRemovedCLIFlags ¶
func (e *K8sComponentRemovedItemsError) PopulateRemovedCLIFlags(node, component string, apiServerCLIFlags []string, removedFlags []string)
PopulateRemovedCLIFlags populates the removed flags.
func (*K8sComponentRemovedItemsError) PopulateRemovedFeatureGates ¶
func (e *K8sComponentRemovedItemsError) PopulateRemovedFeatureGates(node, component string, apiServerCLIFlags []string, removedFeatureGates []string)
PopulateRemovedFeatureGates populates the removed feature gates.
type K8sUpgradeChecks ¶
type K8sUpgradeChecks struct {
// contains filtered or unexported fields
}
K8sUpgradeChecks is a set of checks to run before upgrading k8s components.
func NewK8sUpgradeChecks ¶
func NewK8sUpgradeChecks(state state.State, options UpgradeOptions, controlPlaneNodes []string) (*K8sUpgradeChecks, error)
NewK8sUpgradeChecks initializes and returns K8sUpgradeChecks.
type UpgradeOptions ¶
type UpgradeOptions struct { FromVersion string ToVersion string ControlPlaneEndpoint string LogOutput io.Writer UpgradeKubelet bool DryRun bool // contains filtered or unexported fields }
UpgradeOptions represents Kubernetes control plane upgrade settings.
func (*UpgradeOptions) Log ¶
func (options *UpgradeOptions) Log(line string, args ...interface{})
Log writes the line to logger or to stdout if no logger was provided.
func (*UpgradeOptions) Path ¶
func (options *UpgradeOptions) Path() string
Path returns upgrade path in a form "FromMajor.FromMinor->ToMajor.ToMinor" (e.g. "1.20->1.21"), or empty string, if one or both versions can't be parsed.
type UpgradeProvider ¶
type UpgradeProvider interface { cluster.ClientProvider cluster.K8sProvider }
UpgradeProvider are the cluster interfaces required by upgrade process.