ingress

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CanaryIngressSuffix is the name suffix all canary ingresses created by the rollouts controller will have
	CanaryIngressSuffix = "-canary"
	// ManagedActionsAnnotation holds list of ALB actions that are managed by rollouts
	ManagedActionsAnnotation = "rollouts.argoproj.io/managed-alb-actions"
	//ALBIngressAnnotation is the prefix annotation that is used by the ALB Ingress controller to configure an ALB
	ALBIngressAnnotation = "alb.ingress.kubernetes.io"
	// ALBActionPrefix the prefix to specific actions within an ALB ingress.
	ALBActionPrefix = "/actions."
)

Variables

This section is empty.

Functions

func ALBActionAnnotationKey

func ALBActionAnnotationKey(r *v1alpha1.Rollout) string

ALBActionAnnotationKey returns the annotation key for a specific action

func GetCanaryIngressName

func GetCanaryIngressName(rollout *v1alpha1.Rollout) string

GetCanaryIngressName constructs the name to use for the canary ingress resource from a given Rollout

func GetRolloutIngressKeys

func GetRolloutIngressKeys(rollout *v1alpha1.Rollout) []string

GetRolloutIngressKeys returns ingresses keys (namespace/ingressName) which are referenced by specified rollout

func HasRuleWithService

func HasRuleWithService(ingress *extensionsv1beta1.Ingress, svc string) bool

HasRuleWithService check if an Ingress has a service in one of it's rules

Types

type ALBAction

type ALBAction struct {
	Type          string           `json:"Type"`
	ForwardConfig ALBForwardConfig `json:"ForwardConfig"`
}

ALBAction describes an ALB action that configure the behavior of an ALB. This struct is marshaled into a string that is added to the Ingress's annotations.

type ALBForwardConfig

type ALBForwardConfig struct {
	TargetGroups []ALBTargetGroup `json:"TargetGroups"`
}

ALBForwardConfig describes a list of target groups that the ALB should route traffic towards

type ALBTargetGroup

type ALBTargetGroup struct {
	// the K8s service Name
	ServiceName string `json:"ServiceName,omitempty"`
	// the K8s service port
	ServicePort string `json:"ServicePort,omitempty"`
	// The weight. The range is 0 to 999.
	Weight *int64 `json:"Weight,omitempty"`
}

ALBTargetGroup holds the weight to send to a specific destination consisting of a K8s service and port or ARN

type ManagedALBActions

type ManagedALBActions map[string]string

ManagedALBActions a mapping of Rollout names to the ALB action that the Rollout manages

func NewManagedALBActions

func NewManagedALBActions(annotation string) (ManagedALBActions, error)

NewManagedALBActions converts a string into a mapping of the rollouts to managed ALB actions

func (ManagedALBActions) String

func (m ManagedALBActions) String() string

String outputs a string of all the managed ALB actions that is stored in the Ingress's annotations

Jump to

Keyboard shortcuts

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