api

package
v0.0.0-...-d276228 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: MIT-0 Imports: 16 Imported by: 0

Documentation

Overview

+kubebuilder:object:generate=true +groupName=node.eks.aws

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultFalse

func DefaultFalse(key Feature, featureGates map[Feature]bool) bool

func DefaultTrue

func DefaultTrue(key Feature, featureGates map[Feature]bool) bool

func IsFeatureEnabled

func IsFeatureEnabled(feature Feature, featureGates map[Feature]bool) bool

func ValidateNodeConfig

func ValidateNodeConfig(cfg *NodeConfig) error

Types

type ClusterDetails

type ClusterDetails struct {
	Name                 string `json:"name,omitempty"`
	APIServerEndpoint    string `json:"apiServerEndpoint,omitempty"`
	CertificateAuthority []byte `json:"certificateAuthority,omitempty"`
	CIDR                 string `json:"cidr,omitempty"`
	EnableOutpost        *bool  `json:"enableOutpost,omitempty"`
	ID                   string `json:"id,omitempty"`
}

func (*ClusterDetails) DeepCopy

func (in *ClusterDetails) DeepCopy() *ClusterDetails

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterDetails.

func (*ClusterDetails) DeepCopyInto

func (in *ClusterDetails) DeepCopyInto(out *ClusterDetails)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterDetails) GetClusterDns

func (details *ClusterDetails) GetClusterDns() (string, error)

Derive the default ClusterIP of the kube-dns service from EKS built-in CoreDNS addon

type ContainerdOptions

type ContainerdOptions struct {
	// Config is an inline containerd config toml document that can be provided
	// by the user to override default generated configurations
	// https://github.com/containerd/containerd/blob/main/docs/man/containerd-config.toml.5.md
	Config string `json:"config,omitempty"`
}

func (*ContainerdOptions) DeepCopy

func (in *ContainerdOptions) DeepCopy() *ContainerdOptions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerdOptions.

func (*ContainerdOptions) DeepCopyInto

