nodeup

package
v1.28.5 Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: Apache-2.0 Imports: 6 Imported by: 130

Documentation

Index

Constants

View Source
const BootstrapAPIVersion = "bootstrap.kops.k8s.io/v1alpha1"

Variables

This section is empty.

Functions

func NewConfig added in v1.19.0

func NewConfig(cluster *kops.Cluster, instanceGroup *kops.InstanceGroup) (*Config, *BootConfig)

func UsesInstanceIDForNodeName added in v1.24.0

func UsesInstanceIDForNodeName(cluster *kops.Cluster) bool

Types

type APIServerConfig added in v1.21.3

type APIServerConfig struct {
	// ClusterDNSDomain is the suffix we use for internal DNS names (normally cluster.local).
	ClusterDNSDomain string
	// KubeAPIServer is a copy of the KubeAPIServerConfig from the cluster spec.
	KubeAPIServer *kops.KubeAPIServerConfig
	// API controls how the Kubernetes API is exposed.
	API kops.APISpec
	// Authentication is a copy of the AuthenticationSpec from the cluster spec.
	Authentication *kops.AuthenticationSpec `json:",omitempty"`
	// EncryptionConfigSecretHash is a hash of the encryptionconfig secret.
	// It is empty if EncryptionConfig is not enabled.
	// TODO: give secrets IDs and look them up like we do keypairs.
	EncryptionConfigSecretHash string `json:",omitempty"`
	// ServiceAccountPublicKeys are the service-account public keys to trust.
	ServiceAccountPublicKeys string
}

APIServerConfig is additional configuration for nodes running an APIServer.

type BootConfig added in v1.21.3

type BootConfig struct {
	// CloudProvider is the cloud provider in use.
	CloudProvider kops.CloudProviderID
	// ConfigBase is the base VFS path for config objects.
	ConfigBase *string `json:",omitempty"`
	// ConfigServer holds the configuration for the configuration server.
	ConfigServer *ConfigServerOptions `json:",omitempty"`
	// APIServerIPs is the API server IP addresses.
	// This field is used for adding an alias for api.internal. in /etc/hosts, when Topology.DNS.Type == DNSTypeNone.
	APIServerIPs []string `json:",omitempty"`
	// ClusterName is the name of the cluster.
	ClusterName string `json:",omitempty"`
	// InstanceGroupName is the name of the instance group.
	InstanceGroupName string `json:",omitempty"`
	// InstanceGroupRole is the instance group role.
	InstanceGroupRole kops.InstanceGroupRole
	// NodeupConfigHash holds a secure hash of the nodeup.Config.
	NodeupConfigHash string
}

BootConfig is the configuration for the nodeup binary that might be too big to fit in userdata.

type BootstrapRequest added in v1.19.0

type BootstrapRequest struct {
	// APIVersion defines the versioned schema of this representation of a request.
	APIVersion string `json:"apiVersion"`
	// Certs are the requested certificates and their respective public keys.
	Certs map[string]string `json:"certs"`
	// KeypairIDs are the keypair IDs of the CAs to use for issuing certificates.
	KeypairIDs map[string]string `json:"keypairIDs"`

	// IncludeNodeConfig controls whether the cluster & instance group configuration should be returned.
	// This allows for nodes without access to the kops state store.
	IncludeNodeConfig bool `json:"includeNodeConfig"`

	// Challenge is for a callback challenge.
	Challenge *ChallengeRequest `json:"challenge,omitempty"`
}

BootstrapRequest is a request from nodeup to kops-controller for bootstrapping a node.

type BootstrapResponse added in v1.19.0

type BootstrapResponse struct {
	// Certs are the issued certificates.
	Certs map[string]string `json:"Certs,omitempty"`

	// NodeConfig contains the node configuration, if IncludeNodeConfig is set.
	NodeConfig *NodeConfig `json:"nodeConfig,omitempty"`
}

BootstrapResponse is a response to a BootstrapRequest.

type ChallengeRequest added in v1.27.0

type ChallengeRequest struct {
	Endpoint        string `json:"endpoint,omitempty"`
	ServerCA        []byte `json:"ca,omitempty"`
	ChallengeID     string `json:"challengeID,omitempty"`
	ChallengeSecret []byte `json:"challengeSecret,omitempty"`
}

ChallengeRequest describes the callback challenge.

type Config

