probes

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package probes holds the Kubernetes-specific leaf probe(s) that cannot live in the lightweight pkg/daemonkit because they pull in k8s.io/client-go. The generic, dependency-light probes (disk, composite, tagged) live in pkg/daemonkit and satisfy daemonkit.Probe, so they compose freely with KubeRBACProbe inside a daemonkit.CompositeProbe.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KubeRBACProbe

type KubeRBACProbe struct {
	// KubeconfigPath is the path to the scoped kubeconfig for this check.
	KubeconfigPath string

	// Namespace is the Kubernetes namespace to check permissions in.
	Namespace string

	// Group is the API group (e.g. "hedera.com"). Use "" for core resources.
	Group string

	// Resource is the plural resource name (e.g. "networkupgradeexecutes").
	Resource string

	// Verbs are the access verbs to verify (e.g. ["list", "watch"]).
	Verbs []string
}

KubeRBACProbe verifies that the daemon's ServiceAccount has the specified verbs on a single Kubernetes group/resource in the given namespace. It retries every kubeRBACRetryInterval until all verbs are allowed or ctx is cancelled.

One KubeRBACProbe covers one resource. If a monitor requires access to multiple resources, compose multiple KubeRBACProbe instances inside a daemon.CompositeProbe returned from RequiredProbe().

func (*KubeRBACProbe) Probe

func (p *KubeRBACProbe) Probe(ctx context.Context) error

Probe implements daemon.Probe. Retries every kubeRBACRetryInterval until all verbs are allowed or ctx is cancelled. Returns ctx.Err() on cancellation.

Jump to

Keyboard shortcuts

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