registry

package
v0.0.0-...-2dbac4b Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DeploymentGVK = schema.GroupVersionKind{
	Group:   "apps",
	Version: "v1",
	Kind:    "Deployment",
}
View Source
var RolloutGVK = schema.GroupVersionKind{
	Group:   "argoproj.io",
	Version: "v1alpha1",
	Kind:    "Rollout",
}

Functions

This section is empty.

Types

type DeploymentClient

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

func (*DeploymentClient) GetContainerResourceLimits

func (dc *DeploymentClient) GetContainerResourceLimits(namespace string, name string) (float64, error)

func (*DeploymentClient) GetKind

func (dc *DeploymentClient) GetKind() string

func (*DeploymentClient) GetMaxReplicaFromAnnotation

func (dc *DeploymentClient) GetMaxReplicaFromAnnotation(namespace string, name string) (int, error)

func (*DeploymentClient) GetObject

func (dc *DeploymentClient) GetObject(namespace string, name string) (client.Object, error)

func (*DeploymentClient) GetObjectType

func (dc *DeploymentClient) GetObjectType() client.Object

func (*DeploymentClient) GetReplicaCount

func (dc *DeploymentClient) GetReplicaCount(namespace string, name string) (int, error)

func (*DeploymentClient) Scale

func (dc *DeploymentClient) Scale(namespace string, name string, replicas int32) error

type DeploymentClientRegistry

type DeploymentClientRegistry struct {
	Clients []ObjectClient
	// contains filtered or unexported fields
}

func (*DeploymentClientRegistry) GetObjectClient

func (cr *DeploymentClientRegistry) GetObjectClient(objectKind string) (ObjectClient, error)

type DeploymentClientRegistryBuilder

type DeploymentClientRegistryBuilder DeploymentClientRegistry

func NewDeploymentClientRegistryBuilder

func NewDeploymentClientRegistryBuilder() *DeploymentClientRegistryBuilder

func (*DeploymentClientRegistryBuilder) Build

func (*DeploymentClientRegistryBuilder) WithCustomDeploymentClient

func (cr *DeploymentClientRegistryBuilder) WithCustomDeploymentClient(client ObjectClient) *DeploymentClientRegistryBuilder

func (*DeploymentClientRegistryBuilder) WithK8sClient

type ObjectClient

type ObjectClient interface {
	GetObject(namespace string, name string) (client.Object, error)
	GetObjectType() client.Object
	GetKind() string
	GetMaxReplicaFromAnnotation(namespace string, name string) (int, error)
	GetContainerResourceLimits(namespace string, name string) (float64, error)
	GetReplicaCount(namespace string, name string) (int, error)
	Scale(namespace string, name string, replicas int32) error
}

func NewDeploymentClient

func NewDeploymentClient(k8sClient client.Client) ObjectClient

func NewRolloutClient

func NewRolloutClient(k8sClient client.Client) ObjectClient

type RolloutClient

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

func (*RolloutClient) GetContainerResourceLimits

func (rc *RolloutClient) GetContainerResourceLimits(namespace string, name string) (float64, error)

func (*RolloutClient) GetKind

func (rc *RolloutClient) GetKind() string

func (*RolloutClient) GetMaxReplicaFromAnnotation

func (rc *RolloutClient) GetMaxReplicaFromAnnotation(namespace string, name string) (int, error)

func (*RolloutClient) GetObject

func (rc *RolloutClient) GetObject(namespace string, name string) (client.Object, error)

func (*RolloutClient) GetObjectType

func (rc *RolloutClient) GetObjectType() client.Object

func (*RolloutClient) GetReplicaCount

func (rc *RolloutClient) GetReplicaCount(namespace string, name string) (int, error)

func (*RolloutClient) Scale

func (rc *RolloutClient) Scale(namespace string, name string, replicas int32) error

Jump to

Keyboard shortcuts

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