nodetemplates

package
v0.0.0-...-6d1ffee Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const AmazonEC2NodeTemplateConfigurationFileKey = "amazonec2Config"

The json/yaml config key for the Amazon node template config

View Source
const AzureNodeTemplateConfigurationFileKey = "azureConfig"

The json/yaml config key for the Azure node template config

View Source
const HarvesterNodeTemplateConfigurationFileKey = "harvesterConfig"

The json/yaml config key for the Harvester node template config

View Source
const LinodeNodeTemplateConfigurationFileKey = "linodeConfig"

The json/yaml config key for the Linode node template config

View Source
const NodeTemplateConfigurationFileKey = "nodeTemplate"

The json/yaml config key for the node template config

View Source
const VmwareVsphereNodeTemplateConfigurationFileKey = "vmwarevsphereConfig"

The json/yaml config key for the VSphere node template config

Variables

This section is empty.

Functions

This section is empty.

Types

type AmazonEC2NodeTemplateConfig

type AmazonEC2NodeTemplateConfig struct {
	AMI                     string   `json:"ami" yaml:"ami"`
	BlockDurationMinutes    string   `json:"blockDurationMinutes" yaml:"blockDurationMinutes"`
	DeviceName              string   `json:"deviceName" yaml:"deviceName"`
	EncryptEBSVolume        bool     `json:"encryptEbsVolume" yaml:"encryptEbsVolume"`
	Endpoint                string   `json:"endpoint" yaml:"endpoint"`
	HTTPEndpoint            string   `json:"httpEndpoint" yaml:"httpEndpoint"`
	HTTPTokens              string   `json:"httpTokens" yaml:"httpTokens"`
	IAMInstanceProfile      string   `json:"iamInstanceProfile" yaml:"iamInstanceProfile"`
	InsecureTransport       bool     `json:"insecureTransport" yaml:"insecureTransport"`
	InstanceType            string   `json:"instanceType" yaml:"instanceType"`
	KeyPairName             string   `json:"keyPairName" yaml:"keyPairName"`
	KMSKey                  string   `json:"kmsKey" yaml:"kmsKey"`
	Monitoring              bool     `json:"monitoring" yaml:"monitoring"`
	PrivateAddressOnly      bool     `json:"privateAddressOnly" yaml:"privateAddressOnly"`
	Region                  string   `json:"region" yaml:"region"`
	RequestSpotInstance     bool     `json:"requestSpotInstance" yaml:"requestSpotInstance"`
	Retries                 string   `json:"retries" yaml:"retries"`
	RootSize                string   `json:"rootSize" yaml:"rootSize"`
	SecurityGroup           []string `json:"securityGroup" yaml:"securityGroup"`
	SecurityGroupReadonly   bool     `json:"securityGroupReadonly" yaml:"securityGroupReadonly"`
	SessionToken            string   `json:"sessionToken" yaml:"sessionToken"`
	SpotPrice               string   `json:"spotPrice" yaml:"spotPrice"`
	SSHKeyContexts          string   `json:"sshKeyContexts" yaml:"sshKeyContexts"`
	SSHUser                 string   `json:"sshUser" yaml:"sshUser"`
	SubnetID                string   `json:"subnetId" yaml:"subnetId"`
	Tags                    string   `json:"tags" yaml:"tags"`
	Type                    string   `json:"type" yaml:"type"`
	UsePrivateAddress       bool     `json:"usePrivateAddress" yaml:"usePrivateAddress"`
	UseEbsOptimizedInstance bool     `json:"useEbsOptimizedInstance" yaml:"useEbsOptimizedInstance"`
	VolumeType              string   `json:"volumeType" yaml:"volumeType"`
	VPCId                   string   `json:"vpcId" yaml:"vpcId"`
	Zone                    string   `json:"zone" yaml:"zone"`
}

AmazonNodeTemplateConfig is configuration need to create a Amazon node template

type AzureNodeTemplateConfig

type AzureNodeTemplateConfig struct {
	AvailabilitySet   string   `json:"availabilitySet" yaml:"availabilitySet"`
	CustomData        string   `json:"customData" yaml:"customData"`
	DiskSize          string   `json:"diskSize" yaml:"diskSize"`
	DNS               string   `json:"dns" yaml:"dns"`
	DockerPort        string   `json:"dockerPort" yaml:"dockerPort"`
	Environment       string   `json:"environment" yaml:"environment"`
	FaultDomainCount  string   `json:"faultDomainCount" yaml:"faultDomainCount"`
	Image             string   `json:"image" yaml:"image"`
	Location          string   `json:"location" yaml:"location"`
	ManagedDisks      bool     `json:"managedDisks" yaml:"managedDisks"`
	NoPublicIP        bool     `json:"noPublicIp" yaml:"noPublicIp"`
	OpenPort          []string `json:"openPort" yaml:"openPort"`
	NSG               string   `json:"nsg" yaml:"nsg"`
	Plan              string   `json:"plan" yaml:"plan"`
	PrivateIPAddress  string   `json:"privateIpAddress" yaml:"privateIpAddress"`
	ResourceGroup     string   `json:"resourceGroup" yaml:"resourceGroup"`
	Size              string   `json:"size" yaml:"size"`
	SSHUser           string   `json:"sshUser" yaml:"sshUser"`
	StaticPublicIP    bool     `json:"staticPublicIp" yaml:"staticPublicIp"`
	StorageType       string   `json:"storageType" yaml:"storageType"`
	Subnet            string   `json:"subnet" yaml:"subnet"`
	SubnetPrefix      string   `json:"subnetPrefix" yaml:"subnetPrefix"`
	Type              string   `json:"type" yaml:"type"`
	UpdateDomainCount string   `json:"updateDomainCount" yaml:"updateDomainCount"`
	UsePrivateIP      bool     `json:"usePrivateIp" yaml:"usePrivateIp"`
	VNET              string   `json:"vnet" yaml:"vnet"`
}

AzureNodeTemplateConfig is configuration need to create a Azure node template

type HarvesterNodeTemplateConfig

type HarvesterNodeTemplateConfig struct {
	CloudConfig       string `json:"cloudConfig" yaml:"cloudConfig"`
	CPUCount          string `json:"cpuCount" yaml:"cpuCount"`
	DiskBus           string `json:"diskBus" yaml:"diskBus"`
	DiskSize          string `json:"diskSize" yaml:"diskSize"`
	ImageName         string `json:"imageName" yaml:"imageName"`
	KeyPairName       string `json:"keyPairName" yaml:"keyPairName"`
	MemorySize        string `json:"memorySize" yaml:"memorySize"`
	NetworkData       string `json:"networkData" yaml:"networkData"`
	NetworkModel      string `json:"networkModel" yaml:"networkModel"`
	NetworkName       string `json:"networkName" yaml:"networkName"`
	NetworkType       string `json:"networkType" yaml:"networkType"`
	SSHPassword       string `json:"sshPassword" yaml:"sshPassword"`
	SSHPort           string `json:"sshPort" yaml:"sshPort"`
	SSHPrivateKeyPath string `json:"sshPrivateKeyPath" yaml:"sshPrivateKeyPath"`
	SSHUser           string `json:"sshUser" yaml:"sshUser"`
	Type              string `json:"type" yaml:"type"`
	UserData          string `json:"userData" yaml:"userData"`
	VMAffinity        string `json:"vmAffinity" yaml:"vmAffinity"`
	VMNamespace       string `json:"vmNamespace" yaml:"vmNamespace"`
}

HarvesterNodeTemplateConfig is configuration need to create a Harvester node template

type LinodeNodeTemplateConfig

