kubernetes

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2025 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ParseOptions

type ParseOptions struct {
	Delimiter string
}

type ParsedName

type ParsedName struct {
	Original  string
	Kind      string // deployment or statefulset
	Namespace string
	Name      string
	Replicas  int32
}

func DeploymentName

func DeploymentName(deployment *v1.Deployment, opts ParseOptions) ParsedName

func ParseName

func ParseName(name string, opts ParseOptions) (ParsedName, error)

func StatefulSetName

func StatefulSetName(statefulSet *v1.StatefulSet, opts ParseOptions) ParsedName

type Provider added in v1.9.0

type Provider struct {
	Client kubernetes.Interface
	// contains filtered or unexported fields
}

func New added in v1.9.0

func New(ctx context.Context, client *kubernetes.Clientset, logger *slog.Logger, config providerConfig.Kubernetes) (*Provider, error)

func (*Provider) DeploymentGroups added in v1.9.0

func (p *Provider) DeploymentGroups(ctx context.Context) (map[string][]string, error)

func (*Provider) DeploymentInspect added in v1.9.0

func (p *Provider) DeploymentInspect(ctx context.Context, config ParsedName) (sablier.InstanceInfo, error)

func (*Provider) DeploymentList added in v1.9.0

func (p *Provider) DeploymentList(ctx context.Context) ([]sablier.InstanceConfiguration, error)

func (*Provider) InstanceGroups added in v1.9.0

func (p *Provider) InstanceGroups(ctx context.Context) (map[string][]string, error)

func (*Provider) InstanceInspect added in v1.9.0

func (p *Provider) InstanceInspect(ctx context.Context, name string) (sablier.InstanceInfo, error)

func (*Provider) InstanceList added in v1.9.0

func (*Provider) InstanceStart added in v1.9.0

func (p *Provider) InstanceStart(ctx context.Context, name string) error

func (*Provider) InstanceStop added in v1.9.0

func (p *Provider) InstanceStop(ctx context.Context, name string) error

func (*Provider) NotifyInstanceStopped added in v1.9.0

func (p *Provider) NotifyInstanceStopped(ctx context.Context, instance chan<- string)

func (*Provider) StatefulSetGroups added in v1.9.0

func (p *Provider) StatefulSetGroups(ctx context.Context) (map[string][]string, error)

func (*Provider) StatefulSetInspect added in v1.9.0

func (p *Provider) StatefulSetInspect(ctx context.Context, config ParsedName) (sablier.InstanceInfo, error)

func (*Provider) StatefulSetList added in v1.9.0

func (p *Provider) StatefulSetList(ctx context.Context) ([]sablier.InstanceConfiguration, error)

type Workload

type Workload interface {
	GetScale(ctx context.Context, workloadName string, options metav1.GetOptions) (*autoscalingv1.Scale, error)
	UpdateScale(ctx context.Context, workloadName string, scale *autoscalingv1.Scale, opts metav1.UpdateOptions) (*autoscalingv1.Scale, error)
}

Jump to

Keyboard shortcuts

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