Skip to content

Commit

Permalink
Add missing error checking
Browse files Browse the repository at this point in the history
  • Loading branch information
marccampbell committed Aug 8, 2020
1 parent fb4ec19 commit 374bc97
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion kotsadm/pkg/secrets/sealed_secrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ func replaceSecretsWithSealedSecrets(archivePath string, config map[string][]byt
return nil
}

secret := decoded.(*v1.Secret)
secret, ok := decoded.(*v1.Secret)
if !ok {
return nil
}

// sealed secrets require a namespace
if secret.Namespace == "" {
Expand Down

0 comments on commit 374bc97

Please sign in to comment.