kubernetes

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultConfigModifier

func DefaultConfigModifier(config *rest.Config)

DefaultConfigModifier sets default QPS and Burst values

Types

type Client

type Client struct {
	Clientset kubernetes.Interface
}

Client implements the ClientInterface

func NewClient

func NewClient(kubeconfigPath, context string, modifier ConfigModifier) (*Client, error)

NewClient creates a new Client instance

func (*Client) ListConfigMaps

func (c *Client) ListConfigMaps(ctx context.Context, namespace string) (*v1.ConfigMapList, error)

ListConfigMaps lists all ConfigMaps in the specified namespace

func (*Client) ListCronJobs

func (c *Client) ListCronJobs(ctx context.Context, namespace string) (*batchv1.CronJobList, error)

ListCronJobs lists all cronjobs in the given namespace.

func (*Client) ListDeployments

func (c *Client) ListDeployments(ctx context.Context, namespace string) (*appsv1.DeploymentList, error)

ListDeployments lists all Deployments in the specified namespace

func (*Client) ListHorizontalPodAutoscalers

func (c *Client) ListHorizontalPodAutoscalers(ctx context.Context, namespace string) (*autoscalingv2.HorizontalPodAutoscalerList, error)

ListHPAs lists all HPAs in the specified namespace

func (*Client) ListNamespaces

func (c *Client) ListNamespaces(ctx context.Context) ([]string, error)

ListNamespaces lists all namespaces in the cluster

func (*Client) ListPersistantVolumeClaims added in v1.0.6

func (c *Client) ListPersistantVolumeClaims(ctx context.Context, namespace string) (*v1.PersistentVolumeClaimList, error)

ListPersistantVolumeClaims lists all PersistantVolumeClaims in the specified namespace

func (*Client) ListSecrets

func (c *Client) ListSecrets(ctx context.Context, namespace string) (*v1.SecretList, error)

ListSecrets lists all Secrets in the specified namespace

func (*Client) ListServices

func (c *Client) ListServices(ctx context.Context, namespace string) (*v1.ServiceList, error)

ListServices lists all Services in the specified namespace

func (*Client) ListStatefulSets

func (c *Client) ListStatefulSets(ctx context.Context, namespace string) (*appsv1.StatefulSetList, error)

ListStatefulSets lists all StatefulSets in the specified namespace

type ClientInterface

ClientInterface defines the methods that a Kubernetes client should implement

type ConfigMapLister

type ConfigMapLister interface {
	ListConfigMaps(ctx context.Context, namespace string) (*v1.ConfigMapList, error)
}

ConfigMapLister defines the method to list ConfigMaps

type ConfigModifier

type ConfigModifier func(*rest.Config)

ConfigModifier is a function type that modifies a rest.Config

type CronJobLister

type CronJobLister interface {
	ListCronJobs(ctx context.Context, namespace string) (*batchv1.CronJobList, error)
}

CronJobLister is an interface that lists cronjobs.

type DeploymentLister

type DeploymentLister interface {
	ListDeployments(ctx context.Context, namespace string) (*appsv1.DeploymentList, error)
}

DeploymentLister defines the method to list Deployments

type HorizontalPodAutoscalerLister

type HorizontalPodAutoscalerLister interface {
	ListHorizontalPodAutoscalers(ctx context.Context, namespace string) (*autoscalingv2.HorizontalPodAutoscalerList, error)
}

HorizontalPodAutoscalerLister defines the methods to list HorizontalPodAutoscalers

type NamespaceLister

type NamespaceLister interface {
	ListNamespaces(ctx context.Context) ([]string, error)
}

NamespaceLister defines the method to list Namespaces

type PersistantVolumeClaimLister added in v1.0.6

type PersistantVolumeClaimLister interface {
	ListPersistantVolumeClaims(ctx context.Context, namespace string) (*v1.PersistentVolumeClaimList, error)
}

PersistantVolumeClaimLister defines the methods to list PersistantVolumeClaims

type SecretLister

type SecretLister interface {
	ListSecrets(ctx context.Context, namespace string) (*v1.SecretList, error)
}

SecretLister defines the method to list Secrets

type ServiceLister

type ServiceLister interface {
	ListServices(ctx context.Context, namespace string) (*v1.ServiceList, error)
}

ServiceLister defines the method to list Services

type StatefulSetLister

type StatefulSetLister interface {
	ListStatefulSets(ctx context.Context, namespace string) (*appsv1.StatefulSetList, error)
}

StatefulSetLister defines the method to list StatefulSets

Jump to

Keyboard shortcuts

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