k8shelper

package
v0.0.0-...-f7df13b Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: MIT Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoActivePodFound = errors.New("no active pod found")
View Source
var ErrNoPodFound = errors.New("no pod found")
View Source
var ErrNoPublicServiceFound = errors.New("no public service found")
View Source
var ErrNoScaleTargetFound = errors.New("no scale target found")

Functions

func APIVersionStrToGVK

func APIVersionStrToGVK(apiVersion string, kind string) (schema.GroupVersionKind, error)

APIVersionStrToGVK converts an API version string to a GroupVersionKind

func KindToResource

func KindToResource(kind string) string

Kind is singular and might be in camelCase Resource is plural and is in smallcase Since CRD accept kind, it needs to be converted

func UnstructuredToResource

func UnstructuredToResource(obj interface{}, resource interface{}) error

Types

type Ops

type Ops struct {
	// contains filtered or unexported fields
}

Ops help you do various operations in your kubernetes cluster

func NewOps

func NewOps(logger *zap.Logger, config *rest.Config) *Ops

NewOps create a new instance for the k8s Operations

func (*Ops) CheckIfServiceEndpointSliceActive

func (k *Ops) CheckIfServiceEndpointSliceActive(ns, svc string) (bool, error)

CheckIfServiceEndpointSliceActive returns true if endpoint for a service is active

Jump to

Keyboard shortcuts

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