key

package
v8.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ComponentKubernetes is the name of the component specified in a Release
	// CR which determines the version of the Kubernetes to be used for tenant
	// cluster nodes.
	ComponentKubernetes = "kubernetes"

	// ComponentOS is the name of the component specified in a Release CR which
	// determines the version of the OS to be used for tenant cluster nodes and
	// is ultimately transformed into an AMI based on TC region.
	ComponentOS = "containerlinux"

	// TerminateUnhealthyNodeResyncPeriod defines resync period for the terminateunhealthynode controller
	TerminateUnhealthyNodeResyncPeriod = time.Minute * 3
)
View Source
const (
	MastersVmssDeploymentName = "masters-vmss-template"

	// Kept for the sake of compiling old instance resource. It should be removed as soon as
	// instance resource is removed.
	WorkersVmssDeploymentName = "workers-vmss-template"

	CloudConfigSecretKey = "ignitionBlob"

	AnnotationEtcdDomain        = "giantswarm.io/etcd-domain"
	AnnotationPrometheusCluster = "giantswarm.io/prometheus-cluster"

	LabelApp             = "app"
	LabelCluster         = "giantswarm.io/cluster"
	LabelCustomer        = "customer"
	LabelManagedBy       = "giantswarm.io/managed-by"
	LabelOperatorVersion = "azure-operator.giantswarm.io/version"
	LabelOrganization    = "giantswarm.io/organization"

	LegacyLabelCluster = "cluster"

	CertificateEncryptionNamespace = "default"
	CertificateEncryptionKeyName   = "encryptionkey"
	CertificateEncryptionIVName    = "encryptioniv"

	ContainerLinuxComponentName = "containerlinux"

	OrganizationSecretsLabelSelector = "app=credentiald" // nolint:gosec

)

Variables

This section is empty.

Functions

func APISecurePort

func APISecurePort(customObject providerv1alpha1.AzureConfig) int

func AvailabilityZones

func AvailabilityZones(customObject providerv1alpha1.AzureConfig, location string) []int

AvailabilityZones returns the availability zones where the cluster will be created.

func AzureConfigNetworkCIDR

func AzureConfigNetworkCIDR(customObject providerv1alpha1.AzureConfig) string

func AzureMachineName

func AzureMachineName(getter LabelsGetter) string

func BlobContainerName

func BlobContainerName() string

func BlobName

func BlobName(customObject LabelsGetter, role string) string

func BootstrapBlobName

func BootstrapBlobName(customObject capzexp.AzureMachinePool) string

func CGroupVersion

func CGroupVersion(machinePool *capiexp.MachinePool) string

func CalicoCIDR

func CalicoCIDR(customObject providerv1alpha1.AzureConfig) string

func CertificateEncryptionSecretName

func CertificateEncryptionSecretName(customObject LabelsGetter) string

func CloudConfigSmallTemplates

func CloudConfigSmallTemplates() []string

func ClusterAPIEndpoint

func ClusterAPIEndpoint(customObject providerv1alpha1.AzureConfig) string

func ClusterBaseDomain

func ClusterBaseDomain(customObject providerv1alpha1.AzureConfig) string

func ClusterCloudProviderTag

func ClusterCloudProviderTag(getter LabelsGetter) string

func ClusterCustomer

func ClusterCustomer(customObject providerv1alpha1.AzureConfig) string

ClusterCustomer returns the customer ID for this cluster.

func ClusterDNSDomain

func ClusterDNSDomain(customObject providerv1alpha1.AzureConfig) string

ClusterDNSDomain returns cluster DNS domain.

func ClusterEtcdDomain

func ClusterEtcdDomain(customObject providerv1alpha1.AzureConfig) string

func ClusterID

func ClusterID(getter LabelsGetter) string

func ClusterIPRange

func ClusterIPRange(customObject providerv1alpha1.AzureConfig) string

func ClusterName

func ClusterName(getter LabelsGetter) string

func ClusterNamespace

