key

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2019 License: Apache-2.0 Imports: 9 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_0_0"

	// CloudProviderTagName is used to add Cloud Provider tags to AWS resources.
	CloudProviderTagName = "kubernetes.io/cluster/%s"

	// Cluster tag name for tagging all resources helping cost analysis in AWS.
	ClusterTagName = "giantswarm.io/cluster"

	// CloudProviderTagOwnedValue is used to indicate an AWS resource is owned
	// and managed by a cluster.
	CloudProviderTagOwnedValue = "owned"

	// EnableTerminationProtection is used to protect the CF stacks from deletion.
	EnableTerminationProtection = true

	// InstallationTagName is used for AWS resource tagging.
	InstallationTagName = "giantswarm.io/installation"

	// OrganizationTagName is used for AWS resource tagging.
	OrganizationTagName = "giantswarm.io/organization"

	// ProfileNameTemplate will be included in the IAM instance profile name.
	ProfileNameTemplate = "EC2-K8S-Role"
	// RoleNameTemplate will be included in the IAM role name.
	RoleNameTemplate = "EC2-K8S-Role"
	// PolicyNameTemplate will be included in the IAM policy name.
	PolicyNameTemplate = "EC2-K8S-Policy"
	// LogDeliveryURI is used for setting the correct ACL in the access log bucket
	LogDeliveryURI = "uri=http://acs.amazonaws.com/groups/s3/LogDelivery"

	InstanceIDAnnotation = "aws-operator.giantswarm.io/instance"
)
View Source
const (
	DockerVolumeResourceNameKey   = "DockerVolumeResourceName"
	MasterImageIDKey              = "MasterImageID"
	MasterInstanceResourceNameKey = "MasterInstanceResourceName"
	MasterInstanceTypeKey         = "MasterInstanceType"
	MasterInstanceMonitoring      = "Monitoring"
	MasterCloudConfigVersionKey   = "MasterCloudConfigVersion"
	VersionBundleVersionKey       = "VersionBundleVersion"
	WorkerCountKey                = "WorkerCount"
	WorkerMaxKey                  = "WorkerMax"
	WorkerMinKey                  = "WorkerMin"
	WorkerDockerVolumeSizeKey     = "WorkerDockerVolumeSizeGB"
	WorkerImageIDKey              = "WorkerImageID"
	WorkerInstanceMonitoring      = "Monitoring"
	WorkerInstanceTypeKey         = "WorkerInstanceType"
	WorkerCloudConfigVersionKey   = "WorkerCloudConfigVersion"
)
View Source
const (
	ClusterIDLabel = "giantswarm.io/cluster"

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

	LabelApp           = "app"
	LabelCluster       = "giantswarm.io/cluster"
	LabelCustomer      = "customer"
	LabelOrganization  = "giantswarm.io/organization"
	LabelVersionBundle = "giantswarm.io/version-bundle"

	LegacyLabelCluster = "cluster"
)
View Source
const (
	NodeDrainerLifecycleHookName = "NodeDrainer"
	WorkerASGRef                 = "workerAutoScalingGroup"
)
View Source
const (
	KindMaster  = "master"
	KindIngress = "ingress"
	KindWorker  = "worker"
	KindEtcd    = "etcd-elb"
)

Variables

This section is empty.

Functions

func AWSCliContainerRegistry

func AWSCliContainerRegistry(customObject v1alpha1.AWSConfig) string

func AutoScalingGroupName

func AutoScalingGroupName(customObject v1alpha1.AWSConfig, groupName string) string

func AvailabilityZone

func AvailabilityZone(customObject v1alpha1.AWSConfig) string

func BaseDomain

func BaseDomain(customObject v1alpha1.AWSConfig) string

func BucketName

func BucketName(customObject v1alpha1.AWSConfig, accountID string) string

func BucketObjectName

