key

package
v1.60.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// IDChars represents the character set used to generate cluster IDs.
	// (does not contain 1 and l, to avoid confusion)
	IDChars = "023456789abcdefghijkmnopqrstuvwxyz"
	// IDLength represents the number of characters used to create a cluster ID.
	IDLength = 5
)
View Source
const (
	AWSBastionInstanceType = "t3.small"

	CAPIRoleLabel = "cluster.x-k8s.io/role"
	CAPARoleTag   = "tag:sigs.k8s.io/cluster-api-provider-aws/role"

	FlatcarAMIOwner      = "075585003325"
	FlatcarChinaAMIOwner = "306934455918"

	RoleBastion = "bastion"

	RoleLabel           = "role"
	SSHSSOPubKeyLabel   = "ssh-sso-public-key"
	GiantswarmNamespace = "giantswarm"

	ControllerRuntimeBurstValue = 200
)
View Source
const (
	// FirstOrgNamespaceRelease is the first GS release that creates Clusters in Org Namespaces by default
	FirstAWSOrgNamespaceRelease = "16.0.0"
	FirstCAPIRelease            = "20.0.0-alpha1"
)
View Source
const (
	ProviderAWS       = "aws"
	ProviderAzure     = "azure"
	ProviderKVM       = "kvm"
	ProviderOpenStack = "openstack"
	ProviderVSphere   = "vsphere"
)
View Source
const AppCRTemplate = `` /* 165-byte string literal not displayed */
View Source
const BastionIgnitionTemplate = `` /* 1402-byte string literal not displayed */
View Source
const CapzSetBastionReadyService = `` /* 237-byte string literal not displayed */
View Source
const CapzSetBastionReadyTimer = `[Timer]
OnCalendar=minutely
Unit=set-bastion-ready.service

[Install]
WantedBy=timers.target
`
View Source
const CatalogCRTemplate = `
{{- .ConfigMap -}}
---
{{ .Secret -}}
---
{{ .CatalogCR -}}
`
View Source
const ClusterAWSCRsTemplate = `
{{- .ClusterCR -}}
---
{{ .AWSClusterCR -}}
---
{{ .G8sControlPlaneCR -}}
---
{{ .AWSControlPlaneCR -}}
`
View Source
const ClusterAzureCRsTemplate = `
{{- .ProviderClusterCR -}}
---
{{ .ClusterCR -}}
---
{{ .MasterMachineCR -}}
`
View Source
const ClusterCAPACRsTemplate = `` /* 263-byte string literal not displayed */
View Source
const ClusterEKSCRsTemplate = `
{{- .ClusterCR -}}
---
{{ .AWSManagedControlPlaneCR -}}
---
{{ .AWSClusterRoleIdentityCR -}}
`
View Source
const MachineDeploymentCRsTemplate = `
{{- .MachineDeploymentCR -}}
---
{{ .AWSMachineDeploymentCR -}}
`
View Source
const MachinePoolAWSCRsTemplate = `
{{- .ProviderMachinePoolCR -}}
---
{{ .MachinePoolCR -}}
---
{{ .KubeadmConfigCR -}}
`
View Source
const MachinePoolAzureCRsTemplate = `
{{- .ProviderMachinePoolCR -}}
---
{{ .MachinePoolCR -}}
---
{{ .SparkCR -}}
`
View Source
const MachinePoolEKSCRsTemplate = `
{{- .ManagedMachinePoolCR -}}
---
{{ .MachinePoolCR -}}
`
View Source
const NetworkPoolCRsTemplate = `
{{- .NetworkPoolCR -}}
`

Variables

This section is empty.

Functions

func AzureStorageAccountTypeForVMSize added in v1.37.0

func AzureStorageAccountTypeForVMSize(vmSize string) string

func BastionResourceName added in v1.35.0

func BastionResourceName(clusterName string) string

func BastionSSHDConfigEncoded added in v1.35.0

func BastionSSHDConfigEncoded() string

func CAPAClusterOwnedTag added in v1.35.0

func CAPAClusterOwnedTag(clusterName string) string

func ClusterID added in v1.20.0

func ClusterID(getter LabelsGetter) string

func FlatcarAWSAccountID added in v1.35.0

func FlatcarAWSAccountID(awsRegion string) string

func GenerateAssetName added in v0.2.0

func GenerateAssetName(values ...string) string

func GenerateID

func GenerateID() string

func GetCAPAEnvVars added in v1.32.0

func GetCAPAEnvVars() []string

func GetCacheDir added in v1.47.0

func GetCacheDir() (string, error)

func GetControlPlaneInstanceProfile added in v1.32.0

func GetControlPlaneInstanceProfile(clusterID string) string

func GetNodeInstanceProfile added in v1.32.0

func GetNodeInstanceProfile(machinePoolID string, clusterID string) string

func IsCAPIVersion added in v1.46.0

func IsCAPIVersion(version string) (bool, error)

IsCAPIVersion returns whether a given GS Release Version uses the CAPI projects

func IsClusterIDInvalid added in v0.3.0

func IsClusterIDInvalid(err error) bool

IsClusterIDInvalid asserts clusterIDInvalidError.

func IsOrgNamespaceVersion added in v1.37.0

func IsOrgNamespaceVersion(version string) bool

IsOrgNamespaceVersion returns whether a given AWS GS Release Version is based on clusters in Org Namespace

func IsParsingReleaseError added in v1.46.0

func IsParsingReleaseError(err error) bool

IsUnmashalToMapFailed asserts parsingReleaseError.

func IsTTY added in v1.47.0

func IsTTY() bool

func IsUnmashalToMapFailed added in v0.2.0

func IsUnmashalToMapFailed(err error) bool

IsUnmashalToMapFailed asserts unmashalToMapFailedError.

func MachinePoolName added in v1.20.0

func MachinePoolName(getter AnnotationsGetter) string

func MachinePoolScaling added in v1.20.0

func MachinePoolScaling(getter AnnotationsGetter) (int, int)

func NodeSSHDConfigEncoded added in v1.35.0

func NodeSSHDConfigEncoded() string

func OrganizationNamespaceFromName added in v0.8.0

func OrganizationNamespaceFromName(name string) string

func ReadConfigMapYamlFromFile added in v0.2.0

func ReadConfigMapYamlFromFile(fs afero.Fs, path string) (string, error)

readConfigMapFromFile reads a configmap from a YAML file.

func ReadSecretYamlFromFile added in v0.2.0

func ReadSecretYamlFromFile(fs afero.Fs, path string) ([]byte, error)

readSecretFromFile reads a configmap from a YAML file.

func ReleaseVersion added in v1.20.0

func ReleaseVersion(getter LabelsGetter) string

func SSHSSOPublicKey added in v1.35.0

func SSHSSOPublicKey(ctx context.Context, client runtimeclient.Client) (string, error)

func UbuntuSudoersConfigEncoded added in v1.35.0

func UbuntuSudoersConfigEncoded() string

Types

type AnnotationsGetter added in v1.20.0

type AnnotationsGetter interface {
	GetAnnotations() map[string]string
}

type LabelsGetter added in v1.20.0

type LabelsGetter interface {
	GetLabels() map[string]string
}

Jump to

Keyboard shortcuts

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