resources

package
v4.2.271+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetResourceLinkForPod added in v0.3.0

func GetResourceLinkForPod(client client.Client, pod *corev1.Pod) string

GetResourceLinkForPod returns resource link for pod

Types

type GetResource

type GetResource struct {
	client.Client
}

GetResource define resource list functions

func NewGetResource

func NewGetResource(client client.Client) *GetResource

NewGetResource return GetResource instance

func (*GetResource) GetAlamedaRecommendation

func (getResource *GetResource) GetAlamedaRecommendation(namespace, name string) (*autuscaling.AlamedaRecommendation, error)

GetAlamedaRecommendation return AlamedaRecommendation

func (*GetResource) GetAlamedaScaler

func (getResource *GetResource) GetAlamedaScaler(namespace, name string) (*autuscaling.AlamedaScaler, error)

GetAlamedaScaler return alamedascaler

func (*GetResource) GetDeployment

func (getResource *GetResource) GetDeployment(namespace, name string) (*appsv1.Deployment, error)

GetDeployment returns deployment

func (*GetResource) GetDeploymentConfig added in v0.3.0

func (getResource *GetResource) GetDeploymentConfig(namespace, name string) (*appsapi_v1.DeploymentConfig, error)

GetDeploymentConfig returns deploymentconfig

func (*GetResource) GetObservingAlamedaScalerOfController added in v0.3.0

func (getResource *GetResource) GetObservingAlamedaScalerOfController(controllerType autuscaling.AlamedaControllerType, controllerNamespace, controllerName string) (*autuscaling.AlamedaScaler, error)

func (*GetResource) GetPod

func (getResource *GetResource) GetPod(namespace, name string) (*corev1.Pod, error)

GetPod returns pod

func (*GetResource) GetReplicaSet added in v0.3.8

func (getResource *GetResource) GetReplicaSet(namespace, name string) (*appsv1.ReplicaSet, error)

GetReplicaSet returns replicaSet

func (*GetResource) GetReplicasCountByController added in v0.3.34

func (getResource *GetResource) GetReplicasCountByController(namespace, name, kind string) (int32, error)

GetReplicasCountByController get controller's spec.replicas

func (*GetResource) GetReplicationController added in v0.3.8

func (getResource *GetResource) GetReplicationController(namespace, name string) (*corev1.ReplicationController, error)

GetReplicationController returns replicationController

func (*GetResource) GetStatefulSet added in v0.9.1

func (getResource *GetResource) GetStatefulSet(namespace, name string) (*appsv1.StatefulSet, error)

GetStatefulSet returns statefulSet

type ListResources

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

ListResources define resource list functions

func NewListResources

func NewListResources(client client.Client) *ListResources

NewListResources return ListResources instance

func (*ListResources) ListAlamedaRecommendationOwnedByAlamedaScaler added in v0.3.0

func (listResources *ListResources) ListAlamedaRecommendationOwnedByAlamedaScaler(alamedaScaler *autuscaling.AlamedaScaler) ([]autuscaling.AlamedaRecommendation, error)

ListAlamedaRecommendationOwnedByAlamedaScaler return all AlamedaRecommendation created by input AlamedaScaler

func (*ListResources) ListAllAlamedaScaler

func (listResources *ListResources) ListAllAlamedaScaler() ([]autuscaling.AlamedaScaler, error)

ListAllAlamedaScaler return all AlamedaScaler in cluster

func (*ListResources) ListAllNodes

func (listResources *ListResources) ListAllNodes() ([]*corev1.Node, error)

ListAllNodes return all nodes in cluster

func (*ListResources) ListDeploymentConfigsByLabels added in v0.3.0

func (listResources *ListResources) ListDeploymentConfigsByLabels(labels map[string]string) ([]appsapi_v1.DeploymentConfig, error)

ListDeploymentConfigsByLabels return DeploymentConfigs by labels

func (*ListResources) ListDeploymentConfigsByNamespaceLabels added in v0.3.0

func (listResources *ListResources) ListDeploymentConfigsByNamespaceLabels(namespace string, labels map[string]string) ([]appsapi_v1.DeploymentConfig, error)

ListDeploymentConfigsByNamespaceLabels return deploymentconfigs by namespace and labels

func (*ListResources) ListDeploymentsByLabels

func (listResources *ListResources) ListDeploymentsByLabels(labels map[string]string) ([]appsv1.Deployment, error)

ListDeploymentsByLabels return deployments by labels

func (*ListResources) ListDeploymentsByNamespaceLabels added in v0.3.0

func (listResources *ListResources) ListDeploymentsByNamespaceLabels(namespace string, labels map[string]string) ([]appsv1.Deployment, error)

ListDeploymentsByNamespaceLabels return deployments by namespace and labels

func (*ListResources) ListNamespaceAlamedaScaler added in v0.3.0

func (listResources *ListResources) ListNamespaceAlamedaScaler(namespace string) ([]autuscaling.AlamedaScaler, error)

ListNamespaceAlamedaScaler return all AlamedaScaler in specific namespace

func (*ListResources) ListPodsByController added in v0.3.34

func (listResources *ListResources) ListPodsByController(namespace, name, kind string) ([]corev1.Pod, error)

func (*ListResources) ListPodsByDeployment

func (listResources *ListResources) ListPodsByDeployment(deployNS, deployName string) ([]corev1.Pod, error)

ListPodsByDeployment return pods by deployment namespace and name

func (*ListResources) ListPodsByDeploymentConfig added in v0.3.0

func (listResources *ListResources) ListPodsByDeploymentConfig(deployConfigNS, deployConfigName string) ([]corev1.Pod, error)

ListPodsByDeploymentConfig return pods by deployment namespace and name

func (*ListResources) ListPodsByLabels

func (listResources *ListResources) ListPodsByLabels(labels map[string]string) ([]corev1.Pod, error)

ListPodsByLabels return pods by labels

func (*ListResources) ListPodsByStatefulSet added in v0.9.1

func (listResources *ListResources) ListPodsByStatefulSet(namespace, name string) ([]corev1.Pod, error)

ListPodsByStatefulSet return pods by statefulSet namespace and name

func (*ListResources) ListStatefulSetsByNamespaceLabels added in v0.9.1

func (listResources *ListResources) ListStatefulSetsByNamespaceLabels(namespace string, labels map[string]string) ([]appsv1.StatefulSet, error)

ListStatefulSetsByNamespaceLabels return statefulsets by namespace and labels

type UpdateResource

type UpdateResource struct {
	client.Client
}

UpdateResource define resource update functions

func NewUpdateResource

func NewUpdateResource(client client.Client) *UpdateResource

NewUpdateResource return UpdateResource instance

func (*UpdateResource) UpdateAlamedaScaler

func (updateResource *UpdateResource) UpdateAlamedaScaler(alamedaScaler *autuscaling.AlamedaScaler) error

UpdateAlamedaScaler updates AlamedaScaler

func (*UpdateResource) UpdateResource added in v0.9.1

func (updateResource *UpdateResource) UpdateResource(resource runtime.Object) error

UpdateResource updates resource

Jump to

Keyboard shortcuts

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