func BucketObjectName(customObject v1alpha1.AWSConfig, 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 CIDR

func CIDR(customObject v1alpha1.AWSConfig) string

func CloudConfigSmallTemplates

func CloudConfigSmallTemplates() []string

func CloudFormationGuestTemplates

func CloudFormationGuestTemplates() []string

func ClusterAPIEndpoint

func ClusterAPIEndpoint(customObject v1alpha1.AWSConfig) string

func ClusterCloudProviderTag

func ClusterCloudProviderTag(customObject v1alpha1.AWSConfig) string

func ClusterCustomer

func ClusterCustomer(customObject v1alpha1.AWSConfig) string

func ClusterEtcdDomain

func ClusterEtcdDomain(customObject v1alpha1.AWSConfig) string

func ClusterID

func ClusterID(customObject v1alpha1.AWSConfig) string

func ClusterNamespace

func ClusterNamespace(customObject v1alpha1.AWSConfig) string

func ClusterOrganization

func ClusterOrganization(customObject v1alpha1.AWSConfig) 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 v1alpha1.AWSConfig, installationName string) map[string]string

func CredentialName

func CredentialName(customObject v1alpha1.AWSConfig) string

func CredentialNamespace

func CredentialNamespace(customObject v1alpha1.AWSConfig) string

func CustomerID

func CustomerID(customObject v1alpha1.AWSConfig) string

func DockerVolumeName

func DockerVolumeName(customObject v1alpha1.AWSConfig) string

func DockerVolumeResourceName

func DockerVolumeResourceName(customObject v1alpha1.AWSConfig) string

func EC2ServiceDomain

func EC2ServiceDomain(customObject v1alpha1.AWSConfig) string

func EtcdDomain

func EtcdDomain(customObject v1alpha1.AWSConfig) string

func EtcdPort

func EtcdPort(customObject v1alpha1.AWSConfig) int

func EtcdVolumeName

func EtcdVolumeName(customObject v1alpha1.AWSConfig) string

func HostedZoneNameAPI

func HostedZoneNameAPI(customObject v1alpha1.AWSConfig) string

func HostedZoneNameEtcd

func HostedZoneNameEtcd(customObject v1alpha1.AWSConfig) string

func HostedZoneNameIngress

func HostedZoneNameIngress(customObject v1alpha1.AWSConfig) string

func ImageID

func ImageID(customObject v1alpha1.AWSConfig) (string, error)

ImageID returns the EC2 AMI for the configured region.

func IngressControllerInsecurePort

func IngressControllerInsecurePort(customObject v1alpha1.AWSConfig) int

func IngressControllerSecurePort

func IngressControllerSecurePort(customObject v1alpha1.AWSConfig) int

func InstanceProfileName

func InstanceProfileName(customObject v1alpha1.AWSConfig, profileType string) string

func IsChinaRegion

func IsChinaRegion(customObject v1alpha1.AWSConfig) bool

func IsDeleted

func IsDeleted(customObject v1alpha1.AWSConfig) bool

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsMalformedCloudConfigKey

func IsMalformedCloudConfigKey(err error) bool

IsMalformedCloudConfigKey asserts malformedCloudConfigKeyError.

func IsMissingCloudConfigKey

func IsMissingCloudConfigKey(err error) bool

IsMissingCloudConfigKey asserts missingCloudConfigKeyError.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound asserts notFoundError.

func IsWrongTypeError

func IsWrongTypeError(err error) bool

IsWrongTypeError asserts wrongTypeError.

func KubernetesAPISecurePort

func KubernetesAPISecurePort(customObject v1alpha1.AWSConfig) int

func LoadBalancerName

func LoadBalancerName(domainName string, cluster v1alpha1.AWSConfig) (string, error)

LoadBalancerName produces a unique name for the load balancer. It takes the domain name, extracts the first subdomain, and combines it with the cluster name.

func LogVolumeName

func LogVolumeName(customObject v1alpha1.AWSConfig) string

func MainGuestStackName

func MainGuestStackName(customObject v1alpha1.AWSConfig) string

func MainHostPostStackName

func MainHostPostStackName(customObject v1alpha1.AWSConfig) string

func MainHostPreStackName

func MainHostPreStackName(customObject v1alpha1.AWSConfig) string

func MasterCount

func MasterCount(customObject v1alpha1.AWSConfig) int

func MasterImageID

func MasterImageID(customObject v1alpha1.AWSConfig) string

func MasterInstanceName

func MasterInstanceName(customObject v1alpha1.AWSConfig) string

func MasterInstanceResourceName

func MasterInstanceResourceName(customObject v1alpha1.AWSConfig) string

func MasterInstanceType

func MasterInstanceType(customObject v1alpha1.AWSConfig) string

func MasterRoleARN

func MasterRoleARN(customObject v1alpha1.AWSConfig, accountID string) string

