model

package
v1.31.0-beta.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2024 License: Apache-2.0 Imports: 6 Imported by: 104

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindSubnet

func FindSubnet(c *kops.Cluster, subnetName string) *kops.ClusterSubnetSpec

FindSubnet returns the subnet with the specified name, or returns nil

func FindZonesForInstanceGroup

func FindZonesForInstanceGroup(c *kops.Cluster, ig *kops.InstanceGroup) ([]string, error)

FindZonesForInstanceGroup computes the zones for an instance group, which are the zones directly declared in the InstanceGroup, or the subnet zones

func IsBaseURL added in v1.31.0

func IsBaseURL(kubernetesVersion string) bool

IsBaseURL checks if the version string is a URL, rather than a version identifier. URLs are typically used for CI builds and during development.

func UseChallengeCallback added in v1.27.0

func UseChallengeCallback(cloudProvider kops.CloudProviderID) bool

UseChallengeCallback is true if we should use a callback challenge during node provisioning with kops-controller.

func UseCiliumEtcd added in v1.19.0

func UseCiliumEtcd(cluster *kops.Cluster) bool

UseCiliumEtcd is true if we are using the Cilium etcd cluster.

func UseExternalKubeletCredentialProvider added in v1.29.0

func UseExternalKubeletCredentialProvider(k8sVersion *KubernetesVersion, cloudProvider kops.CloudProviderID) bool

Configures a Kubelet Credential Provider if Kubernetes is newer than a specific version

func UseKopsControllerForNodeConfig added in v1.26.0

func UseKopsControllerForNodeConfig(cluster *kops.Cluster) bool

UseKopsControllerForNodeConfig checks if nodeup should use kops-controller to get nodeup.Config.

Types

type InstanceGroup added in v1.31.0

type InstanceGroup interface {
	// KubernetesVersion returns the Kubernetes version for the instance group
	KubernetesVersion() *KubernetesVersion

	// GetCloudProvider returns the cloud provider for the instance group
	GetCloudProvider() kops.CloudProviderID

	// RawClusterSpec returns the cluster spec for the instance group.
	// If possible, prefer abstracted methods over accessing this data directly.
	RawClusterSpec() *kops.ClusterSpec

	// ForceKubernetesVersion overrides the Kubernetes version for this instance group.
	// (The default is to use the cluster-wide Kubernetes version, but this allows
	// us to override it for the nodes to respect the node skew policy.)
	ForceKubernetesVersion(version string) error
}

InstanceGroup is a subset of the full Cluster and InstanceGroup functionality, that gives us some abstraction over the raw types.

func ForInstanceGroup added in v1.31.0

func ForInstanceGroup(cluster *kops.Cluster, ig *kops.InstanceGroup) (InstanceGroup, error)

ForInstanceGroup creates an InstanceGroup model for the given cluster and instance group.

type KubernetesVersion added in v1.31.0

type KubernetesVersion struct {
	// contains filtered or unexported fields
}

KubernetesVersion is a wrapper over semver functionality, that offers some functionality particularly useful for kubernetes version semantics.

func MustParseKubernetesVersion added in v1.31.0

func MustParseKubernetesVersion(versionString string) *KubernetesVersion

MustParseKubernetesVersion parses a Kubernetes version string and panics if it fails.

func ParseKubernetesVersion added in v1.31.0

func ParseKubernetesVersion(versionString string) (*KubernetesVersion, error)

ParseKubernetesVersion parses a Kubernetes version string and returns a KubernetesVersion object.

func (KubernetesVersion) IsBaseURL added in v1.31.0

func (v KubernetesVersion) IsBaseURL() bool

IsBaseURL checks if the version string is a URL, rather than a version identifier. URLs are typically used for CI builds and during development.

func (KubernetesVersion) IsGTE added in v1.31.0

func (v KubernetesVersion) IsGTE(version string) bool

IsGTE checks if the version is greater than or equal (>=) to the specified version. It panics if the kubernetes version in the cluster is invalid, or if the version is invalid.

func (KubernetesVersion) IsLT added in v1.31.0

func (v KubernetesVersion) IsLT(version string) bool

IsLT checks if the version is strictly less (<) than the specified version. It panics if the kubernetes version in the cluster is invalid, or if the version is invalid.

func (KubernetesVersion) Minor added in v1.31.0

func (v KubernetesVersion) Minor() int

Minor returns the minor version of the Kubernetes version.

func (KubernetesVersion) String added in v1.31.0

func (v KubernetesVersion) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL