mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 07:49:41 +02:00
fix(kubernetes): Config maps and secrets show as unused BE-11684 (#596)
Co-authored-by: stevensbkang <skan070@gmail.com>
This commit is contained in:
parent
264ff5457b
commit
64c796a8c3
6 changed files with 91 additions and 133 deletions
|
@ -130,13 +130,11 @@ func (handler *Handler) getAllKubernetesSecrets(r *http.Request) ([]models.K8sSe
|
|||
}
|
||||
|
||||
if isUsed {
|
||||
secretsWithApplications, err := cli.CombineSecretsWithApplications(secrets)
|
||||
err = cli.SetSecretsIsUsed(&secrets)
|
||||
if err != nil {
|
||||
log.Error().Err(err).Str("context", "GetAllKubernetesSecrets").Msg("Unable to combine secrets with associated applications")
|
||||
return nil, httperror.InternalServerError("unable to combine secrets with associated applications. Error: ", err)
|
||||
}
|
||||
|
||||
return secretsWithApplications, nil
|
||||
}
|
||||
|
||||
return secrets, nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue