cloudconfig

package
v15.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FileOwnerUserName  = "root"
	FileOwnerGroupName = "root"
	FilePermission     = 0700
)

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound asserts notFoundError.

func IsTimeout

func IsTimeout(err error) bool

IsTimeout asserts timeoutError.

Types

type Config

type Config struct {
	CertsSearcher      certs.Interface
	CloudTags          cloudtags.Interface
	Encrypter          encrypter.Interface
	Event              event.Interface
	HAMaster           hamaster.Interface
	Images             images.Interface
	K8sClient          k8sclient.Interface
	Logger             micrologger.Logger
	RandomKeysSearcher randomkeys.Interface

	APIExtraArgs            []string
	CalicoCIDR              int
	CalicoMTU               int
	CalicoSubnet            string
	ClusterIPRange          string
	DockerDaemonCIDR        string
	DockerhubToken          string
	ExternalSNAT            bool
	IgnitionPath            string
	KubeletExtraArgs        []string
	ClusterDomain           string
	NetworkSetupDockerImage string
	PodInfraContainerImage  string
	RegistryDomain          string
	RegistryMirrors         []string
	SSHUserList             string
	SSOPublicKey            string
}

func (Config) Validate

func (c Config) Validate() error

type Interface

type Interface interface {
	// NewPaths returns a list of S3 Object paths aligned with the templates
	// returned by NewTemplates.
	NewPaths(ctx context.Context, obj interface{}) ([]string, error)
	// NewTemplates implements any functionality necessary to generate a list of
	// Cloud Config templates. The interface defintion is most generic in order to
	// serve all possible cases. The returned template is a list of Clooud Config
	// templates ready to upload to S3. Usually the amount of templates generated
	// should be 1. There may be special cases though e.g. HA Masters, where an
	// implementation may detect an HA Masters setting and thus needs to generate
	// multiple Cloud Configs based on e.g. some desired replicas configuration.
	// Just like NewPaths, the implementation of NewTemplates must align with the
	// returned items so that users of the interface are guaranteed to always work
	// with a key-value pair of path and template.
	NewTemplates(ctx context.Context, obj interface{}) ([]string, error)
}

type TCCPN

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

func NewTCCPN

func NewTCCPN(config TCCPNConfig) (*TCCPN, error)

func (*TCCPN) NewPaths

func (t *TCCPN) NewPaths(ctx context.Context, obj interface{}) ([]string, error)

func (*TCCPN) NewTemplates

func (t *TCCPN) NewTemplates(ctx context.Context, obj interface{}) ([]string, error)

type TCCPNConfig

type TCCPNConfig struct {
	Config Config
}

type TCCPNExtension

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

func (*TCCPNExtension) Files

func (e *TCCPNExtension) Files() ([]k8scloudconfig.FileAsset, error)

func (*TCCPNExtension) Units

func (e *TCCPNExtension) Units() ([]k8scloudconfig.UnitAsset, error)

func (*TCCPNExtension) VerbatimSections

func (e *TCCPNExtension) VerbatimSections() []k8scloudconfig.VerbatimSection

type TCNP

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

func NewTCNP

func NewTCNP(config TCNPConfig) (*TCNP, error)

func (*TCNP) NewPaths

func (t *TCNP) NewPaths(ctx context.Context, obj interface{}) ([]string, error)

func (*TCNP) NewTemplates

func (t *TCNP) NewTemplates(ctx context.Context, obj interface{}) ([]string, error)

type TCNPConfig

type TCNPConfig struct {
	Config Config
}

type TCNPExtension

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

func (*TCNPExtension) Files

func (e *TCNPExtension) Files() ([]k8scloudconfig.FileAsset, error)

func (*TCNPExtension) Units

func (e *TCNPExtension) Units() ([]k8scloudconfig.UnitAsset, error)

func (*TCNPExtension) VerbatimSections

func (e *TCNPExtension) VerbatimSections() []k8scloudconfig.VerbatimSection

type TemplateData

type TemplateData struct {
	AWSCNIAdditionalTags  string
	AWSCNIMinimumIPTarget string
	AWSCNIPrefix          bool
	AWSCNIWarmIPTarget    string
	AWSCNIVersion         string
	AWSRegion             string
	BaseDomain            string
	ExternalSNAT          bool
	IsChinaRegion         bool
	MasterENIName         string
	MasterEtcdVolumeName  string
	MasterID              int
	RegistryDomain        string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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