func ClusterNamespace(customObject providerv1alpha1.AzureConfig) string

ClusterNamespace returns the cluster Namespace for this cluster.

func ClusterOrganization

func ClusterOrganization(customObject providerv1alpha1.AzureConfig) string

ClusterOrganization returns the org name from the custom object. It uses ClusterCustomer until this field is renamed in the custom object.

func ClusterTags

func ClusterTags(customObject providerv1alpha1.AzureConfig, installationName string) map[string]*string

ClusterTags returns a map with the resource tags for this cluster.

func ComponentVersion

func ComponentVersion(release releasev1alpha1.Release, componentName string) (string, error)

func ControllerManagerTerminatedPodGcThreshold added in v8.1.0

func ControllerManagerTerminatedPodGcThreshold(cluster *capi.Cluster) int

func CredentialName

func CredentialName(customObject providerv1alpha1.AzureConfig) string

CredentialName returns name of the credential secret.

func CredentialNamespace

func CredentialNamespace(customObject providerv1alpha1.AzureConfig) string

CredentialNamespace returns namespace of the credential secret.

func DNSZoneAPI

func DNSZoneAPI(customObject providerv1alpha1.AzureConfig) string

DNSZoneAPI returns api parent DNS zone domain name.

func DNSZoneEtcd

func DNSZoneEtcd(customObject providerv1alpha1.AzureConfig) string

DNSZoneEtcd returns etcd parent DNS zone domain name. zone should be created in.

func DNSZoneIngress

func DNSZoneIngress(customObject providerv1alpha1.AzureConfig) string

DNSZoneIngress returns ingress parent DNS zone domain name.

func DNSZonePrefixAPI

func DNSZonePrefixAPI(customObject providerv1alpha1.AzureConfig) string

DNSZonePrefixAPI returns relative name of the api DNS zone.

func DNSZonePrefixEtcd

func DNSZonePrefixEtcd(customObject providerv1alpha1.AzureConfig) string

DNSZonePrefixEtcd returns relative name of the etcd DNS zone.

func DNSZonePrefixIngress

func DNSZonePrefixIngress(customObject providerv1alpha1.AzureConfig) string

DNSZonePrefixIngress returns relative name of the ingress DNS zone.

func DNSZoneResourceGroupAPI

func DNSZoneResourceGroupAPI(customObject providerv1alpha1.AzureConfig) string

DNSZoneResourceGroupAPI returns resource group name of the API parent DNS zone.

func DNSZoneResourceGroupEtcd

func DNSZoneResourceGroupEtcd(customObject providerv1alpha1.AzureConfig) string

DNSZoneResourceGroupEtcd returns resource group name of the etcd parent DNS zone.

func DNSZoneResourceGroupIngress

func DNSZoneResourceGroupIngress(customObject providerv1alpha1.AzureConfig) string

DNSZoneResourceGroupIngress returns resource group name of the ingress parent DNS zone.

func DefaultVersions

func DefaultVersions() k8scloudconfig.Versions

func EncryptionConfigSecretName

func EncryptionConfigSecretName(clusterName string) string

func HealthCheckTarget

func HealthCheckTarget(port int) string

func InstanceIDFromNode

func InstanceIDFromNode(node v1.Node) (string, error)

func InternalELBNameAPI

func InternalELBNameAPI(getter LabelsGetter) string

func IsClusterCreating

func IsClusterCreating(cr providerv1alpha1.AzureConfig) bool

IsClusterCreating check if the cluster is being created.

func IsControlPlaneMachine

func IsControlPlaneMachine(getter LabelsGetter) bool

func IsDeleted

func IsDeleted(getter DeletionTimestampGetter) bool

func IsExecutionFailed

func IsExecutionFailed(err error) bool

IsExecutionFailed asserts executionFailedError.

func IsFailedProvisioningState

func IsFailedProvisioningState(s string) bool

func IsFinalProvisioningState

func IsFinalProvisioningState(s string) bool

