k8s

package
v1.8.0 Latest Latest
Warning

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

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

Documentation

Overview

Package k8s provides functionality for Vald.

Package k8s provides kubernetes control functionality

Package k8s provides kubernetes control functionality

Package k8s provides kubernetes control functionality

Index

Constants

View Source
const (
	ApplyPatchType              = types.ApplyPatchType
	DeletePropagationBackground = metav1.DeletePropagationBackground
	SelectionOpEquals           = selection.Equals
	SelectionOpExists           = selection.Exists
	PodIndexLabel               = appsv1.PodIndexLabel
	PodRunning                  = corev1.PodRunning
	PodPending                  = corev1.PodPending
	ResourceCPU                 = corev1.ResourceCPU
	ResourceMemory              = corev1.ResourceMemory
	NodeInternalIP              = corev1.NodeInternalIP
	NodeInternalDNS             = corev1.NodeInternalDNS
	NodeExternalIP              = corev1.NodeExternalIP
	NodeExternalDNS             = corev1.NodeExternalDNS
	NodeHostName                = corev1.NodeHostName

	// condition status constants.
	ConditionTrue    = metav1.ConditionTrue
	ConditionFalse   = metav1.ConditionFalse
	ConditionUnknown = metav1.ConditionUnknown

	// toleration constants.
	TolerationOpEqual     = corev1.TolerationOpEqual
	TaintEffectNoSchedule = corev1.TaintEffectNoSchedule

	// service type constants.
	ServiceTypeClusterIP    = corev1.ServiceTypeClusterIP
	ServiceTypeLoadBalancer = corev1.ServiceTypeLoadBalancer

	// path type constants.
	PathTypeExact                  = networkingv1.PathTypeExact
	PathTypeImplementationSpecific = networkingv1.PathTypeImplementationSpecific
	PathTypePrefix                 = networkingv1.PathTypePrefix
)

Variables

View Source
var (
	AddCoreToScheme      = corev1.AddToScheme
	IsNotFound           = apierrors.IsNotFound
	NestedFloat64        = unstructured.NestedFloat64
	NewJSONPath          = jsonpath.New
	NewScheme            = runtime.NewScheme
	NewYAMLOrJSONDecoder = utilyaml.NewYAMLOrJSONDecoder
	YAMLMarshal          = yaml.Marshal
	YAMLUnmarshal        = yaml.Unmarshal
)
View Source
var AddClientGoScheme = clientgoscheme.AddToScheme
View Source
var AddMetricsToScheme = metricsv1beta1.AddToScheme

AddMetricsToScheme registers the metrics.k8s.io/v1beta1 types with the given scheme.

View Source
var Now = metav1.Now

Functions

This section is empty.

Types

type Client added in v1.8.0

type Client = client.Client

type ConcurrentReconciler added in v1.8.0

type ConcurrentReconciler interface {
	MaxConcurrentReconciles() int
}

ConcurrentReconciler is an optional interface a ResourceController can implement to request a per-controller worker count. When the returned value is greater than zero it is applied as MaxConcurrentReconciles on the built controller; existing ResourceController implementations are unaffected.

type Condition added in v1.8.0

type Condition = metav1.Condition

condition types.

type ConditionStatus added in v1.8.0

type ConditionStatus = metav1.ConditionStatus

type Container added in v1.8.0

type Container = corev1.Container

type Controller

type Controller interface {
	Start(ctx context.Context) (<-chan error, error)
	GetManager() Manager
}

func New

func New(opts ...Option) (cl Controller, err error)

type CreateOption added in v1.7.13

type CreateOption = client.CreateOption

type DeleteAllOfOptions added in v1.7.13

type DeleteAllOfOptions = client.DeleteAllOfOptions

type DeleteOptions added in v1.7.13

type DeleteOptions = client.DeleteOptions

type Deployment added in v1.7.13

type Deployment = appsv1.Deployment

type DeploymentList added in v1.7.13

type DeploymentList = appsv1.DeploymentList

