key

package
v2.42.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 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 = 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 (
	// FirstAWSOrgNamespaceRelease 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"
	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 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 IsCAPIVersion

func IsCAPIVersion(version string) (bool, error)

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

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 IsParsingReleaseError

func IsParsingReleaseError(err error) bool

IsUnmashalToMapFailed asserts parsingReleaseError.

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 IsUnmashalToMapFailed

func IsUnmashalToMapFailed(err error) bool

IsUnmashalToMapFailed asserts unmashalToMapFailedError.

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