conditions

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ListenerReasonUnsupportedValue is used with the "Accepted" condition when a value of a field in a Listener
	// is invalid or not supported.
	ListenerReasonUnsupportedValue v1.ListenerConditionReason = "UnsupportedValue"

	// ListenerMessageFailedNginxReload is a message used with ListenerConditionProgrammed (false)
	// when nginx fails to reload.
	ListenerMessageFailedNginxReload = "The Listener is not programmed due to a failure to " +
		"reload nginx with the configuration. Please see the nginx container logs for any possible configuration issues."

	// RouteReasonBackendRefUnsupportedValue is used with the "ResolvedRefs" condition when one of the
	// Route rules has a backendRef with an unsupported value.
	RouteReasonBackendRefUnsupportedValue = "UnsupportedValue"

	// RouteReasonInvalidGateway is used with the "Accepted" (false) condition when the Gateway the Route
	// references is invalid.
	RouteReasonInvalidGateway = "InvalidGateway"

	// RouteReasonInvalidListener is used with the "Accepted" condition when the Route references an invalid listener.
	RouteReasonInvalidListener v1.RouteConditionReason = "InvalidListener"

	// RouteReasonGatewayNotProgrammed is used when the associated Gateway is not programmed.
	// Used with Accepted (false).
	RouteReasonGatewayNotProgrammed v1.RouteConditionReason = "GatewayNotProgrammed"

	// GatewayReasonGatewayConflict indicates there are multiple Gateway resources to choose from,
	// and we ignored the resource in question and picked another Gateway as the winner.
	// This reason is used with GatewayConditionAccepted (false).
	GatewayReasonGatewayConflict v1.GatewayConditionReason = "GatewayConflict"

	// GatewayMessageGatewayConflict is a message that describes GatewayReasonGatewayConflict.
	GatewayMessageGatewayConflict = "The resource is ignored due to a conflicting Gateway resource"

	// GatewayReasonUnsupportedValue is used with GatewayConditionAccepted (false) when a value of a field in a Gateway
	// is invalid or not supported.
	GatewayReasonUnsupportedValue v1.GatewayConditionReason = "UnsupportedValue"

	// GatewayMessageFailedNginxReload is a message used with GatewayConditionProgrammed (false)
	// when nginx fails to reload.
	GatewayMessageFailedNginxReload = "The Gateway is not programmed due to a failure to " +
		"reload nginx with the configuration. Please see the nginx container logs for any possible configuration issues"

	// RouteMessageFailedNginxReload is a message used with RouteReasonGatewayNotProgrammed
	// when nginx fails to reload.
	RouteMessageFailedNginxReload = GatewayMessageFailedNginxReload + ". NGINX may still be configured " +
		"for this HTTPRoute. However, future updates to this resource will not be configured until the Gateway " +
		"is programmed again"
)

Variables

This section is empty.

Functions

func NewDefaultGatewayConditions

func NewDefaultGatewayConditions() []conditions.Condition

NewDefaultGatewayConditions returns the default Conditions that must be present in the status of a Gateway.

func NewDefaultListenerConditions

func NewDefaultListenerConditions() []conditions.Condition

NewDefaultListenerConditions returns the default Conditions that must be present in the status of a Listener.

func NewDefaultRouteConditions

func NewDefaultRouteConditions() []conditions.Condition

NewDefaultRouteConditions returns the default conditions that must be present in the status of an HTTPRoute.

func NewGatewayAccepted

func NewGatewayAccepted() conditions.Condition

NewGatewayAccepted returns a Condition that indicates the Gateway is accepted.

func NewGatewayAcceptedListenersNotValid

func NewGatewayAcceptedListenersNotValid() conditions.Condition

NewGatewayAcceptedListenersNotValid returns a Condition that indicates the Gateway is accepted, but has at least one listener that is invalid.

func NewGatewayClassInvalidParameters

func NewGatewayClassInvalidParameters(msg string) conditions.Condition

NewGatewayClassInvalidParameters returns a Condition that indicates that the GatewayClass has invalid parameters.

func NewGatewayConflict

