Documentation ¶
Index ¶
- Constants
- func Error2ConditionMsg(err error) string
- func MergeConditions(conditions []metav1.Condition, updates ...metav1.Condition) []metav1.Condition
- func SetAcceptedForPolicyAncestors(policyStatus *gwv1a2.PolicyStatus, ancestorRefs []gwv1a2.ParentReference, ...)
- func SetBackendTLSPolicyCondition(c *gwv1a2.BackendTLSPolicy, policyAnces gwv1a2.PolicyAncestorStatus, ...)
- func SetConditionForPolicyAncestor(policyStatus *gwv1a2.PolicyStatus, ancestorRef gwv1a2.ParentReference, ...)
- func SetConditionForPolicyAncestors(policyStatus *gwv1a2.PolicyStatus, ancestorRefs []gwv1a2.ParentReference, ...)
- func SetEnvoyPatchPolicyCondition(e *egv1a1.EnvoyPatchPolicy, conditionType gwv1a2.PolicyConditionType, ...)
- func SetEnvoyPatchPolicyInvalid(s *egv1a1.EnvoyPatchPolicyStatus, message string)
- func SetEnvoyPatchPolicyProgrammedIfUnset(s *egv1a1.EnvoyPatchPolicyStatus, message string)
- func SetEnvoyPatchPolicyResourceNotFound(s *egv1a1.EnvoyPatchPolicyStatus, message string)
- func SetGatewayClassAccepted(gc *gwapiv1.GatewayClass, accepted bool, reason, msg string) *gwapiv1.GatewayClass
- func SetResolveErrorForPolicyAncestors(policyStatus *gwv1a2.PolicyStatus, ancestorRefs []gwv1a2.ParentReference, ...)
- func SetTranslationErrorForPolicyAncestors(policyStatus *gwv1a2.PolicyStatus, ancestorRefs []gwv1a2.ParentReference, ...)
- func UpdateGatewayStatusAcceptedCondition(gw *gwapiv1.Gateway, accepted bool) *gwapiv1.Gateway
- func UpdateGatewayStatusProgrammedCondition(gw *gwapiv1.Gateway, svc *corev1.Service, deployment *appsv1.Deployment, ...)
- type Mutator
- type MutatorFunc
- type PolicyResolveError
- type Update
- type UpdateHandler
- type UpdateWriter
- type Updater
Constants ¶
const ( ReasonOlderGatewayClassExists gwapiv1.GatewayClassConditionReason = "OlderGatewayClassExists" MsgOlderGatewayClassExists = "Invalid GatewayClass: another older GatewayClass with the same Spec.Controller exists" MsgValidGatewayClass = "Valid GatewayClass" MsgGatewayClassInvalidParams = "Invalid parametersRef" )
Variables ¶
This section is empty.
Functions ¶
func Error2ConditionMsg ¶ added in v1.0.0
Error2ConditionMsg format the error string to a Status condition message. * Convert the first letter to capital * Append "." to the string if it doesn't exit
func MergeConditions ¶
MergeConditions adds or updates matching conditions, and updates the transition time if details of a condition have changed. Returns the updated condition array.
func SetAcceptedForPolicyAncestors ¶ added in v1.0.0
func SetAcceptedForPolicyAncestors(policyStatus *gwv1a2.PolicyStatus, ancestorRefs []gwv1a2.ParentReference, controllerName string)
func SetBackendTLSPolicyCondition ¶ added in v1.0.0
func SetBackendTLSPolicyCondition(c *gwv1a2.BackendTLSPolicy, policyAnces gwv1a2.PolicyAncestorStatus, conditionType gwv1a2.PolicyConditionType, status metav1.ConditionStatus, reason gwv1a2.PolicyConditionReason, message string)
func SetConditionForPolicyAncestor ¶ added in v1.0.0
func SetConditionForPolicyAncestor(policyStatus *gwv1a2.PolicyStatus, ancestorRef gwv1a2.ParentReference, controllerName string, conditionType gwv1a2.PolicyConditionType, status metav1.ConditionStatus, reason gwv1a2.PolicyConditionReason, message string, generation int64)
func SetConditionForPolicyAncestors ¶ added in v1.0.0
func SetConditionForPolicyAncestors(policyStatus *gwv1a2.PolicyStatus, ancestorRefs []gwv1a2.ParentReference, controllerName string, conditionType gwv1a2.PolicyConditionType, status metav1.ConditionStatus, reason gwv1a2.PolicyConditionReason, message string, generation int64)
func SetEnvoyPatchPolicyCondition ¶ added in v0.5.0
func SetEnvoyPatchPolicyCondition(e *egv1a1.EnvoyPatchPolicy, conditionType gwv1a2.PolicyConditionType, status metav1.ConditionStatus, reason gwv1a2.PolicyConditionReason, message string)
func SetEnvoyPatchPolicyInvalid ¶ added in v0.5.0
func SetEnvoyPatchPolicyInvalid(s *egv1a1.EnvoyPatchPolicyStatus, message string)
func SetEnvoyPatchPolicyProgrammedIfUnset ¶ added in v0.5.0
func SetEnvoyPatchPolicyProgrammedIfUnset(s *egv1a1.EnvoyPatchPolicyStatus, message string)
func SetEnvoyPatchPolicyResourceNotFound ¶ added in v0.5.0
func SetEnvoyPatchPolicyResourceNotFound(s *egv1a1.EnvoyPatchPolicyStatus, message string)
func SetGatewayClassAccepted ¶
func SetGatewayClassAccepted(gc *gwapiv1.GatewayClass, accepted bool, reason, msg string) *gwapiv1.GatewayClass
SetGatewayClassAccepted inserts or updates the Accepted condition for the provided GatewayClass.
func SetResolveErrorForPolicyAncestors ¶ added in v1.0.0
func SetResolveErrorForPolicyAncestors(policyStatus *gwv1a2.PolicyStatus, ancestorRefs []gwv1a2.ParentReference, controllerName string, generation int64, resolveErr *PolicyResolveError)
func SetTranslationErrorForPolicyAncestors ¶ added in v1.0.0
func SetTranslationErrorForPolicyAncestors(policyStatus *gwv1a2.PolicyStatus, ancestorRefs []gwv1a2.ParentReference, controllerName string, generation int64, errMsg string)
func UpdateGatewayStatusAcceptedCondition ¶ added in v0.4.0
UpdateGatewayStatusAcceptedCondition updates the status condition for the provided Gateway based on the accepted state.
func UpdateGatewayStatusProgrammedCondition ¶ added in v0.4.0
func UpdateGatewayStatusProgrammedCondition(gw *gwapiv1.Gateway, svc *corev1.Service, deployment *appsv1.Deployment, nodeAddresses ...string)
UpdateGatewayStatusProgrammedCondition updates the status addresses for the provided gateway based on the status IP/Hostname of svc and updates the Programmed condition based on the service and deployment state.
Types ¶
type MutatorFunc ¶
MutatorFunc is a function adaptor for Mutators.
type PolicyResolveError ¶ added in v1.0.0
type PolicyResolveError struct { Reason gwv1a2.PolicyConditionReason Message string // contains filtered or unexported fields }
type Update ¶
type Update struct { NamespacedName types.NamespacedName Resource client.Object Mutator Mutator }
Update contains an all the information needed to update an object's status. Send down a channel to the goroutine that actually writes the changes back.
type UpdateHandler ¶
type UpdateHandler struct {
// contains filtered or unexported fields
}
UpdateHandler holds the details required to actually write an Update back to the referenced object.
func NewUpdateHandler ¶
func NewUpdateHandler(log logr.Logger, client client.Client) *UpdateHandler
func (*UpdateHandler) NeedLeaderElection ¶
func (u *UpdateHandler) NeedLeaderElection() bool
func (*UpdateHandler) Start ¶
func (u *UpdateHandler) Start(ctx context.Context) error
Start runs the goroutine to perform status writes.
func (*UpdateHandler) Writer ¶
func (u *UpdateHandler) Writer() Updater
Writer retrieves the interface that should be used to write to the UpdateHandler.
type UpdateWriter ¶
type UpdateWriter struct {
// contains filtered or unexported fields
}
UpdateWriter takes status updates and sends these to the UpdateHandler via a channel.
func (*UpdateWriter) Send ¶
func (u *UpdateWriter) Send(update Update)
Send sends the given Update off to the update channel for writing by the UpdateHandler.