Documentation ¶
Index ¶
Constants ¶
View Source
const ( // AnnotationCheckPoint is the annotation used to store a checkpoint for resources. // It contains an opaque value that represents the last known reconciled state. AnnotationCheckPoint = "elbv2.k8s.aws/checkpoint" // AnnotationCheckPointTimestamp is the annotation used to store the last checkpointed time. The value is stored in seconds. AnnotationCheckPointTimestamp = AnnotationCheckPoint + "-timestamp" // IngressClass IngressClass = "kubernetes.io/ingress.class" AnnotationPrefixIngress = "alb.ingress.kubernetes.io" // Ingress annotation suffixes IngressSuffixLoadBalancerName = "load-balancer-name" IngressSuffixGroupName = "group.name" IngressSuffixGroupOrder = "group.order" IngressSuffixTags = "tags" IngressSuffixIPAddressType = "ip-address-type" IngressSuffixScheme = "scheme" IngressSuffixSubnets = "subnets" IngressSuffixCustomerOwnedIPv4Pool = "customer-owned-ipv4-pool" IngressSuffixLoadBalancerAttributes = "load-balancer-attributes" IngressSuffixWAFv2ACLARN = "wafv2-acl-arn" IngressSuffixWAFACLID = "waf-acl-id" IngressSuffixWebACLID = "web-acl-id" // deprecated, use "waf-acl-id" instead. IngressSuffixShieldAdvancedProtection = "shield-advanced-protection" IngressSuffixSecurityGroups = "security-groups" IngressSuffixListenPorts = "listen-ports" IngressSuffixSSLRedirect = "ssl-redirect" IngressSuffixInboundCIDRs = "inbound-cidrs" IngressSuffixCertificateARN = "certificate-arn" IngressSuffixSSLPolicy = "ssl-policy" IngressSuffixTargetType = "target-type" IngressSuffixBackendProtocol = "backend-protocol" IngressSuffixBackendProtocolVersion = "backend-protocol-version" IngressSuffixTargetGroupAttributes = "target-group-attributes" IngressSuffixHealthCheckPort = "healthcheck-port" IngressSuffixHealthCheckProtocol = "healthcheck-protocol" IngressSuffixHealthCheckPath = "healthcheck-path" IngressSuffixHealthCheckIntervalSeconds = "healthcheck-interval-seconds" IngressSuffixHealthCheckTimeoutSeconds = "healthcheck-timeout-seconds" IngressSuffixHealthyThresholdCount = "healthy-threshold-count" IngressSuffixUnhealthyThresholdCount = "unhealthy-threshold-count" IngressSuffixSuccessCodes = "success-codes" IngressSuffixAuthType = "auth-type" IngressSuffixAuthIDPCognito = "auth-idp-cognito" IngressSuffixAuthIDPOIDC = "auth-idp-oidc" IngressSuffixAuthOnUnauthenticatedRequest = "auth-on-unauthenticated-request" IngressSuffixAuthScope = "auth-scope" IngressSuffixAuthSessionCookie = "auth-session-cookie" IngressSuffixAuthSessionTimeout = "auth-session-timeout" IngressSuffixTargetNodeLabels = "target-node-labels" IngressSuffixManageSecurityGroupRules = "manage-backend-security-group-rules" IngressSuffixMutualAuthentication = "mutual-authentication" IngressSuffixSecurityGroupPrefixLists = "security-group-prefix-lists" IngressSuffixlsAttsAnnotationPrefix = "listener-attributes" IngressLBSuffixMultiClusterTargetGroup = "multi-cluster-target-group" IngressSuffixLoadBalancerCapacityReservation = "minimum-load-balancer-capacity" // NLB annotation suffixes // prefixes service.beta.kubernetes.io, service.kubernetes.io SvcLBSuffixSourceRanges = "load-balancer-source-ranges" SvcLBSuffixLoadBalancerType = "aws-load-balancer-type" SvcLBSuffixTargetType = "aws-load-balancer-nlb-target-type" SvcLBSuffixLoadBalancerName = "aws-load-balancer-name" SvcLBSuffixScheme = "aws-load-balancer-scheme" SvcLBSuffixInternal = "aws-load-balancer-internal" SvcLBSuffixProxyProtocol = "aws-load-balancer-proxy-protocol" SvcLBSuffixIPAddressType = "aws-load-balancer-ip-address-type" SvcLBSuffixAccessLogEnabled = "aws-load-balancer-access-log-enabled" SvcLBSuffixAccessLogS3BucketName = "aws-load-balancer-access-log-s3-bucket-name" SvcLBSuffixAccessLogS3BucketPrefix = "aws-load-balancer-access-log-s3-bucket-prefix" SvcLBSuffixCrossZoneLoadBalancingEnabled = "aws-load-balancer-cross-zone-load-balancing-enabled" SvcLBSuffixSSLCertificate = "aws-load-balancer-ssl-cert" SvcLBSuffixSSLPorts = "aws-load-balancer-ssl-ports" SvcLBSuffixSSLNegotiationPolicy = "aws-load-balancer-ssl-negotiation-policy" SvcLBSuffixBEProtocol = "aws-load-balancer-backend-protocol" SvcLBSuffixAdditionalTags = "aws-load-balancer-additional-resource-tags" SvcLBSuffixHCHealthyThreshold = "aws-load-balancer-healthcheck-healthy-threshold" SvcLBSuffixHCUnhealthyThreshold = "aws-load-balancer-healthcheck-unhealthy-threshold" SvcLBSuffixHCTimeout = "aws-load-balancer-healthcheck-timeout" SvcLBSuffixHCInterval = "aws-load-balancer-healthcheck-interval" SvcLBSuffixHCProtocol = "aws-load-balancer-healthcheck-protocol" SvcLBSuffixHCPort = "aws-load-balancer-healthcheck-port" SvcLBSuffixHCPath = "aws-load-balancer-healthcheck-path" SvcLBSuffixHCSuccessCodes = "aws-load-balancer-healthcheck-success-codes" SvcLBSuffixTargetGroupAttributes = "aws-load-balancer-target-group-attributes" SvcLBSuffixSubnets = "aws-load-balancer-subnets" SvcLBSuffixEIPAllocations = "aws-load-balancer-eip-allocations" SvcLBSuffixPrivateIpv4Addresses = "aws-load-balancer-private-ipv4-addresses" SvcLBSuffixIpv6Addresses = "aws-load-balancer-ipv6-addresses" SvcLBSuffixALPNPolicy = "aws-load-balancer-alpn-policy" SvcLBSuffixTargetNodeLabels = "aws-load-balancer-target-node-labels" SvcLBSuffixLoadBalancerAttributes = "aws-load-balancer-attributes" SvcLBSuffixLoadBalancerSecurityGroups = "aws-load-balancer-security-groups" SvcLBSuffixManageSGRules = "aws-load-balancer-manage-backend-security-group-rules" SvcLBSuffixEnforceSGInboundRulesOnPrivateLinkTraffic = "aws-load-balancer-inbound-sg-rules-on-private-link-traffic" SvcLBSuffixSecurityGroupPrefixLists = "aws-load-balancer-security-group-prefix-lists" SvcLBSuffixlsAttsAnnotationPrefix = "aws-load-balancer-listener-attributes" SvcLBSuffixMultiClusterTargetGroup = "aws-load-balancer-multi-cluster-target-group" ScvLBSuffixEnablePrefixForIpv6SourceNat = "aws-load-balancer-enable-prefix-for-ipv6-source-nat" ScvLBSuffixSourceNatIpv6Prefixes = "aws-load-balancer-source-nat-ipv6-prefixes" SvcLBSuffixLoadBalancerCapacityReservation = "aws-load-balancer-minimum-load-balancer-capacity" )
Variables ¶
This section is empty.
Functions ¶
func NewSuffixAnnotationParser ¶
func NewSuffixAnnotationParser(annotationPrefix string) *suffixAnnotationParser
NewSuffixAnnotationParser returns new suffixAnnotationParser based on specified prefix.
Types ¶
type ParseOption ¶
type ParseOption func(opts *ParseOptions)
func WithAlternativePrefixes ¶
func WithAlternativePrefixes(prefixes ...string) ParseOption
func WithExact ¶
func WithExact() ParseOption
type ParseOptions ¶
type ParseOptions struct {
// contains filtered or unexported fields
}
type Parser ¶
type Parser interface { // ParseStringAnnotation parses annotation into string value // returns whether annotation exists. ParseStringAnnotation(annotation string, value *string, annotations map[string]string, opts ...ParseOption) bool // ParseBoolAnnotation parses annotation into bool value // returns whether annotation exists and error if any ParseBoolAnnotation(annotation string, value *bool, annotations map[string]string, opts ...ParseOption) (bool, error) // ParseInt64Annotation parses annotation into int64 value, // returns whether annotation exists and parser error if any. ParseInt64Annotation(annotation string, value *int64, annotations map[string]string, opts ...ParseOption) (bool, error) // ParseInt32Annotation parses annotation into int32 value, // returns whether annotation exists and parser error if any. ParseInt32Annotation(annotation string, value *int32, annotations map[string]string, opts ...ParseOption) (bool, error) // ParseStringSliceAnnotation parses comma separated values from the annotation into string slice // returns true if the annotation exists ParseStringSliceAnnotation(annotation string, value *[]string, annotations map[string]string, opts ...ParseOption) bool // ParseJSONAnnotation parses json value into the given interface // returns true if the annotation exists and parser error if any ParseJSONAnnotation(annotation string, value interface{}, annotations map[string]string, opts ...ParseOption) (bool, error) // ParseStringMapAnnotation parses comma separated key=value pairs into a map // returns true if the annotation exists ParseStringMapAnnotation(annotation string, value *map[string]string, annotations map[string]string, opts ...ParseOption) (bool, error) }
Parser is responsible for loading annotations into structured objects. It accepts an list of Object annotations and will search through them until desired annotation is found.
Click to show internal directories.
Click to hide internal directories.