Documentation ¶
Index ¶
- func CreateJobContextFromKubernetesAnnotations(meta metav1.ObjectMeta) (contract.JobContext, error)
- func FindAndReadLogsFromLastPod(ctx context.Context, lister v1.PodInterface, selector string) string
- func HasUsableAnnotations(meta metav1.ObjectMeta) (bool, error)
- func ReadRequestStream(ctx context.Context, req *rest.Request) string
- func TruncateLogs(logs string, data config.Data) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateJobContextFromKubernetesAnnotations ¶
func CreateJobContextFromKubernetesAnnotations(meta metav1.ObjectMeta) (contract.JobContext, error)
CreateJobContextFromKubernetesAnnotations translates any Kubernetes object into contract.JobContext
func FindAndReadLogsFromLastPod ¶
func FindAndReadLogsFromLastPod(ctx context.Context, lister v1.PodInterface, selector string) string
FindAndReadLogsFromLastPod is listing logs from the last Pod found for given selector. Errors are returned as logs 1. Find all Pods for given Job 2. Sort by metadata.creationTimestamp, desc 3. Pick first and retrieve logs
func HasUsableAnnotations ¶
func HasUsableAnnotations(meta metav1.ObjectMeta) (bool, error)
HasUsableAnnotations is checking if Kubernetes object is usable at all
func ReadRequestStream ¶
ReadRequestStream is a helper you can use to read logs from the Pod. Errors are returned as logs
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.