func IsMissingMachinePoolLabelError

func IsMissingMachinePoolLabelError(err error) bool

IsMissingMachinePoolLabelError asserts missingMachinePoolLabelError.

func IsMissingOutputValue

func IsMissingOutputValue(err error) bool

IsMissingOutputValue asserts missingOutputValueError.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound asserts notFoundError.

func IsSucceededProvisioningState

func IsSucceededProvisioningState(s string) bool

func IsWrongTypeError

func IsWrongTypeError(err error) bool

IsWrongTypeError asserts wrongTypeError.

func KubeletLabelsNodePool

func KubeletLabelsNodePool(getter LabelsGetter) (string, error)

These are the same labels that kubernetesd adds when creating/updating an AzureConfig.

func KubernetesVersion

func KubernetesVersion(release releasev1alpha1.Release) (string, error)

func MachinePoolID

func MachinePoolID(getter LabelsGetter) (string, error)

func MasterInstanceName

func MasterInstanceName(customObject providerv1alpha1.AzureConfig, instanceID string) string

func MasterNICName

func MasterNICName(customObject providerv1alpha1.AzureConfig) string

MasterNICName returns name of the master NIC.

func MasterNatGatewayID

func MasterNatGatewayID(cr providerv1alpha1.AzureConfig, subscriptionID string) string

func MasterSecurityGroupName

func MasterSecurityGroupName(customObject providerv1alpha1.AzureConfig) string

MasterSecurityGroupName returns name of the security group attached to master subnet.

func MasterSubnetName

func MasterSubnetName(customObject providerv1alpha1.AzureConfig) string

MasterSubnetName returns name of the master subnet.

func MasterSubnetNameFromClusterAPIObject

func MasterSubnetNameFromClusterAPIObject(getter LabelsGetter) string

func MasterVMSSName

func MasterVMSSName(customObject providerv1alpha1.AzureConfig) string

func MasterVMSSNameFromClusterAPIObject

func MasterVMSSNameFromClusterAPIObject(getter LabelsGetter) string

func MastersSubnetCIDR

func MastersSubnetCIDR(customObject providerv1alpha1.AzureConfig) string

func NodePoolDeploymentName

func NodePoolDeploymentName(azureMachinePool *capzexp.AzureMachinePool) string

func NodePoolInstanceName

func NodePoolInstanceName(nodePoolName, instanceID string) string

func NodePoolMaxReplicas

func NodePoolMaxReplicas(machinePool *capiexp.MachinePool) int32

func NodePoolMinReplicas

func NodePoolMinReplicas(machinePool *capiexp.MachinePool) int32

func NodePoolSpotInstancesEnabled

func NodePoolSpotInstancesEnabled(azureMachinePool *capzexp.AzureMachinePool) bool

func NodePoolSpotInstancesMaxPrice

func NodePoolSpotInstancesMaxPrice(azureMachinePool *capzexp.AzureMachinePool) string

func NodePoolVMSSName

func NodePoolVMSSName(azureMachinePool *capzexp.AzureMachinePool) string

func OSVersion

func OSVersion(release releasev1alpha1.Release) (string, error)

func OperatorVersion

func OperatorVersion(getter LabelsGetter) string

func OrganizationID

func OrganizationID(getter LabelsGetter) string

func OrganizationNamespace

func OrganizationNamespace(getter LabelsGetter) string

func PrefixMaster

func PrefixMaster() string

func PrefixWorker

func PrefixWorker() string

func ReleaseName

func ReleaseName(releaseVersion string) string

func ReleaseVersion

func ReleaseVersion(getter LabelsGetter) string

func ResourceGroupName

func ResourceGroupName(customObject providerv1alpha1.AzureConfig) string

ResourceGroupName returns name of the resource group for this cluster.

func RouteTableName

func RouteTableName(customObject providerv1alpha1.AzureConfig) string

RouteTableName returns name of the route table for this cluster.

func ScalingMaxWorkers

