key

package
v5.0.0-...-1807406 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 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"
	// NameLengthMax represents the maximum number of characters that can be used to create a resource.
	NameLengthMax = 20
	// NameLengthDefault represents the number of characters used to randomly generated names
	NameLengthDefault = 10
)
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"
	ProviderDefault       = "default"
)
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 CAPIProvidersUsingReleases

func CAPIProvidersUsingReleases() []string

CAPIProvidersUsingReleases is the list of CAPI providers which are using Release resources.

func ClusterID

func ClusterID(getter LabelsGetter) string

func GenerateAssetName

func GenerateAssetName(values ...string) string

func GenerateName

func GenerateName() (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 IsCAPIProviderUsingReleases

func IsCAPIProviderUsingReleases(provider string) bool

IsCAPIProviderUsingReleases returns whether a given provider is a CAPI provider that uses new releases.

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

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) (bool, error)

Types

type AnnotationsGetter

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

type CAPIAppConfig

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