Check pointer

mine
Raphaël Pinson 2020-12-11 11:25:48 +01:00
parent ce8a30dc88
commit a23e594c48
No known key found for this signature in database
GPG Key ID: A1AAC49E10CB2A8D
1 changed files with 7 additions and 5 deletions

View File

@ -45,12 +45,14 @@ func (Application) Render(o interface{}, ns string, r *Row) error {
r.ID = client.MetaFQN(app.ObjectMeta)
var syncPolicies []string
syncPolicy := app.Spec.SyncPolicy
if syncPolicy != nil {
if syncPolicy.Automated.SelfHeal {
syncPolicies = append(syncPolicies, "selfHeal")
}
if syncPolicy.Automated.Prune {
syncPolicies = append(syncPolicies, "prune")
}
}
r.Fields = Fields{
app.Name,
string(app.Status.Sync.Status),