key

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2019 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CloudConfigVersion defines the version of k8scloudconfig in use. It is used
	// in the main stack output and S3 object paths.
	CloudConfigVersion = "v_4_5_0"
	CloudProvider      = "aws"
)
View Source
const (
	EC2RoleK8s   = "EC2-K8S-Role"
	EC2PolicyK8s = "EC2-K8S-Policy"
)
View Source
const (
	IngressControllerInsecurePort = 30010
	IngressControllerSecurePort   = 30011
)
View Source
const (
	EtcdPort             = 2379
	EtcdPrefix           = "giantswarm.io"
	KubernetesSecurePort = 443
)
View Source
const (
	TagCluster      = "giantswarm.io/cluster"
	TagSubnetType   = "giantswarm.io/subnet-type"
	TagInstallation = "giantswarm.io/installation"
	TagOrganization = "giantswarm.io/organization"
	TagTCCP         = "giantswarm.io/tccp"
)

AWS Tags used for cost analysis and general resource tagging.

View Source
const (
	RefNodeDrainer = "NodeDrainer"
	RefWorkerASG   = "workerAutoScalingGroup"
)
View Source
const MaxNumberOfAZs = 4

As a first version of Node Pools feature, the maximum number of distinct Availability Zones is restricted to four due to current IPAM architecture & implementation.

View Source
const MaximumNumberOfAZsInCluster = 4

MaximumNumberOfAZsInCluster defines the current limitation with Node Pools implementation. Biggest limitation behind this is current IPAM implementation that restricts network sizes. Another related problem is restrictions in AWS resource structure.

NOTE: This is currently used in several places such as clusterazs resource & adapter. Move this to clusterazs resource when it's not needed elsewhere anymore. This restriction on its whole will be removed when IPAM design gets overhaul and TCCP infrastructure improved.

Variables

View Source
var AZLetters []byte

Functions

func AWSTags

func AWSTags(getter LabelsGetter, installationName string) map[string]string

func BucketName

func BucketName(getter LabelsGetter, accountID string) string

func BucketObjectName

func BucketObjectName(getter LabelsGetter, role string) string

BucketObjectName computes the S3 object path to the actual cloud config.

/version/3.4.0/cloudconfig/v_3_2_5/master
/version/3.4.0/cloudconfig/v_3_2_5/worker

func CloudConfigSmallTemplates

func CloudConfigSmallTemplates() []string

func CloudFormationGuestTemplates

func CloudFormationGuestTemplates() []string

func ClusterAPIEndpoint

func ClusterAPIEndpoint(cluster v1alpha1.Cluster) string

func ClusterBaseDomain

func ClusterBaseDomain(cluster v1alpha1.Cluster) string

func ClusterCloudProviderTag

func ClusterCloudProviderTag(getter LabelsGetter) string

func ClusterEtcdEndpoint

func ClusterEtcdEndpoint(cluster v1alpha1.Cluster) string

func ClusterEtcdEndpointWithPort

func ClusterEtcdEndpointWithPort(cluster v1alpha1.Cluster) string

func ClusterID

func ClusterID(getter LabelsGetter) string

func ClusterKubeletEndpoint

func ClusterKubeletEndpoint(cluster v1alpha1.Cluster) string

func ClusterNamespace

func ClusterNamespace(cluster v1alpha1.Cluster) string

func CredentialName

func CredentialName(cluster v1alpha1.Cluster) string

func CredentialNamespace

func CredentialNamespace(cluster v1alpha1.Cluster) string

func DockerVolumeResourceName

func DockerVolumeResourceName(cluster v1alpha1.Cluster) string

func EC2ServiceDomain

func EC2ServiceDomain(cluster v1alpha1.Cluster) string

func ELBNameAPI

func ELBNameAPI(cluster v1alpha1.Cluster) string

func ELBNameEtcd

func ELBNameEtcd(cluster v1alpha1.Cluster) string

func ELBNameIngress

func ELBNameIngress(cluster v1alpha1.Cluster) string

func ImageID

func ImageID(cluster v1alpha1.Cluster) string

func IsDeleted

func IsDeleted(getter DeletionTimestampGetter) bool

func IsInvalidParameter

func IsInvalidParameter(err error) bool

IsInvalidParameter asserts invalidParameterError.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound asserts notFoundError.

func IsWrongTypeError

func IsWrongTypeError(err error) bool

IsWrongTypeError asserts wrongTypeError.

func KubeletLabels

func KubeletLabels(cluster v1alpha1.Cluster) string

func MachineDeploymentASGName

func MachineDeploymentASGName(getter LabelsGetter) string

func MachineDeploymentID

func MachineDeploymentID(getter LabelsGetter) string

func MasterAvailabilityZone

func MasterAvailabilityZone(cluster v1alpha1.Cluster) string

func MasterCount

func MasterCount(cluster v1alpha1.Cluster) int

func MasterInstanceName

func MasterInstanceName(cluster v1alpha1.Cluster) string

func MasterInstanceResourceName

