key

package
v2.53.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// NameChars represents the character set used to generate resource names.
	// (does not contain 1 and l, to avoid confusion)
	NameChars = "023456789abcdefghijkmnopqrstuvwxyz"
	// NameLengthLong represents the number of characters used to create a resource name when --enable-long-names feature flag is used.
	NameLengthLong    = 20
	NameLengthDefault = 10
	// NameLengthShort represents the number of characters used to create a resource name.
	NameLengthShort = 5
)
View Source
const (
	RoleLabel                     = "role"
	SSHSSOPubKeyLabel             = "ssh-sso-public-key"
	GiantswarmNamespace           = "giantswarm"
	CertOperatorVersionKubeconfig = "0.0.0"
)
View Source
const (
	ProviderAWS           = "aws"
	ProviderAzure         = "azure"
	ProviderCAPA          = "capa"
	ProviderCAPZ          = "capz"
	ProviderEKS           = "eks"
	ProviderGCP           = "gcp"
	ProviderKVM           = "kvm"
	ProviderOpenStack     = "openstack"
	ProviderVSphere       = "vsphere"
	ProviderCloudDirector = "cloud-director"
)
View Source
const (
	ProviderClusterAppPrefix = "cluster"
	ProviderDefaultAppPrefix = "default-apps"

	ProviderCAPZAppSuffix = "azure"
)
View Source
const AppCRTemplate = `` /* 165-byte string literal not displayed */
View Source
const BastionIgnitionTemplate = `` /* 1402-byte string literal not displayed */
View Source
const CapzSetBastionReadyService = `` /* 276-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 (
	// FirstAWSOrgNamespaceRelease is the first GS release that creates Clusters in Org Namespaces by default
	FirstAWSOrgNamespaceRelease = "16.0.0"
)
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

func AzureStorageAccountTypeForVMSize(vmSize string) string

func BastionSSHDConfigEncoded

func BastionSSHDConfigEncoded() string

func ClusterID

func ClusterID(getter LabelsGetter) string

func GenerateAssetName

func GenerateAssetName(values ...string) string

func GenerateName

func GenerateName(enableLongNames bool) (string, error)

func GetCacheDir

func GetCacheDir() (string, error)

func GetReleaseComponents

func GetReleaseComponents(ctx context.Context, client runtimeclient.Client, releaseName string) (map[string]string, error)

func IsClusterIDInvalid

func IsClusterIDInvalid(err error) bool

IsClusterIDInvalid asserts clusterIDInvalidError.

func IsOrgNamespaceVersion

func IsOrgNamespaceVersion(version string) bool

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

func IsPureCAPIProvider

func IsPureCAPIProvider(provider string) bool

IsPureCAPIProvider returns whether a given provider is purely based on or fully migrated to CAPI

func IsTTY

func IsTTY() bool

func MachineDeploymentName added in v2.52.2

func MachineDeploymentName(getter AnnotationsGetter) string

func MachinePoolName

func MachinePoolName(getter AnnotationsGetter) string

func MachinePoolScaling

func MachinePoolScaling(getter AnnotationsGetter) (int, int)

func NodeSSHDConfigEncoded

func NodeSSHDConfigEncoded() string

func OrganizationNamespaceFromName

func OrganizationNamespaceFromName(name string) string

func PureCAPIProviders

func PureCAPIProviders() []string

PureCAPIProviders is the list of all providers which are purely based on or fully migrated to CAPI

func ReadConfigMapYamlFromFile

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

ReadConfigMapYamlFromFile reads a configmap from a YAML file.

func ReadSecretYamlFromFile

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

ReadSecretYamlFromFile reads a configmap from a YAML file.

func ReleaseVersion

func ReleaseVersion(getter LabelsGetter) string

func SSHSSOPublicKey

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

func UbuntuSudoersConfigEncoded

func UbuntuSudoersConfigEncoded() string

func ValidateName

func ValidateName(name string, enableLongNames bool) (bool, error)

Types

type AnnotationsGetter

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

type CAPIAppConfig added in v2.34.0

type CAPIAppConfig struct {
	ClusterCatalog     string
	ClusterVersion     string
	ClusterAppName     string
	DefaultAppsCatalog string
	DefaultAppsVersion string
	DefaultAppsName    string
}

type LabelsGetter

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