Documentation
¶
Overview ¶
Package kubernetes provides cluster-wide kubernetes utilities.
Index ¶
- func DetectLowestVersion(ctx context.Context, cluster UpgradeProvider, options UpgradeOptions) (string, error)
- func Upgrade(ctx context.Context, cluster UpgradeProvider, options UpgradeOptions) error
- func ValidateImageReference(ref string) error
- func VerifyVersionCompatibility(ctx context.Context, talosClient *client.Client, nodes []string, ...) error
- 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 Upgrade ¶ added in v1.4.0
func Upgrade(ctx context.Context, cluster UpgradeProvider, options UpgradeOptions) error
Upgrade the Kubernetes control plane components, manifests, kubelets.
func ValidateImageReference ¶ added in v1.10.0
ValidateImageReference validates if the provided string is a valid Docker image reference.
func VerifyVersionCompatibility ¶ added in v1.11.0
func VerifyVersionCompatibility(ctx context.Context, talosClient *client.Client, nodes []string, k8sVersion string, logger func(string, ...any)) error
VerifyVersionCompatibility checks if the given Kubernetes version is compatible with the current Talos version.
Types ¶
type UpgradeOptions ¶
type UpgradeOptions struct {
Path *upgrade.Path
ControlPlaneEndpoint string
LogOutput io.Writer
PrePullImages bool
UpgradeKubelet bool
DryRun bool
EncoderOpt encoder.Option
KubeletImage string
APIServerImage string
ControllerManagerImage string
SchedulerImage string
ProxyImage string
// contains filtered or unexported fields
}
UpgradeOptions represents Kubernetes control plane upgrade settings.
func (*UpgradeOptions) Log ¶
func (options *UpgradeOptions) Log(line string, args ...any)
Log writes the line to logger or to stdout if no logger was provided.
func (*UpgradeOptions) Validate ¶ added in v1.10.0
func (options *UpgradeOptions) Validate() error
Validate checks all image references in the upgrade options.
type UpgradeProvider ¶
type UpgradeProvider interface {
cluster.ClientProvider
cluster.K8sProvider
}
UpgradeProvider are the cluster interfaces required by upgrade process.