diff --git a/flyteplugins/go/tasks/pluginmachinery/tasklog/template.go b/flyteplugins/go/tasks/pluginmachinery/tasklog/template.go index 59b078e1da..4bb52aef4a 100644 --- a/flyteplugins/go/tasks/pluginmachinery/tasklog/template.go +++ b/flyteplugins/go/tasks/pluginmachinery/tasklog/template.go @@ -11,6 +11,7 @@ import ( // A simple log plugin that supports templates in urls to build the final log link. Supported templates are: // {{ .podName }}: Gets the pod name as it shows in k8s dashboard, +// {{ .podUID }}: Gets the pod UID, // {{ .namespace }}: K8s namespace where the pod runs, // {{ .containerName }}: The container name that generated the log, // {{ .containerId }}: The container id docker/crio generated at run time, @@ -153,11 +154,14 @@ func (s TemplateLogPlugin) GetTaskLogs(input Input) (Output, error) { // NewTemplateLogPlugin creates a template-based log plugin with the provided template Uri and message format. Supported // templates are: // {{ .podName }}: Gets the pod name as it shows in k8s dashboard, +// {{ .podUID }}: Gets the pod UID, // {{ .namespace }}: K8s namespace where the pod runs, // {{ .containerName }}: The container name that generated the log, // {{ .containerId }}: The container id docker/crio generated at run time, // {{ .logName }}: A deployment specific name where to expect the logs to be. // {{ .hostname }}: The hostname where the pod is running and where logs reside. +// {{ .podUnixStartTime }}: The pod creation time (in unix seconds, not millis) +// {{ .podUnixFinishTime }}: Don't have a good mechanism for this yet, but approximating with time.Now for now func NewTemplateLogPlugin(templateUris []string, messageFormat core.TaskLog_MessageFormat) TemplateLogPlugin { return TemplateLogPlugin{ templateUris: templateUris,