func ScalingMaxWorkers(customObject providerv1alpha1.AzureConfig) int

func ScalingMinWorkers

func ScalingMinWorkers(customObject providerv1alpha1.AzureConfig) int

func StorageAccountName

func StorageAccountName(customObject LabelsGetter) string

func SubnetDeploymentName

func SubnetDeploymentName(subnetName string) string

func ToAzureCluster

func ToAzureCluster(v interface{}) (capz.AzureCluster, error)

func ToAzureMachine

func ToAzureMachine(v interface{}) (capz.AzureMachine, error)

func ToAzureMachinePool

func ToAzureMachinePool(v interface{}) (capzexp.AzureMachinePool, error)

func ToCluster

func ToCluster(v interface{}) (capi.Cluster, error)

func ToClusterEndpoint

func ToClusterEndpoint(v interface{}) (string, error)

func ToClusterID

func ToClusterID(v interface{}) (string, error)

func ToClusterStatus

func ToClusterStatus(v interface{}) (providerv1alpha1.StatusCluster, error)

func ToCustomResource

func ToCustomResource(v interface{}) (providerv1alpha1.AzureConfig, error)

func ToKeyValue

func ToKeyValue(m map[string]interface{}) (interface{}, error)

func ToMachinePool

func ToMachinePool(v interface{}) (capiexp.MachinePool, error)

func ToMap

func ToMap(v interface{}) (map[string]interface{}, error)

func ToNodeCount

func ToNodeCount(v interface{}) (int, error)

func ToOperatorVersion

func ToOperatorVersion(v interface{}) (string, error)

func ToParameters

func ToParameters(list ...map[string]interface{}) map[string]interface{}

ToParameters merges the input maps and converts the result into the structure used by the Azure API. Note that the order of inputs is relevant. Default parameters should be given first. Data of the following maps will overwrite eventual data of preceeding maps. This mechanism is used for e.g. setting the initialProvisioning parameter accordingly to the cluster's state.

func ToString

func ToString(v interface{}) (string, error)

func VNetGatewaySubnetName

func VNetGatewaySubnetName() string

VNetGatewaySubnetName returns the name of the subnet for the vpn gateway.

func VPNGatewayName

func VPNGatewayName(customObject providerv1alpha1.AzureConfig) string

VPNGatewayName returns name of the vpn gateway.

func VPNGatewayPublicIPName

func VPNGatewayPublicIPName(customObject providerv1alpha1.AzureConfig) string

func VnetCIDR

func VnetCIDR(customObject providerv1alpha1.AzureConfig) string

func VnetName

func VnetName(customObject providerv1alpha1.AzureConfig) string

VnetName returns name of the virtual network.

func WorkerBlobName

func WorkerBlobName(operatorVersion string) string

func WorkerCount

func WorkerCount(customObject providerv1alpha1.AzureConfig) int

WorkerCount returns the desired number of workers. Kept for the sake of compiling old instance resource. It should be removed as soon as instance resource is removed.

func WorkerInstanceName

func WorkerInstanceName(clusterID, instanceID string) string

func WorkerSecurityGroupName

func WorkerSecurityGroupName(customObject providerv1alpha1.AzureConfig) string

WorkerSecurityGroupName returns name of the security group attached to worker subnet.

func WorkerSubnetName

func WorkerSubnetName(customObject providerv1alpha1.AzureConfig) string

WorkerSubnetName returns name of the worker subnet.

func WorkerVMSSName

func WorkerVMSSName(customObject providerv1alpha1.AzureConfig) string

func WorkersEgressExistingPublicIP

func WorkersEgressExistingPublicIP(customObject providerv1alpha1.AzureConfig) string

func WorkersSubnetCIDR

func WorkersSubnetCIDR(customObject providerv1alpha1.AzureConfig) string

Types

type AnnotationsGetter

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

type DeletionTimestampGetter

type DeletionTimestampGetter interface {
	GetDeletionTimestamp() *metav1.Time
}

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