mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-16 14:45:28 +00:00
Remove CONDITION from event object completely
# *** ERROR: *** Some files have not been gofmt'd. To fix these # errors, run gofmt -s -w <file>, or cut and paste the following: # gofmt -s -w pkg/kubecfg/resource_printer.go pkg/proxy/config/config.go pkg/runtime/types.go # # Your commit will be aborted unless you override this warning. To # commit in spite of these format errors, delete the following line: # COMMIT_BLOCKED_ON_GOFMT
This commit is contained in:
@@ -200,13 +200,12 @@ func describeEvents(el *api.EventList, w io.Writer) {
|
||||
return
|
||||
}
|
||||
sort.Sort(SortableEvents(el.Items))
|
||||
fmt.Fprint(w, "Events:\nTime\tFrom\tSubobjectPath\tCondition\tReason\tMessage\n")
|
||||
fmt.Fprint(w, "Events:\nTime\tFrom\tSubobjectPath\tReason\tMessage\n")
|
||||
for _, e := range el.Items {
|
||||
fmt.Fprintf(w, "%s\t%v\t%v\t%v\t%v\t%v\n",
|
||||
e.Timestamp.Time.Format(time.RFC1123Z),
|
||||
e.Source,
|
||||
e.InvolvedObject.FieldPath,
|
||||
e.Condition,
|
||||
e.Reason,
|
||||
e.Message)
|
||||
}
|
||||
|
@@ -220,7 +220,7 @@ var replicationControllerColumns = []string{"CONTROLLER", "CONTAINER(S)", "IMAGE
|
||||
var serviceColumns = []string{"NAME", "LABELS", "SELECTOR", "IP", "PORT"}
|
||||
var minionColumns = []string{"NAME", "LABELS"}
|
||||
var statusColumns = []string{"STATUS"}
|
||||
var eventColumns = []string{"TIME", "NAME", "KIND", "SUBOBJECT", "CONDITION", "REASON", "SOURCE", "MESSAGE"}
|
||||
var eventColumns = []string{"TIME", "NAME", "KIND", "SUBOBJECT", "REASON", "SOURCE", "MESSAGE"}
|
||||
|
||||
// addDefaultHandlers adds print handlers for default Kubernetes types.
|
||||
func (h *HumanReadablePrinter) addDefaultHandlers() {
|
||||
@@ -367,12 +367,11 @@ func printStatus(status *api.Status, w io.Writer) error {
|
||||
|
||||
func printEvent(event *api.Event, w io.Writer) error {
|
||||
_, err := fmt.Fprintf(
|
||||
w, "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n",
|
||||
w, "%s\t%s\t%s\t%s\t%s\t%s\t%s\n",
|
||||
event.Timestamp.Time.Format(time.RFC1123Z),
|
||||
event.InvolvedObject.Name,
|
||||
event.InvolvedObject.Kind,
|
||||
event.InvolvedObject.FieldPath,
|
||||
event.Condition,
|
||||
event.Reason,
|
||||
event.Source,
|
||||
event.Message,
|
||||
|
Reference in New Issue
Block a user