k8s

package
v0.0.0-...-aa1f6b2 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewK8sManagedClusterClientDoOrDie

func NewK8sManagedClusterClientDoOrDie(config *rest.Config) *Client

NewK8sManagedClusterClientDoOrDie creates a client for managed cluster or config passed

func NewK8sSelfClientDoOrDie

func NewK8sSelfClientDoOrDie() *Client

NewK8sSelfClientDoOrDie gets the new k8s go client

func (*Client) GetRecentReplicaSet

func (k *Client) GetRecentReplicaSet(ctx context.Context, owner string, ns string) (*v1.ReplicaSet, error)

func (*Client) GetV1Deployment

func (k *Client) GetV1Deployment(ctx context.Context, ns string, name string) (*v1.Deployment, error)

GetV1Deployment function gets the namespace

func (*Client) ListStateFulSets

func (k *Client) ListStateFulSets(ctx context.Context, labelKey string, labelValue string)

ListStateFulSets lists all stateful sets

func (*Client) ListV1Beta2Deployments

func (k *Client) ListV1Beta2Deployments(ctx context.Context, labelKey string, labelValue string) (*v1beta2.DeploymentList, error)

ListDeployments functions lists all the deployments with

func (*Client) ListV1Deployments

func (k *Client) ListV1Deployments(ctx context.Context, labelKey string, labelValue string) (*v1.DeploymentList, error)

ListDeployments functions lists all the deployments with

func (*Client) ListV1ReplicaSets

func (k *Client) ListV1ReplicaSets(ctx context.Context, labelKey string, labelValue string) (*v1.ReplicaSetList, error)

ListV1ReplicaSets functions lists all the deployments with

func (*Client) ScaleV1Beta2Deployments

func (k *Client) ScaleV1Beta2Deployments(ctx context.Context, depl *v1beta2.Deployment, replicas int) error

ScaleDownV1Deployments scales down to the requested replica count

func (*Client) ScaleV1Deployments

func (k *Client) ScaleV1Deployments(ctx context.Context, depl *v1.Deployment, repl *v1.ReplicaSet) error

ScaleDownV1Deployments scales down to the requested replica count

type Interface

type Interface interface {
	ListV1ReplicaSets(ctx context.Context, labelKey string, labelValue string) (*v1.ReplicaSetList, error)
	GetV1Deployment(ctx context.Context, ns string, name string) (*v1.Deployment, error)
	ListV1Deployments(ctx context.Context, labelKey string, labelValue string) (*v1.DeploymentList, error)
	ListV1Beta2Deployments(ctx context.Context, labelKey string, labelValue string) (*v1beta2.DeploymentList, error)
	ScaleV1Deployments(ctx context.Context, depl *v1.Deployment, repl *v1.ReplicaSet) error
	ScaleV1Beta2Deployments(ctx context.Context, depl *v1beta2.Deployment, replicas int) error
	GetRecentReplicaSet(ctx context.Context, owner string, ns string) (*v1.ReplicaSet, error)
	ListStateFulSets(ctx context.Context, labelKey string, labelValue string)
}

type Replica

type Replica struct {
	Revision int
	Index    int
}

Jump to

Keyboard shortcuts

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