Documentation ¶
Index ¶
- Constants
- func CRDExists(restMapper meta.RESTMapper, gvr schema.GroupVersionResource) bool
- func EnsureProgrammedCondition(configurationStatus object.ConfigurationStatus, objectGeneration int64, ...) (updatedConditions []metav1.Condition, updateNeeded bool)
- func GeneratePredicateFuncsForIngressClassFilter(name string) predicate.Funcs
- func IsDefaultIngressClass(obj client.Object) bool
- func IsIngressClassEmpty(obj client.Object) bool
- func MatchesIngressClass(obj client.Object, controllerIngressClass string, isDefault bool) bool
- func UpdateLoadBalancerIngress(ingress client.Object, newAddresses []netv1.IngressLoadBalancerIngress) (updateNeeded bool, err error)
- type ProgrammedConditionOption
Constants ¶
const ( // ProgrammedConditionTrueMessage is the message for the programmed condition when it is True. ProgrammedConditionTrueMessage = "Object was successfully configured in Kong." // ProgrammedConditionFalseInvalidMessage is the message for the programmed condition when it is False with reason Invalid. ProgrammedConditionFalseInvalidMessage = "Object failed to be configured in Kong - see its attached Events for more information." // ProgrammedConditionFalsePendingMessage is the message for the programmed condition when it is False with reason Pending. ProgrammedConditionFalsePendingMessage = "Object is pending configuration in Kong." )
Variables ¶
This section is empty.
Functions ¶
func CRDExists ¶
func CRDExists(restMapper meta.RESTMapper, gvr schema.GroupVersionResource) bool
CRDExists returns false if CRD does not exist.
func EnsureProgrammedCondition ¶
func EnsureProgrammedCondition( configurationStatus object.ConfigurationStatus, objectGeneration int64, conditions []metav1.Condition, options ...ProgrammedConditionOption, ) ( updatedConditions []metav1.Condition, updateNeeded bool, )
EnsureProgrammedCondition ensures that the programmed condition is present in the conditions slice with the status reflecting the current configuration status of the object. If the condition is already present with the correct status, the conditions slice is returned unmodified and false is returned as the second return value. If the condition is not present or has the wrong status, the conditions slice is returned with the condition updated and true is returned.
func GeneratePredicateFuncsForIngressClassFilter ¶
GeneratePredicateFuncsForIngressClassFilter builds a controller-runtime reconciliation predicate function which filters out objects which have their ingress class set to the a value other than the controller class.
func IsDefaultIngressClass ¶
IsDefaultIngressClass returns whether an IngressClass is the default IngressClass.
func IsIngressClassEmpty ¶
IsIngressClassEmpty returns true if an object has no ingress class information or false otherwise.
func MatchesIngressClass ¶
MatchesIngressClass indicates whether or not an object belongs to a given ingress class.
func UpdateLoadBalancerIngress ¶
func UpdateLoadBalancerIngress( ingress client.Object, newAddresses []netv1.IngressLoadBalancerIngress, ) (updateNeeded bool, err error)
UpdateLoadBalancerIngress updates any supported Ingress object with new []netv1.IngressLoadBalancerIngress in a backward-compatible fashion if needed. Update does not happen in case there are no changes detected.
Types ¶
type ProgrammedConditionOption ¶ added in v3.1.0
type ProgrammedConditionOption func(object.ConfigurationStatus, *metav1.Condition)
func WithUnknownMessage ¶ added in v3.1.0
func WithUnknownMessage(message string) ProgrammedConditionOption
WithUnknownMessage sets the message of the desired Programmed condition to the given message if the configuration status is Unknown.