type LinodeNodeTemplateConfig struct {
	AuthorizedUsers string `json:"authorizedUsers" yaml:"authorizedUsers"`
	CreatePrivateIP bool   `json:"createPrivateIP" yaml:"createPrivateIP"`
	DockerPort      string `json:"dockerPort" yaml:"dockerPort"`
	Image           string `json:"image" yaml:"image"`
	InstanceType    string `json:"instanceType" yaml:"instanceType"`
	Label           string `json:"label" yaml:"label"`
	Region          string `json:"region" yaml:"region"`
	RootPass        string `json:"rootPass" yaml:"rootPass"`
	SSHPort         string `json:"sshPort" yaml:"sshPort"`
	SSHUser         string `json:"sshUser" yaml:"sshUser"`
	Stackscript     string `json:"stackscript" yaml:"stackscript"`
	StackscriptData string `json:"stackscriptData" yaml:"stackscriptData"`
	SwapSize        string `json:"swapSize" yaml:"swapSize"`
	Tags            string `json:"tags" yaml:"tags"`
	Type            string `json:"type" yaml:"type"`
	UAPrefix        string `json:"uaPrefix" yaml:"uaPrefix"`
}

LinodeNodeTemplateConfig is configuration need to create a Linode node template

type NodeTemplate

type NodeTemplate struct {
	types.Resource
	Annotations                     map[string]string                `json:"annotations,omitempty" yaml:"annotations,omitempty"`
	AuthCertificateAuthority        string                           `json:"authCertificateAuthority,omitempty" yaml:"authCertificateAuthority,omitempty"`
	AuthKey                         string                           `json:"authKey,omitempty" yaml:"authKey,omitempty"`
	CloudCredentialID               string                           `json:"cloudCredentialId,omitempty" yaml:"cloudCredentialId,omitempty"`
	Created                         string                           `json:"created,omitempty" yaml:"created,omitempty"`
	CreatorID                       string                           `json:"creatorId,omitempty" yaml:"creatorId,omitempty"`
	Description                     string                           `json:"description,omitempty" yaml:"description,omitempty"`
	DockerVersion                   string                           `json:"dockerVersion,omitempty" yaml:"dockerVersion,omitempty"`
	Driver                          string                           `json:"driver,omitempty" yaml:"driver,omitempty"`
	EngineEnv                       map[string]string                `json:"engineEnv,omitempty" yaml:"engineEnv,omitempty"`
	EngineInsecureRegistry          []string                         `json:"engineInsecureRegistry,omitempty" yaml:"engineInsecureRegistry,omitempty"`
	EngineInstallURL                string                           `json:"engineInstallURL,omitempty" yaml:"engineInstallURL,omitempty"`
	EngineLabel                     map[string]string                `json:"engineLabel,omitempty" yaml:"engineLabel,omitempty"`
	EngineOpt                       map[string]string                `json:"engineOpt,omitempty" yaml:"engineOpt,omitempty"`
	EngineRegistryMirror            []string                         `json:"engineRegistryMirror,omitempty" yaml:"engineRegistryMirror,omitempty"`
	EngineStorageDriver             string                           `json:"engineStorageDriver,omitempty" yaml:"engineStorageDriver,omitempty"`
	Label                           map[string]string                `json:"label,omitempty" yaml:"label,omitempty"`
	AmazonEC2NodeTemplateConfig     *AmazonEC2NodeTemplateConfig     `json:"amazonec2Config" yaml:"amazonec2Config,omitempty"`
	AzureNodeTemplateConfig         *AzureNodeTemplateConfig         `json:"azureConfig" yaml:"azureConfig,omitempty"`
	HarvesterNodeTemplateConfig     *HarvesterNodeTemplateConfig     `json:"harvesterConfig" yaml:"harvesterConfig,omitempty"`
	LinodeNodeTemplateConfig        *LinodeNodeTemplateConfig        `json:"linodeConfig" yaml:"linodeConfig,omitempty"`
	VmwareVsphereNodeTemplateConfig *VmwareVsphereNodeTemplateConfig `json:"vmwarevsphereConfig" yaml:"vmwarevsphereConfig,omitempty"`
	Name                            string                           `json:"name,omitempty" yaml:"name,omitempty"`
	NamespaceID                     string                           `json:"namespaceId,omitempty" yaml:"namespaceId,omitempty"`
	Removed                         string                           `json:"removed,omitempty" yaml:"removed,omitempty"`
	State                           string                           `json:"state,omitempty" yaml:"state,omitempty"`
	Transitioning                   string                           `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
	TransitioningMessage            string                           `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"`
	Type                            string                           `json:"type,omitempty" yaml:"type,omitempty"`
	UUID                            string                           `json:"uuid,omitempty" yaml:"uuid,omitempty"`
	UseInternalIPAddress            *bool                            `json:"useInternalIpAddress,omitempty" yaml:"useInternalIpAddress,omitempty"`
}

