Documentation ¶
Index ¶
- func DefaultConfigModifier(config *rest.Config)
- type Client
- func (c *Client) ListConfigMaps(ctx context.Context, namespace string) (*v1.ConfigMapList, error)
- func (c *Client) ListCronJobs(ctx context.Context, namespace string) (*batchv1.CronJobList, error)
- func (c *Client) ListDeployments(ctx context.Context, namespace string) (*appsv1.DeploymentList, error)
- func (c *Client) ListHorizontalPodAutoscalers(ctx context.Context, namespace string) (*autoscalingv2.HorizontalPodAutoscalerList, error)
- func (c *Client) ListNamespaces(ctx context.Context) ([]string, error)
- func (c *Client) ListPersistantVolumeClaims(ctx context.Context, namespace string) (*v1.PersistentVolumeClaimList, error)
- func (c *Client) ListSecrets(ctx context.Context, namespace string) (*v1.SecretList, error)
- func (c *Client) ListServices(ctx context.Context, namespace string) (*v1.ServiceList, error)
- func (c *Client) ListStatefulSets(ctx context.Context, namespace string) (*appsv1.StatefulSetList, error)
- type ClientInterface
- type ConfigMapLister
- type ConfigModifier
- type CronJobLister
- type DeploymentLister
- type HorizontalPodAutoscalerLister
- type NamespaceLister
- type PersistantVolumeClaimLister
- type SecretLister
- type ServiceLister
- type StatefulSetLister
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultConfigModifier ¶
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 ¶
ListConfigMaps lists all ConfigMaps in the specified namespace
func (*Client) ListCronJobs ¶
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 ¶
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 ¶
ListSecrets lists all Secrets in the specified namespace
func (*Client) ListServices ¶
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 ¶
type ClientInterface interface { ConfigMapLister DeploymentLister NamespaceLister SecretLister ServiceLister StatefulSetLister HorizontalPodAutoscalerLister CronJobLister PersistantVolumeClaimLister }
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 ¶
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 ¶
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