func NATEIPName

func NATEIPName(idx int) string

func NATGatewayName

func NATGatewayName(idx int) string

func NATRouteName

func NATRouteName(idx int) string

func PeerAccessRoleName

func PeerAccessRoleName(customObject v1alpha1.AWSConfig) string

func PolicyName

func PolicyName(customObject v1alpha1.AWSConfig, profileType string) string

func PrivateRouteTableName

func PrivateRouteTableName(idx int) string

func PrivateSubnetCIDR

func PrivateSubnetCIDR(customObject v1alpha1.AWSConfig) string

func PrivateSubnetName

func PrivateSubnetName(idx int) string

func PrivateSubnetRouteTableAssociationName

func PrivateSubnetRouteTableAssociationName(idx int) string

func PublicRouteTableName

func PublicRouteTableName(idx int) string

func PublicSubnetCIDR

func PublicSubnetCIDR(customObject v1alpha1.AWSConfig) string

func PublicSubnetName

func PublicSubnetName(idx int) string

func PublicSubnetRouteTableAssociationName

func PublicSubnetRouteTableAssociationName(idx int) string

func Region

func Region(customObject v1alpha1.AWSConfig) string

func RegionARN

func RegionARN(customObject v1alpha1.AWSConfig) string

func RoleName

func RoleName(customObject v1alpha1.AWSConfig, profileType string) string

func RouteTableName

func RouteTableName(customObject v1alpha1.AWSConfig, suffix string, idx int) string

func S3ServiceDomain

func S3ServiceDomain(customObject v1alpha1.AWSConfig) string

func ScalingMax

func ScalingMax(customObject v1alpha1.AWSConfig) int

func ScalingMin

func ScalingMin(customObject v1alpha1.AWSConfig) int

func SecurityGroupName

func SecurityGroupName(customObject v1alpha1.AWSConfig, groupName string) string

func SmallCloudConfigPath

func SmallCloudConfigPath(customObject v1alpha1.AWSConfig, accountID string, role string) string

func SmallCloudConfigS3HTTPURL

func SmallCloudConfigS3HTTPURL(customObject v1alpha1.AWSConfig, accountID string, role string) string

func SmallCloudConfigS3URL

func SmallCloudConfigS3URL(customObject v1alpha1.AWSConfig, accountID string, role string) string

func SpecAvailabilityZones

func SpecAvailabilityZones(customObject v1alpha1.AWSConfig) int

func StatusAvailabilityZones

func StatusAvailabilityZones(customObject v1alpha1.AWSConfig) []v1alpha1.AWSConfigStatusAWSAvailabilityZone

func StatusNetworkCIDR

func StatusNetworkCIDR(customObject v1alpha1.AWSConfig) string

StatusNetworkCIDR returns the allocated tenant cluster subnet CIDR.

func StatusScalingDesiredCapacity

func StatusScalingDesiredCapacity(customObject v1alpha1.AWSConfig) int

func SubnetName

func SubnetName(customObject v1alpha1.AWSConfig, suffix string) string

func TargetLogBucketName

func TargetLogBucketName(customObject v1alpha1.AWSConfig) string

func ToClusterEndpoint

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

func ToClusterID

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

func ToClusterStatus

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

func ToCustomObject

func ToCustomObject(v interface{}) (v1alpha1.AWSConfig, error)

func ToNodeCount

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

func ToVersionBundleVersion

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

func VPCPeeringRouteName

func VPCPeeringRouteName(idx int) string

func VersionBundleVersion

func VersionBundleVersion(customObject v1alpha1.AWSConfig) string

VersionBundleVersion returns the version contained in the Version Bundle.

func WorkerCount

func WorkerCount(customObject v1alpha1.AWSConfig) int

func WorkerDockerVolumeSizeGB

func WorkerDockerVolumeSizeGB(customObject v1alpha1.AWSConfig) string

WorkerDockerVolumeSizeGB returns size of a docker volume configured for worker nodes. If there are no workers in custom object, 0 is returned as size.

func WorkerImageID

func WorkerImageID(customObject v1alpha1.AWSConfig) string

func WorkerInstanceType

func WorkerInstanceType(customObject v1alpha1.AWSConfig) string

func WorkerRoleARN

func WorkerRoleARN(customObject v1alpha1.AWSConfig, accountID string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL