action

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const UseActionAnnotation = "use-annotation"

Variables

This section is empty.

Functions

func Default404Backend

func Default404Backend() extensions.IngressBackend

Default404Backend turns an IngressBackend that will return 404s

func NewParser

func NewParser() parser.IngressAnnotation

NewParser creates a new target group annotation parser

func Use

func Use(s string) bool

Use returns true if the parameter requested an annotation configured action

Types

type Action added in v1.1.5

type Action struct {
	// The type of action.
	//
	// Type is a required field
	Type *string

	// The Amazon Resource Name (ARN) of the target group. Specify only when Type
	// is forward and you want to route to a single target group. To route to one
	// or more target groups, use ForwardConfig instead.
	TargetGroupArn *string

	// [Application Load Balancer] Information for creating an action that returns
	// a custom HTTP response. Specify only when Type is fixed-response.
	FixedResponseConfig *FixedResponseActionConfig

	// Information for creating an action that distributes requests among one or
	// more target groups. For Network Load Balancers, you can specify a single
	// target group. Specify only when Type is forward. If you specify both ForwardConfig
	// and TargetGroupArn, you can specify only one target group using ForwardConfig
	// and it must be the same target group specified in TargetGroupArn.
	ForwardConfig *ForwardActionConfig

	// [Application Load Balancer] Information for creating a redirect action. Specify
	// only when Type is redirect.
	RedirectConfig *RedirectActionConfig
}

Information about an action.

type Config

type Config struct {
	Actions map[string]Action
}

func Dummy

func Dummy() *Config

func (*Config) GetAction

func (c *Config) GetAction(serviceName string) (Action, error)

GetAction returns the action named serviceName configured by an annotation

type FixedResponseActionConfig added in v1.1.5

type FixedResponseActionConfig struct {
	// The content type.
	//
	// Valid Values: text/plain | text/css | text/html | application/javascript
	// | application/json
	ContentType *string

	// The message.
	MessageBody *string

	// The HTTP response code (2XX, 4XX, or 5XX).
	//
	// StatusCode is a required field
	StatusCode *string
}

Information about an action that returns a custom HTTP response.

type ForwardActionConfig added in v1.1.5

type ForwardActionConfig struct {
	// The target group stickiness for the rule.
	TargetGroupStickinessConfig *TargetGroupStickinessConfig

	// One or more target groups. For Network Load Balancers, you can specify a
	// single target group.
	TargetGroups []*TargetGroupTuple
}

Information about a forward action.

type RedirectActionConfig added in v1.1.5

type RedirectActionConfig struct {
	// The hostname. This component is not percent-encoded. The hostname can contain
	// #{host}.
	Host *string

	// The absolute path, starting with the leading "/". This component is not percent-encoded.
	// The path can contain #{host}, #{path}, and #{port}.
	Path *string

	// The port. You can specify a value from 1 to 65535 or #{port}.
	Port *string

	// The protocol. You can specify HTTP, HTTPS, or #{protocol}. You can redirect
	// HTTP to HTTP, HTTP to HTTPS, and HTTPS to HTTPS. You cannot redirect HTTPS
	// to HTTP.
	Protocol *string

	// The query parameters, URL-encoded when necessary, but not percent-encoded.
	// Do not include the leading "?", as it is automatically added. You can specify
	// any of the reserved keywords.
	Query *string

	// The HTTP redirect code. The redirect is either permanent (HTTP 301) or temporary
	// (HTTP 302).
	//
	// StatusCode is a required field
	StatusCode *string
}

Information about an redirect action

type TargetGroupStickinessConfig added in v1.1.5

type TargetGroupStickinessConfig struct {
	// The time period, in seconds, during which requests from a client should be
	// routed to the same target group. The range is 1-604800 seconds (7 days).
	DurationSeconds *int64

	// Indicates whether target group stickiness is enabled.
	Enabled *bool
}

Information about the target group stickiness for a rule.

type TargetGroupTuple added in v1.1.5

type TargetGroupTuple struct {
	// The Amazon Resource Name (ARN) of the target group.
	TargetGroupArn *string

	// the K8s service Name
	ServiceName *string

	// the K8s service port
	ServicePort *string

	// The weight. The range is 0 to 999.
	Weight *int64
}

Information about how traffic will be distributed between multiple target groups in a forward rule.

Jump to

Keyboard shortcuts

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