conditions

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: Apache-2.0 Imports: 6 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 v1.RouteConditionReason = "UnsupportedValue"

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

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

	// RouteReasonHostnameConflict is used with the "Accepted" condition when a route has the exact same hostname
	// as another route.
	RouteReasonHostnameConflict v1.RouteConditionReason = "HostnameConflict"

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

	// RouteReasonUnsupportedConfiguration is used when the associated Gateway does not support the Route.
	// Used with Accepted (false).
	RouteReasonUnsupportedConfiguration v1.RouteConditionReason = "UnsupportedConfiguration"

	// RouteReasonInvalidIPFamily is used when the Service associated with the Route is not configured with
	// the same IP family as the NGINX server.
	// Used with ResolvedRefs (false).
	RouteReasonInvalidIPFamily v1.RouteConditionReason = "InvalidServiceIPFamily"

	// 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 Route. However, future updates to this resource will not be configured until the Gateway " +
		"is programmed again"

	// GatewayClassResolvedRefs condition indicates whether the controller was able to resolve the
	// parametersRef on the GatewayClass.
	GatewayClassResolvedRefs v1.GatewayClassConditionType = "ResolvedRefs"

	// GatewayClassReasonResolvedRefs is used with the "GatewayClassResolvedRefs" condition when the condition is true.
	GatewayClassReasonResolvedRefs v1.GatewayClassConditionReason = "ResolvedRefs"

	// GatewayClassReasonParamsRefNotFound is used with the "GatewayClassResolvedRefs" condition when the
	// parametersRef resource does not exist.
	GatewayClassReasonParamsRefNotFound v1.GatewayClassConditionReason = "ParametersRefNotFound"

	// PolicyReasonNginxProxyConfigNotSet is used with the "PolicyAccepted" condition when the
	// NginxProxy resource is missing or invalid.
	PolicyReasonNginxProxyConfigNotSet v1alpha2.PolicyConditionReason = "NginxProxyConfigNotSet"

	// PolicyMessageNginxProxyInvalid is a message used with the PolicyReasonNginxProxyConfigNotSet reason
	// when the NginxProxy resource is either invalid or not attached.
	PolicyMessageNginxProxyInvalid = "The NginxProxy configuration is either invalid or not attached to the GatewayClass"

	// PolicyMessageTelemetryNotEnabled is a message used with the PolicyReasonNginxProxyConfigNotSet reason
	// when telemetry is not enabled in the NginxProxy resource.
	PolicyMessageTelemetryNotEnabled = "Telemetry is not enabled in the NginxProxy resource"

	// PolicyReasonTargetConflict is used with the "PolicyAccepted" condition when a Route that it targets
	// has an overlapping hostname:port/path combination with another Route.
	PolicyReasonTargetConflict v1alpha2.PolicyConditionReason = "TargetConflict"

	// GatewayIgnoredReason is used with v1.RouteConditionAccepted when the route references a Gateway that is ignored
	// by NGF.
	GatewayIgnoredReason v1.RouteConditionReason = "GatewayIgnored"
)

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 a Route.

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. We are allowing Accepted to still be true to prevent nullifying the entire config tree if a parametersRef is updated to something invalid.

func NewGatewayClassRefNotFound added in v1.3.0

func NewGatewayClassRefNotFound() conditions.Condition

NewGatewayClassRefNotFound returns a Condition that indicates that the parametersRef on the GatewayClass could not be resolved.

func NewGatewayClassResolvedRefs added in v1.3.0

func NewGatewayClassResolvedRefs() conditions.Condition

NewGatewayClassResolvedRefs returns a Condition that indicates that the parametersRef on the GatewayClass is resolved.

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 NewListenerHostnameConflict added in v1.4.0

func NewListenerHostnameConflict(msg string) []conditions.Condition

NewListenerHostnameConflict returns Conditions that indicate multiple Listeners are specified with the same Listener port, but are HTTPS and TLS and have overlapping hostnames.

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 NewPolicyAccepted added in v1.3.0

func NewPolicyAccepted() conditions.Condition

NewPolicyAccepted returns a Condition that indicates that the Policy is accepted.

func NewPolicyConflicted added in v1.3.0

func NewPolicyConflicted(msg string) conditions.Condition

NewPolicyConflicted returns a Condition that indicates that the Policy is not accepted because it conflicts with another Policy and a merge is not possible.

func NewPolicyInvalid added in v1.3.0

func NewPolicyInvalid(msg string) conditions.Condition

NewPolicyInvalid returns a Condition that indicates that the Policy is not accepted because it is semantically or syntactically invalid.

func NewPolicyNotAcceptedNginxProxyNotSet added in v1.3.0

func NewPolicyNotAcceptedNginxProxyNotSet(msg string) conditions.Condition

NewPolicyNotAcceptedNginxProxyNotSet returns a Condition that indicates that the Policy is not accepted because it relies in the NginxProxy configuration which is missing or invalid.

func NewPolicyNotAcceptedTargetConflict added in v1.4.0

func NewPolicyNotAcceptedTargetConflict(msg string) conditions.Condition

NewPolicyNotAcceptedTargetConflict returns a Condition that indicates that the Policy is not accepted because the target resource has a conflict with another resource when attempting to apply this policy.

func NewPolicyTargetNotFound added in v1.3.0

func NewPolicyTargetNotFound(msg string) conditions.Condition

NewPolicyTargetNotFound returns a Condition that indicates that the Policy is not accepted because the target resource does not exist or can not be attached to.

func NewRouteAccepted

func NewRouteAccepted() conditions.Condition

NewRouteAccepted returns a Condition that indicates that the Route 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 Route has been configured.

func NewRouteHostnameConflict added in v1.4.0

func NewRouteHostnameConflict() conditions.Condition

NewRouteHostnameConflict returns a Condition that indicates that the Route is not accepted because of a conflicting hostname on the same port.

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 NewRouteInvalidIPFamily added in v1.4.0

func NewRouteInvalidIPFamily(msg string) conditions.Condition

NewRouteInvalidIPFamily returns a Condition that indicates that the Service associated with the Route is not configured with the same IP family as the NGINX server.

func NewRouteInvalidListener

func NewRouteInvalidListener() conditions.Condition

NewRouteInvalidListener returns a Condition that indicates that the Route 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 Route.

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 NewRouteNotAcceptedGatewayIgnored added in v1.4.0

func NewRouteNotAcceptedGatewayIgnored() conditions.Condition

NewRouteNotAcceptedGatewayIgnored returns a Condition that indicates that the Route is not accepted by the Gateway because the Gateway is ignored by NGF.

func NewRouteNotAllowedByListeners

func NewRouteNotAllowedByListeners() conditions.Condition

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

func NewRoutePartiallyInvalid

func NewRoutePartiallyInvalid(msg string) conditions.Condition

NewRoutePartiallyInvalid returns a Condition that indicates that the Route 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 NewRouteUnsupportedConfiguration added in v1.3.0

func NewRouteUnsupportedConfiguration(msg string) conditions.Condition

NewRouteUnsupportedConfiguration returns a Condition that indicates that the Route is not Accepted because it is incompatible with the Gateway's configuration.

func NewRouteUnsupportedValue

func NewRouteUnsupportedValue(msg string) conditions.Condition

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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