Skip to content

Commit

Permalink
Don't override compileMeta in cluster patch requests
Browse files Browse the repository at this point in the history
  • Loading branch information
bastjan committed Jun 4, 2024
1 parent 2dde25c commit ab1ab05
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/api/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -382,11 +382,13 @@ func SyncCRDFromAPICluster(source ClusterProperties, target *synv1alpha1.Cluster
}
}

clcm, err := apiCompileMetaToCRDCompileMeta(source.CompileMeta)
if err != nil {
return fmt.Errorf("failed to convert compile meta: %w", err)
if source.CompileMeta != nil {
clcm, err := apiCompileMetaToCRDCompileMeta(source.CompileMeta)
if err != nil {
return fmt.Errorf("failed to convert compile meta: %w", err)
}
target.Status.CompileMeta = clcm
}
target.Status.CompileMeta = clcm

return nil
}
Expand Down

0 comments on commit ab1ab05

Please sign in to comment.