controller

package
v0.0.0-...-5089687 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2025 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvNode         = "PONA_NODE_NAME"
	EnvAddresses    = "PONA_POD_ADDRESSES"
	EnvPodNamespace = "PONA_POD_NAMESPACE"
	EnvPodName      = "PONA_POD_NAME"
	EnvEgressName   = "PONA_EGRESS_NAME"
)

TODO: Change this

Variables

This section is empty.

Functions

This section is empty.

Types

type EgressReconciler

type EgressReconciler struct {
	client.Client
	Scheme *runtime.Scheme

	Port         int32
	DefaultImage string
}

EgressReconciler reconciles a Egress object

func (*EgressReconciler) Reconcile

func (r *EgressReconciler) 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. TODO(user): Modify the Reconcile function to compare the state specified by the Egress object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

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

func (*EgressReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type PodWatcher

type PodWatcher struct {
	client.Client
	Scheme *runtime.Scheme

	EgressName      string
	EgressNamespace string
	// contains filtered or unexported fields
}

PodWatcher reconciles a Pod object

func NewPodWatcher

func NewPodWatcher(client client.Client, scheme *runtime.Scheme, egressName, egressNamespace string, t tunnel.Controller, n nat.Gateway) *PodWatcher

func (*PodWatcher) Reconcile

func (r *PodWatcher) 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. TODO(user): Modify the Reconcile function to compare the state specified by the Pod object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

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

func (*PodWatcher) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type Set

type Set[T comparable] map[T]struct{}

Jump to

Keyboard shortcuts

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