type Config struct {
	// Assets are locations where we can find files to be installed
	// TODO: Remove once everything is in containers?
	Assets map[architectures.Architecture][]string `json:",omitempty"`
	// Images are a list of images we should preload
	Images map[architectures.Architecture][]*Image `json:"images,omitempty"`
	// ClusterName is the name of the cluster
	ClusterName string `json:",omitempty"`
	// Channels is a list of channels that we should apply
	Channels []string `json:"channels,omitempty"`
	// ApiserverAdditionalIPs are additional IP address to put in the apiserver server cert.
	ApiserverAdditionalIPs []string `json:",omitempty"`
	// KubernetesVersion is the version of Kubernetes to install.
	KubernetesVersion string
	// Packages specifies additional packages to be installed.
	Packages []string `json:"packages,omitempty"`

	// ConfigStore configures the stores that nodes use to get their configuration when they don't use kops-controller.
	ConfigStore *kops.ConfigStoreSpec `json:"configStore,omitempty"`

	// EtcdClusterNames are the names of the etcd clusters.
	EtcdClusterNames []string `json:",omitempty"`
	// EtcdManifests are the manifests for running etcd.
	EtcdManifests []string `json:"etcdManifests,omitempty"`

	// CAs are the CA certificates to trust.
	CAs map[string]string
	// KeypairIDs are the IDs of keysets used to sign things.
	KeypairIDs map[string]string
	// DefaultMachineType is the first-listed instance machine type, used if querying instance metadata fails.
	DefaultMachineType *string `json:",omitempty"`
	// EnableLifecycleHook defines whether we need to complete a lifecycle hook.
	EnableLifecycleHook bool `json:",omitempty"`
	// StaticManifests describes generic static manifests
	// Using this allows us to keep complex logic out of nodeup
	StaticManifests []*StaticManifest `json:"staticManifests,omitempty"`
	// KubeletConfig defines the kubelet configuration.
	KubeletConfig kops.KubeletConfigSpec
	// KubeProxy defines the kube-proxy configuration.
	KubeProxy *kops.KubeProxyConfig
	// Networking configures networking.
	Networking kops.NetworkingSpec
	// UseCiliumEtcd is true when a Cilium etcd cluster is present.
	UseCiliumEtcd bool `json:",omitempty"`
	// UsesKubenet specifies that the CNI is derived from Kubenet.
	UsesKubenet bool `json:",omitempty"`
	// NTPUnmanaged is true when NTP is not managed by kOps.
	NTPUnmanaged bool `json:",omitempty"`
	// ServiceNodePortRange is the service NodePort range.
	ServiceNodePortRange string `json:",omitempty"`
	// SysctlParameters will configure kernel parameters using sysctl(8).
	SysctlParameters []string `json:",omitempty"`
	// UpdatePolicy determines the policy for applying upgrades automatically.
	UpdatePolicy string
	// VolumeMounts are a collection of volume mounts.
	VolumeMounts []kops.VolumeMountSpec `json:",omitempty"`

	// FileAssets are a collection of file assets for this instance group.
	FileAssets []kops.FileAssetSpec `json:",omitempty"`
	// Hooks are for custom actions, for example on first installation.
	Hooks [][]kops.HookSpec
	// ContainerRuntime is the container runtime to use for Kubernetes.
	ContainerRuntime string
	// ContainerdConfig holds the configuration for containerd.
	ContainerdConfig *kops.ContainerdConfig `json:"containerdConfig,omitempty"`
	// Docker holds the configuration for docker.
	Docker *kops.DockerConfig `json:"docker,omitempty"`

	// APIServerConfig is additional configuration for nodes running an APIServer.
	APIServerConfig *APIServerConfig `json:",omitempty"`
	// ControlPlaneConfig is additional configuration for control-plane nodes.
	ControlPlaneConfig *ControlPlaneConfig `json:",omitempty"`
	// GossipConfig is configuration for gossip DNS.
	GossipConfig *kops.GossipConfig `json:",omitempty"`
	// DNSZone is the DNS zone we should use when configuring DNS.
	DNSZone string `json:",omitempty"`
	// NvidiaGPU contains the configuration for nvidia
	NvidiaGPU *kops.NvidiaGPUConfig `json:",omitempty"`

	// AWS-specific
	// DisableSecurityGroupIngress disables the Cloud Controller Manager's creation
	// of an AWS Security Group for each load balancer provisioned for a Service.
	DisableSecurityGroupIngress *bool `json:"disableSecurityGroupIngress,omitempty"`
	// ElbSecurityGroup specifies an existing AWS Security group for the Cloud Controller
	// Manager to assign to each ELB provisioned for a Service, instead of creating
	// one per ELB.
	ElbSecurityGroup *string `json:"elbSecurityGroup,omitempty"`
	// NodeIPFamilies controls the IP families reported for each node.
	NodeIPFamilies []string `json:"nodeIPFamilies,omitempty"`
	// UseInstanceIDForNodeName uses the instance ID instead of the hostname for the node name.
	UseInstanceIDForNodeName bool `json:"useInstanceIDForNodeName,omitempty"`
	// WarmPoolImages are the container images to pre-pull during instance pre-initialization
	WarmPoolImages []string `json:"warmPoolImages,omitempty"`

	// Azure-specific
	// AzureLocation is the location of the resource group that the cluster is deployed in.
	AzureLocation string `json:",omitempty"`
	// AzureSubscriptionID is the ID of the Azure Subscription that the cluster is deployed in.
	AzureSubscriptionID string `json:",omitempty"`
	// AzureTenantID is the ID of the tenant that the cluster is deployed in.
	AzureTenantID string `json:",omitempty"`
	// AzureResourceGroup is the name of the resource group that the cluster is deployed in.
	AzureResourceGroup string `json:",omitempty"`
	// AzureRouteTableName is the name of the route table attached to the subnet that the cluster is deployed in.
	AzureRouteTableName string `json:",omitempty"`

	// GCE-specific
	Multizone          *bool   `json:"multizone,omitempty"`
	NodeTags           *string `json:"nodeTags,omitempty"`
	NodeInstancePrefix *string `json:"nodeInstancePrefix,omitempty"`

	// Openstack-specific
	Openstack *kops.OpenstackSpec `json:",omitempty"`

	// Discovery methods
	UsesLegacyGossip bool `json:"usesLegacyGossip"`
	UsesNoneDNS      bool `json:"usesNoneDNS"`
}

