Documentation
¶
Index ¶
- Constants
- Variables
- func ExtractFieldPathAsString(obj interface{}, fieldPath string) (string, error)
- func ExtractValueFromPod(pod *corev1.Pod, key, fieldPath string) (value string, err error)
- func GetFieldRef(obj runtime.Object, fieldRef string) (interface{}, error)
- func Intersection(s sets.String, t []string) (res []string)
- func NewTrace() string
- type AvailableRuler
- type FilterResult
- type HttpJob
- type LabelCheckRuler
- type ManualRuler
- type PollResult
- type PollingManagerInterface
- type Ruler
- type Webhook
- type WebhookRuler
Constants ¶
View Source
const ( MaxConcurrentTasks = 16 TaskDeadLineSeconds = 60 )
Variables ¶
View Source
var PollingManager = newPollingManager(context.TODO())
Functions ¶
func ExtractValueFromPod ¶
Types ¶
type AvailableRuler ¶
type AvailableRuler struct {
Name string
MinAvailableValue *intstr.IntOrString
Client client.Client
}
func (*AvailableRuler) Filter ¶
func (r *AvailableRuler) Filter(podTransitionRule *appsv1alpha1.PodTransitionRule, targets map[string]*corev1.Pod, subjects sets.String) *FilterResult
Filter unavailable pods and try approve available pods as much as possible
type FilterResult ¶
type LabelCheckRuler ¶
type LabelCheckRuler struct {
Name string
Selector *metav1.LabelSelector
}
func (*LabelCheckRuler) Filter ¶
func (l *LabelCheckRuler) Filter(podTransitionRule *appsv1alpha1.PodTransitionRule, targets map[string]*corev1.Pod, subjects sets.String) *FilterResult
type ManualRuler ¶
func (*ManualRuler) Filter ¶
func (r *ManualRuler) Filter(podTransitionRule *appsv1alpha1.PodTransitionRule, targets map[string]*corev1.Pod, subjects sets.String) *FilterResult
type PollResult ¶
type PollingManagerInterface ¶
type PollingManagerInterface interface {
Delete(id string)
Add(id, url, caBundle, resourceKey string, timeout, interval time.Duration)
GetResult(id string) *PollResult
Start(ctx context.Context)
AddListener(chan<- event.GenericEvent)
}
type Ruler ¶
type Ruler interface {
Filter(podTransitionRule *appsv1alpha1.PodTransitionRule, targets map[string]*corev1.Pod, subjects sets.String) *FilterResult
}
func GetRuler ¶
func GetRuler(rule *appsv1alpha1.TransitionRule, client client.Client) Ruler
type Webhook ¶
type Webhook struct {
Key string
RuleName string
Stage *string
Webhook *appsv1alpha1.TransitionRuleWebhook
State *appsv1alpha1.RuleState
Approved func(string) bool
// contains filtered or unexported fields
}
func GetWebhook ¶
func GetWebhook(pt *appsv1alpha1.PodTransitionRule, names ...string) (webs []*Webhook)
type WebhookRuler ¶
type WebhookRuler struct {
Name string
}
func (*WebhookRuler) Filter ¶
func (r *WebhookRuler) Filter( podTransitionRule *appsv1alpha1.PodTransitionRule, targets map[string]*corev1.Pod, subjects sets.String, ) *FilterResult
Click to show internal directories.
Click to hide internal directories.