type EventHandler added in v1.8.0

type EventHandler = handler.EventHandler

type ForOption added in v1.8.0

type ForOption = builder.ForOption

type GetOption added in v1.7.13

type GetOption = client.GetOption

type GroupVersionKind added in v1.8.0

type GroupVersionKind = schema.GroupVersionKind

type GroupVersionResource added in v1.8.0

type GroupVersionResource = schema.GroupVersionResource

type InNamespace added in v1.7.13

type InNamespace = client.InNamespace

type Job added in v1.7.13

type Job = batchv1.Job

type JobList added in v1.7.13

type JobList = batchv1.JobList

type JobStatus added in v1.7.13

type JobStatus = batchv1.JobStatus

type ListOption added in v1.7.13

type ListOption = client.ListOption

type ListOptions added in v1.7.13

type ListOptions = client.ListOptions

type Manager added in v1.7.11

type Manager = manager.Manager

type MatchingFields added in v1.8.0

type MatchingFields = client.MatchingFields

type MatchingLabels added in v1.7.13

type MatchingLabels = client.MatchingLabels

type NamespacedName added in v1.8.0

type NamespacedName = types.NamespacedName

type Node added in v1.8.0

type Node = corev1.Node

type NodeList added in v1.8.0

type NodeList = corev1.NodeList

type NodeMetrics added in v1.8.0

type NodeMetrics = metricsv1beta1.NodeMetrics

metrics.k8s.io/v1beta1 API types.

type NodeMetricsList added in v1.8.0

type NodeMetricsList = metricsv1beta1.NodeMetricsList

metrics.k8s.io/v1beta1 API types.

type Object added in v1.7.13

type Object = client.Object

type ObjectKey added in v1.7.13

type ObjectKey = client.ObjectKey

type ObjectList added in v1.8.0

type ObjectList = client.ObjectList

type ObjectMeta added in v1.7.13

type ObjectMeta = metav1.ObjectMeta

type Option

type Option func(*controller) error

func WithCacheNamespaces added in v1.8.0

func WithCacheNamespaces(namespaces ...string) Option

WithCacheNamespaces restricts the manager cache to the given namespaces. Empty entries are skipped; when no namespace remains, the cache watches the whole cluster as before.

func WithControllerName

func WithControllerName(name string) Option

func WithDialer added in v1.0.2

func WithDialer(der net.Dialer) Option

func WithErrGroup

func WithErrGroup(eg errgroup.Group) Option

func WithLeaderElection added in v1.7.13

func WithLeaderElection(enabled bool, id, namespace string) Option

func WithLeaderElectionDetail added in v1.8.0

func WithLeaderElectionDetail(leaseDuration, renewDeadline, retryPeriod time.Duration) Option

WithLeaderElectionDetail sets the leader election lease timings applied to the manager. Non-positive values are ignored so that controller-runtime defaults (15s/10s/2s) remain in effect for the unset fields.

func WithMetricsAddress

func WithMetricsAddress(addr string) Option

func WithResourceController

func WithResourceController(rc ResourceController) Option

func WithSyncPeriod added in v1.8.0

func WithSyncPeriod(dur time.Duration) Option

WithSyncPeriod sets the informer cache resync interval. A non-positive value keeps the controller-runtime default (10h with jitter).

type OwnerReference added in v1.7.11

type OwnerReference = metav1.OwnerReference

type OwnsOption added in v1.8.0

type OwnsOption = builder.OwnsOption

type PatchOptions added in v1.8.0

type PatchOptions = metav1.PatchOptions

type PersistentVolumeClaim added in v1.7.13

type PersistentVolumeClaim = corev1.PersistentVolumeClaim

type PersistentVolumeClaimList added in v1.7.13

type PersistentVolumeClaimList = corev1.PersistentVolumeClaimList

type PersistentVolumeClaimSpec added in v1.7.13

type PersistentVolumeClaimSpec = corev1.PersistentVolumeClaimSpec

type Pod added in v1.7.13