Config is the configuration for the nodeup binary

type ConfigServerOptions added in v1.21.0

type ConfigServerOptions struct {
	// Servers are the addresses of the configuration servers to use (kops-controller)
	Servers []string `json:"servers,omitempty"`
	// CACertificates are the certificates to trust for fi.CertificateIDCA.
	CACertificates string
}

type ControlPlaneConfig added in v1.28.0

type ControlPlaneConfig struct {
	// KubeControllerManager is the configuration for the kube-controller-manager.
	KubeControllerManager kops.KubeControllerManagerConfig
	// KubeScheduler is the configuration for the kube-scheduler.
	KubeScheduler kops.KubeSchedulerConfig
}

ControlPlaneConfig is additional configuration for control-plane nodes.

type Image

type Image struct {
	// This is the name we would pass to "docker run", whereas source could be a URL from which we would download an image.
	Name string `json:"name,omitempty"`
	// Sources is a list of URLs from which we should download the image
	Sources []string `json:"sources,omitempty"`
	// Hash is the hash of the file, to verify image integrity (even over http)
	Hash string `json:"hash,omitempty"`
}

Image is a docker image we should pre-load

type NodeConfig added in v1.21.0

type NodeConfig struct {
	// NodeupConfig holds the nodeup.Config for the node's instance group.
	NodeupConfig string `json:"nodeupConfig,omitempty"`

	// NodeSecrets holds the secrets for the node (like `dockerconfig`).
	NodeSecrets map[string][]byte `json:"nodeSecrets,omitempty"`
}

NodeConfig holds configuration needed to boot a node (without the kops state store)

type NodeConfigCertificate added in v1.21.0

type NodeConfigCertificate struct {
	// Name identifies the certificate.
	Name string `json:"name,omitempty"`

	// Cert is the certificate data.
	Cert string `json:"cert,omitempty"`
}

NodeConfigCertificate holds a certificate that the node needs to boot.

type StaticManifest added in v1.17.0

type StaticManifest struct {
	// Key identifies the static manifest
	Key string `json:"key,omitempty"`
	// Path is the path to the manifest
	Path string `json:"path,omitempty"`
}

StaticManifest is a generic static manifest

Jump to

Keyboard shortcuts

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