Documentation ¶
Index ¶
- Constants
- func Asset(name string) ([]byte, error)
- func AssetDigest(name string) ([sha256.Size]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func AssetString(name string) (string, error)
- func Digests() (map[string][sha256.Size]byte, error)
- func MakeManagedUserData(ng *api.ManagedNodeGroup, mimeBoundary string) (string, error)
- func MustAsset(name string) []byte
- func MustAssetString(name string) string
- func ProtectTOMLKeys(path []string, tree *toml.Tree)
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- type AmazonLinux2
- type Bootstrapper
- type Bottlerocket
- type Ubuntu
- type Windows
Constants ¶
const AssetDebug = false
AssetDebug is true if the assets were built with the debug flag enabled.
Variables ¶
This section is empty.
Functions ¶
func Asset ¶
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDigest ¶
AssetDigest returns the digest of the file with the given name. It returns an error if the asset could not be found or the digest could not be loaded.
func AssetDir ¶
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/ foo.txt img/ a.png b.png
then AssetDir("data") would return []string{"foo.txt", "img"}, AssetDir("data/img") would return []string{"a.png", "b.png"}, AssetDir("foo.txt") and AssetDir("notexist") would return an error, and AssetDir("") will return []string{"data"}.
func AssetInfo ¶
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetString ¶
AssetString returns the asset contents as a string (instead of a []byte).
func MakeManagedUserData ¶ added in v0.39.0
func MakeManagedUserData(ng *api.ManagedNodeGroup, mimeBoundary string) (string, error)
MakeManagedUserData returns user data for managed nodegroups
func MustAsset ¶
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
func MustAssetString ¶
MustAssetString is like AssetString but panics when Asset would return an error. It simplifies safe initialization of global variables.
func ProtectTOMLKeys ¶ added in v0.47.0
func ProtectTOMLKeys(path []string, tree *toml.Tree)
ProtectTOMLKeys processes a tree finding and replacing dotted keys with quoted keys to retain the configured settings. This prevents TOML parsers from deserializing keys into nested key-value pairs at each dot encountered - which is not uncommon in the context of Kubernetes' labels, annotations, and taints.
func RestoreAsset ¶
RestoreAsset restores an asset under the given directory.
func RestoreAssets ¶
RestoreAssets restores an asset under the given directory recursively.
Types ¶
type AmazonLinux2 ¶ added in v0.47.0
type AmazonLinux2 struct {
// contains filtered or unexported fields
}
func NewAL2Bootstrapper ¶ added in v0.47.0
func NewAL2Bootstrapper(clusterName string, ng *api.NodeGroup) *AmazonLinux2
func (*AmazonLinux2) UserData ¶ added in v0.47.0
func (b *AmazonLinux2) UserData() (string, error)
type Bootstrapper ¶ added in v0.47.0
type Bootstrapper interface { // UserData returns userdata for bootstrapping nodes UserData() (string, error) }
func NewBootstrapper ¶ added in v0.47.0
func NewBootstrapper(clusterSpec *api.ClusterConfig, ng *api.NodeGroup) Bootstrapper
NewBootstrapper returns the correct bootstrapper for the AMI family
type Bottlerocket ¶ added in v0.47.0
type Bottlerocket struct {
// contains filtered or unexported fields
}
func NewBottlerocketBootstrapper ¶ added in v0.47.0
func NewBottlerocketBootstrapper(spec *api.ClusterConfig, ng *api.NodeGroup) *Bottlerocket
func (*Bottlerocket) UserData ¶ added in v0.47.0
func (b *Bottlerocket) UserData() (string, error)
NewUserDataForBottlerocket generates TOML userdata for bootstrapping a Bottlerocket node.
type Ubuntu ¶ added in v0.47.0
type Ubuntu struct {
// contains filtered or unexported fields
}
func NewUbuntuBootstrapper ¶ added in v0.47.0
type Windows ¶ added in v0.47.0
type Windows struct {
// contains filtered or unexported fields
}