type Pod = corev1.Pod

type PodList added in v1.8.0

type PodList = corev1.PodList

type PodMetrics added in v1.8.0

type PodMetrics = metricsv1beta1.PodMetrics

metrics.k8s.io/v1beta1 API types.

type PodMetricsList added in v1.8.0

type PodMetricsList = metricsv1beta1.PodMetricsList

metrics.k8s.io/v1beta1 API types.

type PodSpec added in v1.8.0

type PodSpec = corev1.PodSpec

type PodStatus added in v1.8.0

type PodStatus = corev1.PodStatus

type RESTConfig added in v1.8.0

type RESTConfig = rest.Config

type Reconciler added in v1.8.0

type Reconciler = reconcile.Reconciler

type Request added in v1.8.0

type Request = ctrl.Request

reconciler interface types.

type ResourceController

type ResourceController interface {
	GetName() string
	NewReconciler(ctx context.Context, mgr manager.Manager) reconcile.Reconciler
	For() (client.Object, []builder.ForOption)
	Owns() (client.Object, []builder.OwnsOption)
	Watches() (client.Object, handler.EventHandler, []builder.WatchesOption)
}

type ResourceList added in v1.8.0

type ResourceList = corev1.ResourceList

type ResourceRequirements added in v1.8.0

type ResourceRequirements = corev1.ResourceRequirements

type Result added in v1.7.13

type Result = reconcile.Result

type RuntimeObject added in v1.8.0

type RuntimeObject = runtime.Object

type Scheme added in v1.8.0

type Scheme = runtime.Scheme

type Time added in v1.8.0

type Time = metav1.Time

metadata / runtime / client primitive types.

type Toleration added in v1.8.0

type Toleration = corev1.Toleration

k8s workload types not yet aliased.

type TypedLocalObjectReference added in v1.7.13

type TypedLocalObjectReference = corev1.TypedLocalObjectReference

type UID added in v1.8.0

type UID = types.UID

type Unstructured added in v1.8.0

type Unstructured = unstructured.Unstructured

unstructured / schema / scheme types.

type VolumeSnapshot added in v1.7.13

type VolumeSnapshot = snapshotv1.VolumeSnapshot

type VolumeSnapshotList added in v1.7.13

type VolumeSnapshotList = snapshotv1.VolumeSnapshotList

type WatchesOption added in v1.8.0

type WatchesOption = builder.WatchesOption

type WithWatch added in v1.8.0

type WithWatch = client.WithWatch

Directories

Path Synopsis
Package client is Kubernetes client for getting resource from Kubernetes cluster.
Package client is Kubernetes client for getting resource from Kubernetes cluster.
package portforward provides a persistent port forwarding daemon for Kubernetes services.
package portforward provides a persistent port forwarding daemon for Kubernetes services.
Package reconciler provides generic k8s.ResourceController implementations that reconcile arbitrary Kinds (including custom resources) through the internal/k8s/resource helpers.
Package reconciler provides generic k8s.ResourceController implementations that reconcile arbitrary Kinds (including custom resources) through the internal/k8s/resource helpers.
Package resource provides generic typed clients, status evaluation and rollout helpers for Kubernetes resources.
Package resource provides generic typed clients, status evaluation and rollout helpers for Kubernetes resources.
Package vald provides functionality for Vald.
Package vald provides functionality for Vald.
benchmark/api/v1
Package v1 provides functionality for Vald.
Package v1 provides functionality for Vald.
benchmark/job
Package job provides benchmark job crd information and preriodically update
Package job provides benchmark job crd information and preriodically update
benchmark/scenario
Package operator provides benchmark operator crd information and preriodically update
Package operator provides benchmark operator crd information and preriodically update
mirror/api/v1
Package v1 provides functionality for Vald.
Package v1 provides functionality for Vald.
operator/api/v1
Package v1 contains API Schema definitions for the controller v1 API group.
Package v1 contains API Schema definitions for the controller v1 API group.

Jump to

Keyboard shortcuts

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