Documentation ¶
Index ¶
- func GetResourceLinkForPod(client client.Client, pod *corev1.Pod) string
- type GetResource
- func (getResource *GetResource) GetAlamedaRecommendation(namespace, name string) (*autuscaling.AlamedaRecommendation, error)
- func (getResource *GetResource) GetAlamedaScaler(namespace, name string) (*autuscaling.AlamedaScaler, error)
- func (getResource *GetResource) GetDeployment(namespace, name string) (*appsv1.Deployment, error)
- func (getResource *GetResource) GetDeploymentConfig(namespace, name string) (*appsapi_v1.DeploymentConfig, error)
- func (getResource *GetResource) GetObservingAlamedaScalerOfController(controllerType autuscaling.AlamedaControllerType, ...) (*autuscaling.AlamedaScaler, error)
- func (getResource *GetResource) GetPod(namespace, name string) (*corev1.Pod, error)
- func (getResource *GetResource) GetReplicaSet(namespace, name string) (*appsv1.ReplicaSet, error)
- func (getResource *GetResource) GetReplicasCountByController(namespace, name, kind string) (int32, error)
- func (getResource *GetResource) GetReplicationController(namespace, name string) (*corev1.ReplicationController, error)
- type ListResources
- func (listResources *ListResources) ListAlamedaRecommendationOwnedByAlamedaScaler(alamedaScaler *autuscaling.AlamedaScaler) ([]autuscaling.AlamedaRecommendation, error)
- func (listResources *ListResources) ListAllAlamedaScaler() ([]autuscaling.AlamedaScaler, error)
- func (listResources *ListResources) ListAllNodes() ([]*corev1.Node, error)
- func (listResources *ListResources) ListDeploymentConfigsByLabels(labels map[string]string) ([]appsapi_v1.DeploymentConfig, error)
- func (listResources *ListResources) ListDeploymentConfigsByNamespaceLabels(namespace string, labels map[string]string) ([]appsapi_v1.DeploymentConfig, error)
- func (listResources *ListResources) ListDeploymentsByLabels(labels map[string]string) ([]appsv1.Deployment, error)
- func (listResources *ListResources) ListDeploymentsByNamespaceLabels(namespace string, labels map[string]string) ([]appsv1.Deployment, error)
- func (listResources *ListResources) ListNamespaceAlamedaScaler(namespace string) ([]autuscaling.AlamedaScaler, error)
- func (listResources *ListResources) ListPodsByController(namespace, name, kind string) ([]corev1.Pod, error)
- func (listResources *ListResources) ListPodsByDeployment(deployNS, deployName string) ([]corev1.Pod, error)
- func (listResources *ListResources) ListPodsByDeploymentConfig(deployConfigNS, deployConfigName string) ([]corev1.Pod, error)
- func (listResources *ListResources) ListPodsByLabels(labels map[string]string) ([]corev1.Pod, error)
- type UpdateResource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GetResource ¶
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
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
type UpdateResource ¶
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