Skip to content

Commit

Permalink
Do not remove the resources if status.Manifests is empty (#1665)
Browse files Browse the repository at this point in the history
Co-authored-by: Vincent Hou <[email protected]>
  • Loading branch information
knative-prow-robot and houshengbo authored Jan 9, 2024
1 parent 2e186fe commit 605847f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/reconciler/knativeeventing/knativeeventing.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ func (r *Reconciler) injectNamespace(ctx context.Context, manifest *mf.Manifest,

func (r *Reconciler) installed(ctx context.Context, instance base.KComponent) (*mf.Manifest, error) {
paths := instance.GetStatus().GetManifests()
if len(paths) == 0 {
return nil, nil
}
installed, err := common.FetchManifestFromArray(paths)

if err != nil {
Expand Down
3 changes: 3 additions & 0 deletions pkg/reconciler/knativeserving/knativeserving.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ func (r *Reconciler) injectNamespace(ctx context.Context, manifest *mf.Manifest,

func (r *Reconciler) installed(ctx context.Context, instance base.KComponent) (*mf.Manifest, error) {
paths := instance.GetStatus().GetManifests()
if len(paths) == 0 {
return nil, nil
}
installed, err := common.FetchManifestFromArray(paths)
if err != nil {
return &installed, err
Expand Down

0 comments on commit 605847f

Please sign in to comment.