Documentation ¶
Index ¶
- func CRDExists(client client.Client, gvr schema.GroupVersionResource) bool
- func EnsureProxyDeleteObject(proxy proxy.Proxy, obj client.Object) (ctrl.Result, error)
- func GeneratePredicateFuncsForIngressClassFilter(name string, specCheckEnabled, annotationCheckEnabled bool) predicate.Funcs
- func HasAnnotation(obj client.Object, key, expectedValue string) bool
- func InSlice(e string, arr []string) bool
- func IsIngressClassAnnotationConfigured(obj client.Object, expectedIngressClassName string) bool
- func IsIngressClassSpecConfigured(obj client.Object, expectedIngressClassName string) bool
- func MatchesIngressClassName(obj client.Object, ingressClassName string) bool
- func SliceToStatus(endpoints []string) []apiv1.LoadBalancerIngress
- func UpdateIngress(ctx context.Context, log logr.Logger, route *file.FRoute, ...) error
- func UpdateIngressLegacy(ctx context.Context, log logr.Logger, route *file.FRoute, ...) error
- func UpdateKnativeIngress(ctx context.Context, log logr.Logger, svc file.FService, kubeCfg *rest.Config, ...) error
- func UpdateStatuses(ctx context.Context, targetContent *file.Content, log logr.Logger, ...) error
- func UpdateTCPIngress(ctx context.Context, log logr.Logger, svc file.FService, ...) error
- func UpdateUDPIngress(ctx context.Context, log logr.Logger, svc file.FService, ...) error
- type StatusUpdater
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CRDExists ¶
func CRDExists(client client.Client, gvr schema.GroupVersionResource) bool
CRDExists returns false if CRD does not exist
func EnsureProxyDeleteObject ¶ added in v2.1.0
EnsureProxyDeleteObject is a reconciliation helper to ensure that an object is removed from the backend proxy cache so that it gets removed from data-plane configurations.
func GeneratePredicateFuncsForIngressClassFilter ¶
func GeneratePredicateFuncsForIngressClassFilter(name string, specCheckEnabled, annotationCheckEnabled bool) predicate.Funcs
GeneratePredicateFuncsForIngressClassFilter builds a controller-runtime reconciliation predicate function which filters out objects which do not have the "kubernetes.io/ingress.class" annotation configured and set to the provided value or in their .spec.
func HasAnnotation ¶
HasAnnotation is a helper function to determine whether an object has a given annotation, and whether it's to the value provided.
func IsIngressClassAnnotationConfigured ¶
IsIngressClassAnnotationConfigured determines whether an object has an ingress.class annotation configured that matches the provide IngressClassName (and is therefore an object configured to be reconciled by that class).
NOTE: keep in mind that the ingress.class annotation is deprecated and will be removed in a future release
of Kubernetes in favor of the .spec based implementation.
func IsIngressClassSpecConfigured ¶
IsIngressClassAnnotationConfigured determines whether an object has IngressClassName field in its spec and whether the value matches the provide IngressClassName (and is therefore an object configured to be reconciled by that class).
func MatchesIngressClassName ¶
MatchesIngressClassName indicates whether or not an object indicates that it's supported by the ingress class name provided.
func SliceToStatus ¶
func SliceToStatus(endpoints []string) []apiv1.LoadBalancerIngress
SliceToStatus converts a slice of IP and/or hostnames to LoadBalancerIngress
func UpdateIngress ¶
func UpdateIngress( ctx context.Context, log logr.Logger, route *file.FRoute, client *clientset.Clientset, ips []string, ) error
UpdateIngress networking v1 ingress status
func UpdateIngressLegacy ¶
func UpdateIngressLegacy( ctx context.Context, log logr.Logger, route *file.FRoute, client *clientset.Clientset, ips []string, ) error
UpdateIngressLegacy networking v1beta1 ingress status TODO: this can be removed once we no longer support old kubernetes < v1.19
func UpdateKnativeIngress ¶
func UpdateKnativeIngress(ctx context.Context, log logr.Logger, svc file.FService, kubeCfg *rest.Config, ips []string, hostname string) error
UpdateKnativeIngress update knative ingress status
func UpdateStatuses ¶
func UpdateStatuses( ctx context.Context, targetContent *file.Content, log logr.Logger, client *clientset.Clientset, kicClient *kicclientset.Clientset, wg *sync.WaitGroup, ips []string, hostname string, kubeConfig *rest.Config, kubernetesVersion semver.Version, ) error
UpdateStatuses update resources statuses according to generated rules and specs
Types ¶
type StatusUpdater ¶ added in v2.1.0
type StatusUpdater struct {
// contains filtered or unexported fields
}
StatusUpdater updates Kubernetes resources' status based on applied Kong configuration
func NewStatusUpdater ¶ added in v2.1.0
func NewStatusUpdater(kongConfig sendconfig.Kong, log logr.Logger, kubeConfig *rest.Config, publishService string, publishAddresses []string) *StatusUpdater
NewStatusUpdater returns a StatusUpdater with the provided fields
func (*StatusUpdater) NeedLeaderElection ¶ added in v2.1.0
func (s *StatusUpdater) NeedLeaderElection() bool
NeedLeaderElection indicates if the StatusUpdater must only be run by leader controllers
func (*StatusUpdater) PullConfigUpdate ¶ added in v2.1.0
func (s *StatusUpdater) PullConfigUpdate( ctx context.Context, )
PullConfigUpdate is a dedicated function that process ingress/customer resource status update after configuration is updated within kong.