util

package
v0.0.0-...-4da6f2b Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OperatorTagKey           = "kubernetes.io/aws-vpce-operator"
	OperatorTagValue         = "managed"
	RedHatManagedTagKey      = "red-hat-managed"
	RedHatManagedTagValue    = "true"
	SecurityGroupDescription = "Managed by AWS VPCE Operator"
)

Variables

This section is empty.

Functions

func GenerateAwsTags

func GenerateAwsTags(name, clusterTagKey string) ([]types.Tag, error)

GenerateAwsTags returns the tags that should be reconciled on every AWS resource created by this operator

func GenerateAwsTagsAsMap

func GenerateAwsTagsAsMap(name, clusterTagKey string) (map[string]string, error)

GenerateAwsTagsAsMap converts the slice of tags returned by GenerateAwsTags into a map for convenience

func GenerateR53Tags

func GenerateR53Tags(clusterTagKey string) ([]route53Types.Tag, error)

GenerateR53Tags returns the tags that should be reconciled on every AWS resource created by this operator

func GenerateSecurityGroupName

func GenerateSecurityGroupName(clusterName, purpose string) (string, error)

GenerateSecurityGroupName generates a name for a security group given a cluster name and a "purpose" for the security group

func GenerateVPCEndpointName

func GenerateVPCEndpointName(clusterName, purpose string) (string, error)

GenerateVPCEndpointName generates a name for a VPC endpoint given a cluster name and a "purpose" for the VPC endpoint

func GetClusterTagKey

func GetClusterTagKey(infraName string) (string, error)

GetClusterTagKey returns the tag assigned to all AWS resources for the given cluster

func StringSliceTwoWayDiff

func StringSliceTwoWayDiff(current, expected []string) ([]string, []string)

StringSliceTwoWayDiff returns the objects in expected that are not in current (to be used for creation) and the objects in current that are not in expected (to be used for deletion).

Types

This section is empty.

Jump to

Keyboard shortcuts

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