func NewGatewayConflict() []conditions.Condition

NewGatewayConflict returns Conditions that indicate the Gateway has a conflict with another Gateway.

func NewGatewayConflictNotProgrammed

func NewGatewayConflictNotProgrammed() conditions.Condition

NewGatewayConflictNotProgrammed returns a custom Programmed Condition that indicates the Gateway has a conflict with another Gateway.

func NewGatewayInvalid

func NewGatewayInvalid(msg string) []conditions.Condition

NewGatewayInvalid returns Conditions that indicate the Gateway is not accepted and programmed because it is semantically or syntactically invalid. The provided message contains the details of why the Gateway is invalid.

func NewGatewayNotAcceptedListenersNotValid

func NewGatewayNotAcceptedListenersNotValid() []conditions.Condition

NewGatewayNotAcceptedListenersNotValid returns Conditions that indicate the Gateway is not accepted, because all listeners are invalid.

func NewGatewayNotProgrammedInvalid

func NewGatewayNotProgrammedInvalid(msg string) conditions.Condition

NewGatewayNotProgrammedInvalid returns a Condition that indicates the Gateway is not programmed because it is semantically or syntactically invalid. The provided message contains the details of why the Gateway is invalid.

func NewGatewayProgrammed

func NewGatewayProgrammed() conditions.Condition

NewGatewayProgrammed returns a Condition that indicates the Gateway is programmed.

func NewGatewayUnsupportedValue

func NewGatewayUnsupportedValue(msg string) []conditions.Condition

NewGatewayUnsupportedValue returns Conditions that indicate that a field of the Gateway has an unsupported value. Unsupported means that the value is not supported by the implementation or invalid.

func NewListenerAccepted

func NewListenerAccepted() conditions.Condition

NewListenerAccepted returns a Condition that indicates that the Listener is accepted.

func NewListenerInvalidCertificateRef

func NewListenerInvalidCertificateRef(msg string) []conditions.Condition

NewListenerInvalidCertificateRef returns Conditions that indicate that a CertificateRef of a Listener is invalid.

func NewListenerInvalidRouteKinds

func NewListenerInvalidRouteKinds(msg string) []conditions.Condition

NewListenerInvalidRouteKinds returns Conditions that indicate that an invalid or unsupported Route kind is specified by the Listener.

func NewListenerNoConflicts

func NewListenerNoConflicts() conditions.Condition

NewListenerNoConflicts returns a Condition that indicates that there are no conflicts in a Listener.

func NewListenerNotProgrammedInvalid

func NewListenerNotProgrammedInvalid(msg string) conditions.Condition

NewListenerNotProgrammedInvalid returns a Condition that indicates the Listener is not programmed because it is semantically or syntactically invalid. The provided message contains the details of why the Listener is invalid.

func NewListenerProgrammed

func NewListenerProgrammed() conditions.Condition

NewListenerProgrammed returns a Condition that indicates the Listener is programmed.

func NewListenerProtocolConflict

func NewListenerProtocolConflict(msg string) []conditions.Condition

NewListenerProtocolConflict returns Conditions that indicate multiple Listeners are specified with the same Listener port number, but have conflicting protocol specifications.

func NewListenerRefNotPermitted

func NewListenerRefNotPermitted(msg string) []conditions.Condition

NewListenerRefNotPermitted returns Conditions that indicates that the Listener references a TLS secret that is not permitted by a ReferenceGrant.

func NewListenerResolvedRefs

func NewListenerResolvedRefs() conditions.Condition

NewListenerResolvedRefs returns a Condition that indicates that all references in a Listener are resolved.

func NewListenerUnsupportedProtocol

func NewListenerUnsupportedProtocol(msg string) []conditions.Condition

NewListenerUnsupportedProtocol returns Conditions that indicate that the protocol of a Listener is unsupported.

func NewListenerUnsupportedValue

func NewListenerUnsupportedValue(msg string) []conditions.Condition

NewListenerUnsupportedValue returns Conditions that indicate that a field of a Listener has an unsupported value. Unsupported means that the value is not supported by the implementation or invalid.

func NewNginxGatewayInvalid

func NewNginxGatewayInvalid(msg string) conditions.Condition

NewNginxGatewayInvalid returns a Condition that indicates that the NginxGateway config is invalid.

func NewNginxGatewayValid

func NewNginxGatewayValid() conditions.Condition

NewNginxGatewayValid returns a Condition that indicates that the NginxGateway config is valid.

func NewRouteAccepted

func NewRouteAccepted() conditions.Condition

NewRouteAccepted returns a Condition that indicates that the HTTPRoute is accepted.

func NewRouteBackendRefInvalidKind

func NewRouteBackendRefInvalidKind(msg string) conditions.Condition

NewRouteBackendRefInvalidKind returns a Condition that indicates that the Route has a backendRef with an invalid kind.

func NewRouteBackendRefRefBackendNotFound

func NewRouteBackendRefRefBackendNotFound(msg string) conditions.Condition

NewRouteBackendRefRefBackendNotFound returns a Condition that indicates that the Route has a backendRef that points to non-existing backend.

func NewRouteBackendRefRefNotPermitted

func NewRouteBackendRefRefNotPermitted(msg string) conditions.Condition

NewRouteBackendRefRefNotPermitted returns a Condition that indicates that the Route has a backendRef that is not permitted.

func NewRouteBackendRefUnsupportedValue

func NewRouteBackendRefUnsupportedValue(msg string) conditions.Condition

NewRouteBackendRefUnsupportedValue returns a Condition that indicates that the Route has a backendRef with an unsupported value.

func NewRouteGatewayNotProgrammed

func NewRouteGatewayNotProgrammed(msg string) conditions.Condition

NewRouteGatewayNotProgrammed returns a Condition that indicates that the Gateway it references is not programmed, which does not guarantee that the HTTPRoute has been configured.

func NewRouteInvalidGateway

func NewRouteInvalidGateway() conditions.Condition

NewRouteInvalidGateway returns a Condition that indicates that the Route is not Accepted because the Gateway it references is invalid.

func NewRouteInvalidListener

func NewRouteInvalidListener() conditions.Condition

NewRouteInvalidListener returns a Condition that indicates that the HTTPRoute is not accepted because of an invalid listener.

func NewRouteNoMatchingListenerHostname

func NewRouteNoMatchingListenerHostname() conditions.Condition

NewRouteNoMatchingListenerHostname returns a Condition that indicates that the hostname of the listener does not match the hostnames of the HTTPRoute.

func NewRouteNoMatchingParent

func NewRouteNoMatchingParent() conditions.Condition

NewRouteNoMatchingParent returns a Condition that indicates that the Route is not Accepted because it specifies a Port and/or SectionName that does not match any Listeners in the Gateway.

func NewRouteNotAllowedByListeners

func NewRouteNotAllowedByListeners() conditions.Condition

NewRouteNotAllowedByListeners returns a Condition that indicates that the HTTPRoute is not allowed by any listener.

func NewRoutePartiallyInvalid

func NewRoutePartiallyInvalid(msg string) conditions.Condition

NewRoutePartiallyInvalid returns a Condition that indicates that the HTTPRoute contains a combination of both valid and invalid rules.

// nolint:lll The message must start with "Dropped Rules(s)" according to the Gateway API spec See https://github.com/kubernetes-sigs/gateway-api/blob/37d81593e5a965ed76582dbc1a2f56bbd57c0622/apis/v1/shared_types.go#L408-L413

func NewRouteResolvedRefs

func NewRouteResolvedRefs() conditions.Condition

NewRouteResolvedRefs returns a Condition that indicates that all the references on the Route are resolved.

func NewRouteUnsupportedValue

func NewRouteUnsupportedValue(msg string) conditions.Condition

NewRouteUnsupportedValue returns a Condition that indicates that the HTTPRoute includes an unsupported value.

func NewTODO

func NewTODO(msg string) conditions.Condition

NewTODO returns a Condition that can be used as a placeholder for a condition that is not yet implemented.

Types

This section is empty.

Jump to

Keyboard shortcuts

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