Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ACPHandler ¶
type ACPHandler struct {
// contains filtered or unexported fields
}
ACPHandler is an HTTP handler that can be used as a Kubernetes Mutating Admission Controller.
func NewACPHandler ¶
func NewACPHandler(backend Backend) *ACPHandler
NewACPHandler returns a new Handler.
func (ACPHandler) ServeHTTP ¶
func (h ACPHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request)
ServeHTTP implements http.Handler.
type Backend ¶
type Backend interface { CreateACP(ctx context.Context, policy *hubv1alpha1.AccessControlPolicy) (*acp.ACP, error) UpdateACP(ctx context.Context, oldVersion string, policy *hubv1alpha1.AccessControlPolicy) (*acp.ACP, error) DeleteACP(ctx context.Context, oldVersion, name string) error }
Backend manages ACPs.
type EventHandler ¶
type EventHandler struct {
// contains filtered or unexported fields
}
EventHandler watches ACP resources and calls its set Updatable when they are modified.
func NewEventHandler ¶
func NewEventHandler(listener Updatable) *EventHandler
NewEventHandler returns a new event handler meant to listen for ACP changes. It calls the given Updatable when an ACP is modified.
func (*EventHandler) OnAdd ¶
func (w *EventHandler) OnAdd(obj interface{})
OnAdd implements Kubernetes cache.ResourceEventHandler so it can be used as an informer event handler.
func (*EventHandler) OnDelete ¶
func (w *EventHandler) OnDelete(obj interface{})
OnDelete implements Kubernetes cache.ResourceEventHandler so it can be used as an informer event handler.
func (*EventHandler) OnUpdate ¶
func (w *EventHandler) OnUpdate(oldObj, newObj interface{})
OnUpdate implements Kubernetes cache.ResourceEventHandler so it can be used as an informer event handler.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is an HTTP handler that can be used as a Kubernetes Mutating Admission Controller.
func NewHandler ¶
NewHandler returns a new Handler that reviews incoming requests using the given reviewers.
type IngressUpdater ¶
type IngressUpdater struct {
// contains filtered or unexported fields
}
IngressUpdater handles ingress updates when ACP configurations are modified.
func NewIngressUpdater ¶
func NewIngressUpdater(informer informers.SharedInformerFactory, clientSet clientset.Interface, kubeVersion string) *IngressUpdater
NewIngressUpdater return a new IngressUpdater.
func (*IngressUpdater) Run ¶
func (u *IngressUpdater) Run(ctx context.Context)
Run runs the IngressUpdater control loop, updating ingress resources when needed.
func (*IngressUpdater) Update ¶
func (u *IngressUpdater) Update(polName string)
Update notifies the IngressUpdater control loop that it should update ingresses referencing the given ACP if they had a header-related configuration change.