func MasterInstanceResourceName(cluster v1alpha1.Cluster) string

func MasterInstanceType

func MasterInstanceType(cluster v1alpha1.Cluster) string

func NATEIPName

func NATEIPName(az string) string

func NATGatewayName

func NATGatewayName(az string) string

func NATRouteName

func NATRouteName(az string) string

func OperatorVersion

func OperatorVersion(getter LabelsGetter) string

func OrganizationID

func OrganizationID(getter LabelsGetter) string

func PolicyNameMaster

func PolicyNameMaster(cluster v1alpha1.Cluster) string

func PolicyNameWorker

func PolicyNameWorker(cluster v1alpha1.Cluster) string

func PrivateRouteTableName

func PrivateRouteTableName(az string) string

func PrivateSubnetName

func PrivateSubnetName(az string) string

func PrivateSubnetRouteTableAssociationName

func PrivateSubnetRouteTableAssociationName(az string) string

func ProfileNameMaster

func ProfileNameMaster(cluster v1alpha1.Cluster) string

func ProfileNameWorker

func ProfileNameWorker(cluster v1alpha1.Cluster) string

func PublicRouteTableName

func PublicRouteTableName(az string) string

func PublicSubnetName

func PublicSubnetName(az string) string

func PublicSubnetRouteTableAssociationName

func PublicSubnetRouteTableAssociationName(az string) string

func Region

func Region(cluster v1alpha1.Cluster) string

func RegionARN

func RegionARN(cluster v1alpha1.Cluster) string

func ReleaseVersion

func ReleaseVersion(getter LabelsGetter) string

func RoleARNMaster

func RoleARNMaster(cluster v1alpha1.Cluster, accountID string) string

func RoleARNWorker

func RoleARNWorker(cluster v1alpha1.Cluster, accountID string) string

func RoleNameMaster

func RoleNameMaster(cluster v1alpha1.Cluster) string

func RoleNameWorker

func RoleNameWorker(cluster v1alpha1.Cluster) string

func RolePeerAccess

func RolePeerAccess(cluster v1alpha1.Cluster) string

func RouteTableName

func RouteTableName(cluster v1alpha1.Cluster, suffix, az string) string

func SanitizeCFResourceName

func SanitizeCFResourceName(v string) string

SanitizeCFResourceName filters out all non-ascii alphanumberics from input string.

Example: SanitizeCFResourceName("abc-123") == "abc123" Example2: SanitizeCFResourceName("Dear god why? щ(゚Д゚щ)") == "Deargodwhy"

func SecurityGroupName

func SecurityGroupName(cluster v1alpha1.Cluster, groupName string) string

func SmallCloudConfigPath

func SmallCloudConfigPath(getter LabelsGetter, accountID string, role string) string

func SmallCloudConfigS3URL

func SmallCloudConfigS3URL(getter LabelsGetter, accountID string, role string) string

func SortedWorkerAvailabilityZones

func SortedWorkerAvailabilityZones(cr v1alpha1.MachineDeployment) []string

func StackNameCPF

func StackNameCPF(cluster v1alpha1.Cluster) string

func StackNameCPI

func StackNameCPI(cluster v1alpha1.Cluster) string

func StackNameTCCP

func StackNameTCCP(cluster v1alpha1.Cluster) string

func StackNameTCNP

func StackNameTCNP(getter LabelsGetter) string

func StatusAWSConfigNetworkCIDR

func StatusAWSConfigNetworkCIDR(customObject v1alpha1.AWSConfig) string

func StatusClusterNetworkCIDR

func StatusClusterNetworkCIDR(cluster v1alpha1.Cluster) string

func TargetLogBucketName

func TargetLogBucketName(cluster v1alpha1.Cluster) string

func ToCluster

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

func ToMachineDeployment

func ToMachineDeployment(v interface{}) (v1alpha1.MachineDeployment, error)

func VPCPeeringRouteName

func VPCPeeringRouteName(az string) string

func VolumeNameDocker

func VolumeNameDocker(cluster v1alpha1.Cluster) string

func VolumeNameEtcd

func VolumeNameEtcd(cluster v1alpha1.Cluster) string

func VolumeNameLog

func VolumeNameLog(cluster v1alpha1.Cluster) string

func WorkerAvailabilityZones

func WorkerAvailabilityZones(cr v1alpha1.MachineDeployment) []string

func WorkerClusterID

func WorkerClusterID(cr v1alpha1.MachineDeployment) string

func WorkerDockerVolumeSizeGB

func WorkerDockerVolumeSizeGB(cr v1alpha1.MachineDeployment) string

func WorkerInstanceType

func WorkerInstanceType(cr v1alpha1.MachineDeployment) string

func WorkerScalingMax

func WorkerScalingMax(cr v1alpha1.MachineDeployment) int

func WorkerScalingMin

func WorkerScalingMin(cr v1alpha1.MachineDeployment) int

func WorkerSubnet

func WorkerSubnet(cr v1alpha1.MachineDeployment) string

Types

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