NodeTemplate is the main struct needed to create a node template for an RKE1 cluster

func (*NodeTemplate) MergeOverride

func (n1 *NodeTemplate) MergeOverride(n2 *NodeTemplate, providerTemplateConfigKey string) (*NodeTemplate, error)

MergeOverride merges two NodeTemplate objects by overriding fields from n1 with fields from n2

  • preserves fields not present in n2
  • deletes all provider keys except the specified providerTemplateConfigKey from both NodeTemplate objects before merging

providerTemplateConfigKey: The key representing the provider template configuration to preserve during merging

returns a pointer to the merged NodeTemplate and an error if any

type VmwareVsphereNodeTemplateConfig

type VmwareVsphereNodeTemplateConfig struct {
	Cfgparam              []string `json:"cfgparam" yaml:"cfgparam"`
	CloneFrom             string   `json:"cloneFrom" yaml:"cloneFrom"`
	CloudConfig           string   `json:"cloudConfig" yaml:"cloudConfig"`
	Cloundinit            string   `json:"cloundinit" yaml:"cloundinit"`
	ContentLibrary        string   `json:"contentLibrary" yaml:"contentLibrary"`
	CPUCount              string   `json:"cpuCount" yaml:"cpuCount"`
	CreationType          string   `json:"creationType" yaml:"creationType"`
	CustomAttribute       []string `json:"customAttribute" yaml:"customAttribute"`
	Datacenter            string   `json:"datacenter" yaml:"datacenter"`
	Datastore             string   `json:"datastore" yaml:"datastore"`
	DatastoreURL          string   `json:"datatoreURL" yaml:"datastoreURL"`
	DatastoreCluster      string   `json:"datastoreCluster" yaml:"datastoreCluster"`
	DiskSize              string   `json:"diskSize" yaml:"diskSize"`
	Folder                string   `json:"folder" yaml:"folder"`
	HostSystem            string   `json:"hostSystem" yaml:"hostSystem"`
	MemorySize            string   `json:"memorySize" yaml:"memorySize"`
	Network               []string `json:"network" yaml:"network"`
	OS                    string   `json:"os" yaml:"os"`
	Password              string   `json:"password" yaml:"password"`
	Pool                  string   `json:"pool" yaml:"pool"`
	SSHPassword           string   `json:"sshPassword" yaml:"sshPassword"`
	SSHPort               string   `json:"sshPort" yaml:"sshPort"`
	SSHUser               string   `json:"sshUser" yaml:"sshUser"`
	SSHUserGroup          string   `json:"sshUserGroup" yaml:"sshUserGroup"`
	Tag                   []string `json:"tag" yaml:"tag"`
	Username              string   `json:"username" yaml:"username"`
	VappIpallocationplicy string   `json:"vappIpallocationplicy" yaml:"vappIpallocationplicy"`
	VappIpprotocol        string   `json:"vappIpprotocol" yaml:"vappIpprotocol"`
	VappProperty          []string `json:"vappProperty" yaml:"vappProperty"`
	VappTransport         string   `json:"vappTransport" yaml:"vappTransport"`
	Vcenter               string   `json:"vcenter" yaml:"vcenter"`
	VcenterPort           string   `json:"vcenterPort" yaml:"vcenterPort"`
}

VmwareVsphereNodeTemplateConfig is configuration need to create a VSphere node template

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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