ingress

package
v0.0.0-...-a36a61a Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: MIT Imports: 42 Imported by: 0

Documentation

Overview

MIT License

Copyright (c) 2024 ngrok, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Index

Constants

View Source
const (
	IPPolicyRuleActionAllow = "allow"
	IPPolicyRuleActionDeny  = "deny"
)
View Source
const (
	OwnerReferencePath     = "metadata.ownerReferences.uid"
	ModuleSetPath          = "metadata.annotations.k8s.ngrok.com/module-set"
	TrafficPolicyPath      = "metadata.annotations.k8s.ngrok.com/traffic-policy"
	NgrokLoadBalancerClass = "ngrok"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DomainReconciler

type DomainReconciler struct {
	client.Client

	Log           logr.Logger
	Scheme        *runtime.Scheme
	Recorder      record.EventRecorder
	DomainsClient *reserved_domains.Client
	// contains filtered or unexported fields
}

DomainReconciler reconciles a Domain object

func (*DomainReconciler) Reconcile

func (r *DomainReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.13.1/pkg/reconcile

func (*DomainReconciler) SetupWithManager

func (r *DomainReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type HTTPSEdgeReconciler

type HTTPSEdgeReconciler struct {
	client.Client

	Log      logr.Logger
	Scheme   *runtime.Scheme
	Recorder record.EventRecorder

	NgrokClientset ngrokapi.Clientset
	// contains filtered or unexported fields
}

HTTPSEdgeReconciler reconciles a HTTPSEdge object

func (*HTTPSEdgeReconciler) Reconcile

func (r *HTTPSEdgeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.13.1/pkg/reconcile

func (*HTTPSEdgeReconciler) SetupWithManager

func (r *HTTPSEdgeReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type IPPolicyDiff

type IPPolicyDiff struct {
	// contains filtered or unexported fields
}

IPPolicyDiff represents the diff between the remote and spec rules for an IPPolicy. From the ngrok docs:

"IP Restrictions allow you to attach one or more IP policies to the route.
 If multiple IP policies are attached, a connection will be allowed only if
 its source IP matches at least one policy with an 'allow' action and
 does not match any policy with a 'deny' action."

This provides an iterator of the rules that need to be created,updated, and deleted in order to update the remote securely.

func (*IPPolicyDiff) NeedsCreate

func (d *IPPolicyDiff) NeedsCreate() []*ngrok.IPPolicyRuleCreate

func (*IPPolicyDiff) NeedsDelete

func (d *IPPolicyDiff) NeedsDelete() []*ngrok.IPPolicyRule

func (*IPPolicyDiff) NeedsUpdate

func (d *IPPolicyDiff) NeedsUpdate() []*ngrok.IPPolicyRuleUpdate

func (*IPPolicyDiff) Next

func (d *IPPolicyDiff) Next() bool

type IPPolicyReconciler

type IPPolicyReconciler struct {
	client.Client

	Log      logr.Logger
	Scheme   *runtime.Scheme
	Recorder record.EventRecorder

	IPPoliciesClient    *ip_policies.Client
	IPPolicyRulesClient *ip_policy_rules.Client
	// contains filtered or unexported fields
}

IPPolicyReconciler reconciles a IPPolicy object

func (*IPPolicyReconciler) Reconcile

func (r *IPPolicyReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.14.1/pkg/reconcile

func (*IPPolicyReconciler) SetupWithManager

func (r *IPPolicyReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type IngressReconciler

type IngressReconciler struct {
	client.Client
	Log                  logr.Logger
	Scheme               *runtime.Scheme
	Recorder             record.EventRecorder
	Namespace            string
	AnnotationsExtractor annotations.Extractor
	Driver               *store.Driver
}

This implements the Reconciler for the controller-runtime https://pkg.go.dev/sigs.k8s.io/controller-runtime#section-readme

func (*IngressReconciler) Reconcile

func (r *IngressReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

This reconcile function is called by the controller-runtime manager. It is invoked whenever there is an event that occurs for a resource being watched (in our case, ingress objects). If you tail the controller logs and delete, update, edit ingress objects, you see the events come in.

func (*IngressReconciler) SetupWithManager

func (r *IngressReconciler) SetupWithManager(mgr ctrl.Manager) error

type ModuleSetReconciler

type ModuleSetReconciler struct {
	client.Client

	Log      logr.Logger
	Scheme   *runtime.Scheme
	Recorder record.EventRecorder
	Driver   *store.Driver
}

func (*ModuleSetReconciler) Reconcile

func (r *ModuleSetReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

This reconcile function is called by the controller-runtime manager. It is invoked whenever there is an event that occurs for a resource being watched (in our case, NgrokModuleSets). If you tail the controller logs and delete, update, edit ngrokmoduleset objects, you see the events come in.

func (*ModuleSetReconciler) SetupWithManager

func (r *ModuleSetReconciler) SetupWithManager(mgr ctrl.Manager) error

type OAuthProvider

type OAuthProvider interface {
	ClientSecretKeyRef() *ingressv1alpha1.SecretKeyRef
	// Provided returns true if configuration was supplied for the provider
	Provided() bool
	ToNgrok(*string) *ngrok.EndpointOAuth
}

type ReservedAddrMetadata

type ReservedAddrMetadata struct {
	Namespace string                 `json:"namespace"`
	Name      string                 `json:"name"`
	OwnerRef  *metav1.OwnerReference `json:"ownerRef,omitempty"`
}

func (ReservedAddrMetadata) Matches

Matches returns true if the metadata is a match for the other metadata

type ServiceReconciler

type ServiceReconciler struct {
	client.Client
	Log       logr.Logger
	Scheme    *runtime.Scheme
	Recorder  record.EventRecorder
	Namespace string
	Driver    *store.Driver
}

func (*ServiceReconciler) Reconcile

func (r *ServiceReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

This reconcile function is called by the controller-runtime manager. It is invoked whenever there is an event that occurs for a resource being watched (in our case, service objects). If you tail the controller logs and delete, update, edit service objects, you see the events come in.

func (*ServiceReconciler) SetupWithManager

func (r *ServiceReconciler) SetupWithManager(mgr ctrl.Manager) error

type TCPEdgeReconciler

type TCPEdgeReconciler struct {
	client.Client

	Log      logr.Logger
	Scheme   *runtime.Scheme
	Recorder record.EventRecorder

	controller.IpPolicyResolver

	NgrokClientset ngrokapi.Clientset
	// contains filtered or unexported fields
}

TCPEdgeReconciler reconciles a TCPEdge object

func (*TCPEdgeReconciler) Reconcile

func (r *TCPEdgeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.13.1/pkg/reconcile

func (*TCPEdgeReconciler) SetupWithManager

func (r *TCPEdgeReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type TLSEdgeReconciler

type TLSEdgeReconciler struct {
	client.Client

	Log      logr.Logger
	Scheme   *runtime.Scheme
	Recorder record.EventRecorder

	controller.IpPolicyResolver

	NgrokClientset ngrokapi.Clientset
	// contains filtered or unexported fields
}

TLSEdgeReconciler reconciles a TLSEdge object

func (*TLSEdgeReconciler) Reconcile

func (r *TLSEdgeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.13.1/pkg/reconcile

func (*TLSEdgeReconciler) SetupWithManager

func (r *TLSEdgeReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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