Documentation ¶
Index ¶
- Constants
- Variables
- func GeneratePodFromEvent(event *audit.Event) (*corev1.Pod, error)
- func GetJobPodFinishedTime(pod *corev1.Pod) time.Time
- func GetJsonFromRuntimeUnknown(un *runtime.Unknown) map[string]interface{}
- func GetObjectFromRuntimeUnknown(un *runtime.Unknown, gvk *schema.GroupVersionKind) runtime.Object
- func GetOwnerType(pod *corev1.Pod) string
- func GetPodReadyTime(pod *corev1.Pod) time.Time
- func GetPodSLOByDeliveryPath(pod *v1.Pod) (time.Duration, bool)
- func GetPriority(pod *v1.Pod) string
- func GetPubLister(name string) *pubsub.PubSub
- func IsDeleteImmediately(pod *corev1.Pod) bool
- func IsImageChanged(oldPod, newPod *corev1.Pod) bool
- func IsJobPod(pod *corev1.Pod) bool
- func IsJobPodFailed(pod *corev1.Pod) bool
- func IsJobPodFinished(pod *corev1.Pod) bool
- func IsJobPodRunning(pod *corev1.Pod) bool
- func IsJobPodSucceeded(pod *corev1.Pod) bool
- func IsPodFinishedNormally(pod *corev1.Pod) bool
- func IsPodReady(pod *corev1.Pod) bool
- func IsPodScheduled(pod *corev1.Pod) bool
- func IsPodSchedulingFailed(pod *corev1.Pod) bool
- func IsSidecarContainer(container *corev1.Container) bool
- func IsSpecChanged(oldPod, newPod *corev1.Pod) bool
- func IsTypicalPodNew(pod *v1.Pod) string
- func MicroTime2Time(t metav1.MicroTime) time.Time
- func PodDiff(oldPod, newPod *corev1.Pod, ...) bool
- func PodKey(pod *corev1.Pod) string
- func PodKeyForEvent(event *k8s_audit.Event) string
- func RegisterPublisher(name string)
- func UnsafeGuessResourceToKind(resource string) []string
- func WaitForAPIServer(client clientset.Interface, timeout time.Duration) error
- type PodPatch
- type SloSpec
- type SloSpecItem
- type Unknown
- type WatchSubscriber
Constants ¶
View Source
const ( PodCreateSLO = "pod_create_slo" PodDeleteSLO = "pod_delete_slo" )
Variables ¶
View Source
var DeliveryWatchers *utils.SafeMap = utils.NewSafeMap()
View Source
var NoPriority string = ""
Functions ¶
func GeneratePodFromEvent ¶
GeneratePodFromEvent generate pod info from event. first pars from responseObject and then requestObject and last from event.objectRef
func GetJobPodFinishedTime ¶
GetJobPodFinishedTime use the max container terminated time as job finish time
func GetOwnerType ¶
func GetPriority ¶
func GetPubLister ¶
func IsDeleteImmediately ¶
func IsImageChanged ¶
IsImageChanged identify an upgrade event
func IsJobPodFailed ¶
func IsJobPodFinished ¶
func IsJobPodRunning ¶
func IsJobPodSucceeded ¶
func IsPodFinishedNormally ¶
IsPodFinishedNormally judge if a pod is in a `finished` state. For a job pod, the pod should be Failed/Succeed/Running For a non-job pod, the pod should be Ready
func IsPodReady ¶
func IsPodScheduled ¶
func IsPodSchedulingFailed ¶
func IsSidecarContainer ¶
func IsSpecChanged ¶
IsSpecChanged identify an update event
func IsTypicalPodNew ¶
< 3 container, <= 8C16G, no user readiness-gate, no FlexVolume
func PodKeyForEvent ¶
PodKeyForEvent return a pod name with namespace
func RegisterPublisher ¶
func RegisterPublisher(name string)
Types ¶
type SloSpecItem ¶
type SloSpecItem struct {
SloTime string
}
type WatchSubscriber ¶
type WatchSubscriber struct {
// contains filtered or unexported fields
}
func NewWatcher ¶
func NewWatcher(name string, w http.ResponseWriter, r *http.Request) *WatchSubscriber
func (*WatchSubscriber) ErrorChan ¶
func (c *WatchSubscriber) ErrorChan() chan error
func (*WatchSubscriber) OnMessage ¶
func (c *WatchSubscriber) OnMessage(v interface{})
func (*WatchSubscriber) Stop ¶
func (c *WatchSubscriber) Stop()
func (*WatchSubscriber) SubscriberName ¶
func (c *WatchSubscriber) SubscriberName() string
Click to show internal directories.
Click to hide internal directories.