controller

package
v0.0.0-...-cb246e9 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: Apache-2.0 Imports: 50 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClawResourceKind = "Claw"

	GatewayTokenKeyName         = "token"
	ClawProxyContainerName      = "proxy"
	ClawGatewayContainerName    = "gateway"
	ClawInitConfigContainerName = "init-config"
	ClawConfigModeEnvVar        = "CLAW_CONFIG_MODE"
	DefaultKubectlImage         = "quay.io/openshift/origin-cli:4.21"

	// Kubernetes resource kinds
	RouteKind                 = "Route"
	DeploymentKind            = "Deployment"
	ConfigMapKind             = "ConfigMap"
	NetworkPolicyKind         = "NetworkPolicy"
	ServiceKind               = "Service"
	PersistentVolumeClaimKind = "PersistentVolumeClaim"
	ClusterRoleKind           = "ClusterRole"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClawDevicePairingRequestReconciler

type ClawDevicePairingRequestReconciler struct {
	client.Client
	Scheme    *runtime.Scheme
	Config    *rest.Config
	Clientset kubernetes.Interface
	ExecFn    PodExecFunc
}

ClawDevicePairingRequestReconciler reconciles a ClawDevicePairingRequest object

func (*ClawDevicePairingRequestReconciler) Reconcile

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

func (*ClawDevicePairingRequestReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type ClawResourceReconciler

type ClawResourceReconciler struct {
	client.Client
	Scheme          *runtime.Scheme
	ProxyImage      string
	KubectlImage    string
	ImagePullPolicy string
}

ClawResourceReconciler reconciles all resources for Claw

func (*ClawResourceReconciler) Reconcile

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

Reconcile manages the complete lifecycle of resources for Claw instances

func (*ClawResourceReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type ExecCommandError

type ExecCommandError struct {
	Err error
}

ExecCommandError indicates the exec command ran but failed (e.g., non-zero exit), as opposed to a transport/infrastructure error that should be retried.

func (*ExecCommandError) Error

func (e *ExecCommandError) Error() string

func (*ExecCommandError) Unwrap

func (e *ExecCommandError) Unwrap() error

type PodExecFunc

type PodExecFunc func(ctx context.Context, podName, namespace, requestID string) (stdout string, stderr string, err error)

PodExecFunc executes a command in a pod and returns stdout, stderr, and error.

Jump to

Keyboard shortcuts

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