conditions

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// GatewayClassReasonGatewayClassConflict indicates there are multiple GatewayClass resources
	// that reference this controller, and we ignored the resource in question and picked the
	// GatewayClass that is referenced in the command-line argument.
	// This reason is used with GatewayClassConditionAccepted (false).
	GatewayClassReasonGatewayClassConflict v1.GatewayClassConditionReason = "GatewayClassConflict"

	// GatewayClassMessageGatewayClassConflict is a message that describes GatewayClassReasonGatewayClassConflict.
	GatewayClassMessageGatewayClassConflict = "The resource is ignored due to a conflicting GatewayClass resource"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Condition

type Condition struct {
	Type    string
	Status  metav1.ConditionStatus
	Reason  string
	Message string
}

Condition defines a condition to be reported in the status of resources.

func DeduplicateConditions added in v1.1.0

func DeduplicateConditions(conds []Condition) []Condition

DeduplicateConditions removes duplicate conditions based on the condition type. The last condition wins. The order of conditions is preserved.

func NewDefaultGatewayClassConditions

func NewDefaultGatewayClassConditions() []Condition

NewDefaultGatewayClassConditions returns Conditions that indicate that the GatewayClass is accepted and that the Gateway API CRD versions are supported.

func NewGatewayClassConflict

func NewGatewayClassConflict() Condition

NewGatewayClassConflict returns a Condition that indicates that the GatewayClass is not accepted due to a conflict with another GatewayClass.

func NewGatewayClassSupportedVersionBestEffort added in v1.1.0

func NewGatewayClassSupportedVersionBestEffort(recommendedVersion string) []Condition

NewGatewayClassSupportedVersionBestEffort returns a Condition that indicates that the GatewayClass is accepted, but the Gateway API CRD versions are not supported. This means NGF will attempt to generate configuration, but it does not guarantee support.

func NewGatewayClassUnsupportedVersion added in v1.1.0

func NewGatewayClassUnsupportedVersion(recommendedVersion string) []Condition

NewGatewayClassUnsupportedVersion returns Conditions that indicate that the GatewayClass is not accepted because the Gateway API CRD versions are not supported. NGF will not generate configuration in this case.

Jump to

Keyboard shortcuts

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