kubeovnplunger

package
v0.40.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecOptions

type ExecOptions struct {
	Namespace string
	Pod       string
	Container string
	Command   []string      // e.g. []string{"sh", "-c", "echo hi"}
	Stdin     io.Reader     // optional
	TTY       bool          // if true, stderr is merged into stdout
	Timeout   time.Duration // optional overall timeout
}

type ExecResult

type ExecResult struct {
	Stdout   string
	Stderr   string
	ExitCode *int // nil if not determinable
}

type KubeOVNPlunger

type KubeOVNPlunger struct {
	client.Client
	Scheme    *runtime.Scheme
	ClientSet kubernetes.Interface
	REST      *rest.Config
	Registry  prometheus.Registerer
	// contains filtered or unexported fields
}

KubeOVNPlunger watches the ovn-central cluster members

func (*KubeOVNPlunger) ExecPod

func (r *KubeOVNPlunger) ExecPod(ctx context.Context, opts ExecOptions) (*ExecResult, error)

ExecPod runs a command in a pod and returns stdout/stderr/exit code.

func (*KubeOVNPlunger) Reconcile

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

Reconcile runs the checks on the ovn-central members to see if their views of the cluster are consistent

func (*KubeOVNPlunger) SetupWithManager

func (r *KubeOVNPlunger) SetupWithManager(mgr ctrl.Manager, kubeOVNNamespace, appName string) error

SetupWithManager attaches a generic ticker to trigger a reconcile every <interval> seconds

func (*KubeOVNPlunger) WriteClusterMetrics

func (r *KubeOVNPlunger) WriteClusterMetrics(db string, snaps []ovnstatus.HealthSnapshot, ecv ovnstatus.ExtendedConsensusResult, expectedReplicas int)

func (*KubeOVNPlunger) WriteMemberMetrics

func (r *KubeOVNPlunger) WriteMemberMetrics(db string, snaps []ovnstatus.HealthSnapshot, views []ovnstatus.MemberView, ecv ovnstatus.ExtendedConsensusResult)

Jump to

Keyboard shortcuts

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