Documentation ¶
Index ¶
- func FindSubnet(c *kops.Cluster, subnetName string) *kops.ClusterSubnetSpec
- func FindZonesForInstanceGroup(c *kops.Cluster, ig *kops.InstanceGroup) ([]string, error)
- func IsBaseURL(kubernetesVersion string) bool
- func UseChallengeCallback(cloudProvider kops.CloudProviderID) bool
- func UseCiliumEtcd(cluster *kops.Cluster) bool
- func UseExternalKubeletCredentialProvider(k8sVersion *KubernetesVersion, cloudProvider kops.CloudProviderID) bool
- func UseKopsControllerForNodeConfig(cluster *kops.Cluster) bool
- type InstanceGroup
- type KubernetesVersion
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 ¶
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
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
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
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