func (in *ContainerdOptions) DeepCopyInto(out *ContainerdOptions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DefaultOptions

type DefaultOptions struct {
	SandboxImage string `json:"sandboxImage,omitempty"`
}

func (*DefaultOptions) DeepCopy

func (in *DefaultOptions) DeepCopy() *DefaultOptions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DefaultOptions.

func (*DefaultOptions) DeepCopyInto

func (in *DefaultOptions) DeepCopyInto(out *DefaultOptions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Feature

type Feature string
const (
	// InstanceIdNodeName will use EC2 instance ID as node name
	InstanceIdNodeName Feature = "InstanceIdNodeName"
)

type IPFamily

type IPFamily string
const (
	IPFamilyIPv4 IPFamily = "ipv4"
	IPFamilyIPv6 IPFamily = "ipv6"
)

func GetCIDRIpFamily

func GetCIDRIpFamily(cidr string) (IPFamily, error)

type InlineDocument

type InlineDocument map[string]runtime.RawExtension

InlineDocument is an alias to a dynamically typed map. This allows using embedded YAML and JSON types within the parent yaml config.

func (InlineDocument) DeepCopy

func (in InlineDocument) DeepCopy() InlineDocument

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InlineDocument.

func (InlineDocument) DeepCopyInto

func (in InlineDocument) DeepCopyInto(out *InlineDocument)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type InstanceDetails

type InstanceDetails struct {
	ID               string `json:"id,omitempty"`
	Region           string `json:"region,omitempty"`
	Type             string `json:"type,omitempty"`
	AvailabilityZone string `json:"availabilityZone,omitempty"`
	MAC              string `json:"mac,omitempty"`
	PrivateDNSName   string `json:"privateDnsName,omitempty"`
}

func GetInstanceDetails

func GetInstanceDetails(ctx context.Context, featureGates map[Feature]bool, imdsClient *imds.Client, ec2Client *ec2.Client) (*InstanceDetails, error)

Fetch information about the ec2 instance using IMDS data. This information is stored into the internal config to avoid redundant calls to IMDS when looking for instance metadata

func (*InstanceDetails) DeepCopy

func (in *InstanceDetails) DeepCopy() *InstanceDetails

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstanceDetails.

func (*InstanceDetails) DeepCopyInto

func (in *InstanceDetails) DeepCopyInto(out *InstanceDetails)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type InstanceOptions

type InstanceOptions struct {
	LocalStorage LocalStorageOptions `json:"localStorage,omitempty"`
}

func (*InstanceOptions) DeepCopy

func (in *InstanceOptions) DeepCopy() *InstanceOptions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstanceOptions.

func (*InstanceOptions) DeepCopyInto

func (in *InstanceOptions) DeepCopyInto(out *InstanceOptions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type KubeletOptions

type KubeletOptions struct {
	// Config is a kubelet config that can be provided by the user to override
	// default generated configurations
	// https://kubernetes.io/docs/reference/config-api/kubelet-config.v1/
	Config InlineDocument `json:"config,omitempty"`
	// Flags is a list of command-line kubelet arguments. These arguments are
	// amended to the generated defaults, and therefore will act as overrides
	// https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/
	Flags []string `json:"flags,omitempty"`
}

func (*KubeletOptions) DeepCopy

func (in *KubeletOptions) DeepCopy() *KubeletOptions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeletOptions.

func (*KubeletOptions) DeepCopyInto

func (in *KubeletOptions) DeepCopyInto(out *KubeletOptions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LocalStorageOptions

type LocalStorageOptions struct {
	Strategy LocalStorageStrategy `json:"strategy,omitempty"`
}

func (*LocalStorageOptions) DeepCopy

func (in *LocalStorageOptions) DeepCopy() *LocalStorageOptions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalStorageOptions.

func (*LocalStorageOptions) DeepCopyInto

func (in *LocalStorageOptions) DeepCopyInto(out *LocalStorageOptions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LocalStorageStrategy

type LocalStorageStrategy string
const (
	LocalStorageRAID0 LocalStorageStrategy = "RAID0"
	LocalStorageMount LocalStorageStrategy = "Mount"
)

type NodeConfig

type NodeConfig struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              NodeConfigSpec `json:"spec,omitempty"`
	// +k8s:conversion-gen=false
	Status NodeConfigStatus `json:"status,omitempty"`
}

func (*NodeConfig) DeepCopy

func (in *NodeConfig) DeepCopy() *NodeConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeConfig.

func (*NodeConfig) DeepCopyInto

func (in *NodeConfig) DeepCopyInto(out *NodeConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeConfig) DeepCopyObject

func (in *NodeConfig) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*NodeConfig) Merge

func (dst *NodeConfig) Merge(src *NodeConfig) error

Merges two NodeConfigs with custom collision handling

type NodeConfigList

type NodeConfigList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`

	Items []NodeConfig `json:"items"`
}

func (*NodeConfigList) DeepCopy

func (in *NodeConfigList) DeepCopy() *NodeConfigList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeConfigList.

func (*NodeConfigList) DeepCopyInto

func (in *NodeConfigList) DeepCopyInto(out *NodeConfigList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeConfigList) DeepCopyObject

func (in *NodeConfigList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NodeConfigSpec

type NodeConfigSpec struct {
	Cluster      ClusterDetails    `json:"cluster,omitempty"`
	Containerd   ContainerdOptions `json:"containerd,omitempty"`
	Instance     InstanceOptions   `json:"instance,omitempty"`
	Kubelet      KubeletOptions    `json:"kubelet,omitempty"`
	FeatureGates map[Feature]bool  `json:"featureGates,omitempty"`
}

func (*NodeConfigSpec) DeepCopy

func (in *NodeConfigSpec) DeepCopy() *NodeConfigSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeConfigSpec.

func (*NodeConfigSpec) DeepCopyInto

func (in *NodeConfigSpec) DeepCopyInto(out *NodeConfigSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodeConfigStatus

type NodeConfigStatus struct {
	Instance InstanceDetails `json:"instance,omitempty"`
	Defaults DefaultOptions  `json:"default,omitempty"`
}

func (*NodeConfigStatus) DeepCopy

func (in *NodeConfigStatus) DeepCopy() *NodeConfigStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeConfigStatus.

func (*NodeConfigStatus) DeepCopyInto

func (in *NodeConfigStatus) DeepCopyInto(out *NodeConfigStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Directories

Path Synopsis
Package bridge translates between internal and external API types.
Package bridge translates between internal and external API types.

Jump to

Keyboard shortcuts

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