Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Actually return the SyncError for controllers #1521

Merged
merged 1 commit into from
Nov 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/v6/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ type ControllerStatus struct {
ReadOnly ReadOnlyReason
Status string
Rollout cluster.RolloutStatus
SyncError string
Antecedent flux.ResourceID
Labels map[string]string
Automated bool
Expand Down
5 changes: 5 additions & 0 deletions daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,17 @@ func (d *Daemon) ListServicesWithOptions(ctx context.Context, opts v11.ListServi
case service.IsSystem:
readOnly = v6.ReadOnlySystem
}
var syncError string
if service.SyncError != nil {
syncError = service.SyncError.Error()
}
res = append(res, v6.ControllerStatus{
ID: service.ID,
Containers: containers2containers(service.ContainersOrNil()),
ReadOnly: readOnly,
Status: service.Status,
Rollout: service.Rollout,
SyncError: syncError,
Antecedent: service.Antecedent,
Labels: service.Labels,
Automated: policies.Has(policy.Automated),
Expand Down