Documentation
¶
Index ¶
- func AddNodeLabels(nodes []*corev1.Node, nodeName string, attributes map[string][]string) map[string][]string
- func GetDomainnames(node *v1.Node) []string
- func GetHostname(node *v1.Node) string
- func GetKubeScoreForDaemonSet(daemonSet *appsv1.DaemonSet, services []*corev1.Service) map[string][]string
- func GetKubeScoreForDeployment(deployment *appsv1.Deployment, services []*corev1.Service, ...) map[string][]string
- func GetKubeScoreForStatefulSet(statefulSet *appsv1.StatefulSet, services []*corev1.Service) map[string][]string
- func GetNodeHostnameAndFQDNs(nodes []*v1.Node, name string) (hostname string, fqdn []string)
- func GetPodBasedAttributes(ownerType string, owner metav1.ObjectMeta, pods []*v1.Pod, nodes []*v1.Node) map[string][]string
- func GetServiceNames(services []*v1.Service) map[string][]string
- func NewAttributeDescriber() discovery_kit_sdk.AttributeDescriber
- func TriggerOnKubernetesResourceChange(k8s *client.Client, t ...reflect.Type) chan struct{}
- type CheckMode
- type KubectlAction
- func (a KubectlAction) Describe() action_kit_api.ActionDescription
- func (a KubectlAction) NewEmptyState() KubectlActionState
- func (a KubectlAction) Prepare(ctx context.Context, state *KubectlActionState, ...) (*action_kit_api.PrepareResult, error)
- func (a KubectlAction) Start(_ context.Context, state *KubectlActionState) (*action_kit_api.StartResult, error)
- func (a KubectlAction) Status(_ context.Context, state *KubectlActionState) (*action_kit_api.StatusResult, error)
- func (a KubectlAction) Stop(_ context.Context, state *KubectlActionState) (*action_kit_api.StopResult, error)
- type KubectlActionState
- type KubectlOpts
- type KubectlOptsProvider
- type PodCountCheckAction
- func (f PodCountCheckAction) Describe() action_kit_api.ActionDescription
- func (f PodCountCheckAction) NewEmptyState() PodCountCheckState
- func (f PodCountCheckAction) Prepare(_ context.Context, state *PodCountCheckState, ...) (*action_kit_api.PrepareResult, error)
- func (f PodCountCheckAction) Start(_ context.Context, _ *PodCountCheckState) (*action_kit_api.StartResult, error)
- func (f PodCountCheckAction) Status(_ context.Context, state *PodCountCheckState) (*action_kit_api.StatusResult, error)
- type PodCountCheckConfig
- type PodCountCheckState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddNodeLabels ¶
func GetDomainnames ¶
func GetHostname ¶
func GetKubeScoreForDeployment ¶
func GetKubeScoreForDeployment(deployment *appsv1.Deployment, services []*corev1.Service, hpa *autoscalingv2.HorizontalPodAutoscaler) map[string][]string
func GetNodeHostnameAndFQDNs ¶
func GetPodBasedAttributes ¶
func NewAttributeDescriber ¶
func NewAttributeDescriber() discovery_kit_sdk.AttributeDescriber
Types ¶
type CheckMode ¶
type CheckMode string
const ( PodCountMin1 CheckMode = "podCountMin1" PodCountEqualsDesiredCount CheckMode = "podCountEqualsDesiredCount" PodCountGreaterEqualsDesiredCount CheckMode = "podCountGreaterEqualsDesiredCount" PodCountLessThanDesiredCount CheckMode = "podCountLessThanDesiredCount" PodCountDecreased CheckMode = "podCountDecreased" PodCountIncreased CheckMode = "podCountIncreased" )
type KubectlAction ¶
type KubectlAction struct {
Description action_kit_api.ActionDescription
OptsProvider KubectlOptsProvider
}
func (KubectlAction) Describe ¶
func (a KubectlAction) Describe() action_kit_api.ActionDescription
func (KubectlAction) NewEmptyState ¶
func (a KubectlAction) NewEmptyState() KubectlActionState
func (KubectlAction) Prepare ¶
func (a KubectlAction) Prepare(ctx context.Context, state *KubectlActionState, request action_kit_api.PrepareActionRequestBody) (*action_kit_api.PrepareResult, error)
func (KubectlAction) Start ¶
func (a KubectlAction) Start(_ context.Context, state *KubectlActionState) (*action_kit_api.StartResult, error)
func (KubectlAction) Status ¶
func (a KubectlAction) Status(_ context.Context, state *KubectlActionState) (*action_kit_api.StatusResult, error)
func (KubectlAction) Stop ¶
func (a KubectlAction) Stop(_ context.Context, state *KubectlActionState) (*action_kit_api.StopResult, error)
type KubectlActionState ¶
type KubectlActionState struct {
Opts KubectlOpts `json:"opts"`
CmdStateID string `json:"cmdStateId"`
Pid int `json:"pid"`
CommandCompleted bool `json:"commandCompleted"`
}
type KubectlOpts ¶
type KubectlOpts struct {
Command []string `json:"command"`
RollbackPreconditionCommand *[]string `json:"rollbackPreconditionCommand,omitempty"`
RollbackCommand *[]string `json:"rollbackCommand,omitempty"`
LogTargetType string `json:"targetType"`
LogTargetName string `json:"targetName"`
LogActionName string `json:"actionName"`
}
type KubectlOptsProvider ¶
type KubectlOptsProvider func(ctx context.Context, request action_kit_api.PrepareActionRequestBody) (*KubectlOpts, error)
type PodCountCheckAction ¶
type PodCountCheckAction struct {
Client *client.Client
ActionId string
TargetType string
TargetTypeLabel string
SelectionTemplates *action_kit_api.TargetSelectionTemplates
GetTarget func(request action_kit_api.PrepareActionRequestBody) string
GetDesiredAndCurrentPodCount func(k8s *client.Client, namespace string, target string) (*int32, int32, error)
}
func (PodCountCheckAction) Describe ¶
func (f PodCountCheckAction) Describe() action_kit_api.ActionDescription
func (PodCountCheckAction) NewEmptyState ¶
func (f PodCountCheckAction) NewEmptyState() PodCountCheckState
func (PodCountCheckAction) Prepare ¶
func (f PodCountCheckAction) Prepare(_ context.Context, state *PodCountCheckState, request action_kit_api.PrepareActionRequestBody) (*action_kit_api.PrepareResult, error)
func (PodCountCheckAction) Start ¶
func (f PodCountCheckAction) Start(_ context.Context, _ *PodCountCheckState) (*action_kit_api.StartResult, error)
func (PodCountCheckAction) Status ¶
func (f PodCountCheckAction) Status(_ context.Context, state *PodCountCheckState) (*action_kit_api.StatusResult, error)
type PodCountCheckConfig ¶
Click to show internal directories.
Click to hide internal directories.