Skip to content

Commit

Permalink
secret: adjust delete() returns (#753)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebrandon1 authored Nov 1, 2024
1 parent 3c80002 commit d7167fc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/secret/secret.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@ func (builder *Builder) Delete() error {
glog.V(100).Infof("Deleting the secret %s from namespace %s", builder.Definition.Name, builder.Definition.Namespace)

if !builder.Exists() {
glog.V(100).Infof("Secret %s does not exist in namespace %s",
builder.Definition.Name, builder.Definition.Namespace)

builder.Object = nil

return nil
}

Expand All @@ -157,7 +162,7 @@ func (builder *Builder) Delete() error {

builder.Object = nil

return err
return nil
}

// Exists checks whether the given secret exists.
Expand Down

0 comments on commit d7167fc

Please sign in to comment.