cloudconfig

package
v4.0.0-...-567bbdc Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

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

	IscsiInitiatorNameFilePath    = "/etc/iscsi/initiatorname.iscsi"
	IscsiInitiatorFilePermissions = 0644

	IscsiConfigFilePath        = "/etc/iscsi/iscsid.conf"
	IscsiConfigFilePermissions = 0644
	IscsiConfigFileContent     = `` /* 150-byte string literal not displayed */

)

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.

Types

type CloudConfig

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

CloudConfig implements the cloud config service interface.

func New

func New(config Config) (*CloudConfig, error)

New creates a new configured cloud config service.

func (*CloudConfig) NewMasterTemplate

func (c *CloudConfig) NewMasterTemplate(ctx context.Context, cr v1alpha1.KVMConfig, data IgnitionTemplateData, node v1alpha1.ClusterNode, nodeIndex int) (string, error)

NewMasterTemplate generates a new worker cloud config template and returns it as a base64 encoded string.

func (*CloudConfig) NewWorkerTemplate

func (c *CloudConfig) NewWorkerTemplate(ctx context.Context, cr v1alpha1.KVMConfig, data IgnitionTemplateData, node v1alpha1.ClusterNode, nodeIndex int) (string, error)

NewWorkerTemplate generates a new worker cloud config template and returns it as a base64 encoded string.

type Config

type Config struct {
	// Dependencies.
	Logger micrologger.Logger

	DockerhubToken  string
	IgnitionPath    string
	OIDC            OIDCConfig
	Proxy           ProxyConfig
	RegistryMirrors []string
	SSOPublicKey    string
}

Config represents the configuration used to create a cloud config service.

func DefaultConfig

func DefaultConfig() Config

DefaultConfig provides a default configuration to create a new cloud config service by best effort.

type IgnitionTemplateData

type IgnitionTemplateData struct {
	CustomObject  v1alpha1.KVMConfig
	CertsSearcher certs.Interface
	ClusterKeys   randomkeys.Cluster
	Images        k8scloudconfig.Images
	Versions      k8scloudconfig.Versions
}

type OIDCConfig

type OIDCConfig struct {
	ClientID       string
	IssuerURL      string
	UsernameClaim  string
	UsernamePrefix string
	GroupsClaim    string
	GroupsPrefix   string
}

OIDCConfig represents the configuration of the OIDC authorization provider

type ProxyConfig

type ProxyConfig struct {
	HTTP    string
	HTTPS   string
	NoProxy []string
}

ProxyConfig represents the configuration of the proxy

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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