MCPcopy
hub / github.com/helm/helm / ListDeployed

Method ListDeployed

pkg/storage/storage.go:140–152  ·  view source on GitHub ↗

ListDeployed returns all releases with Status == DEPLOYED. An error is returned if the storage backend fails to retrieve the releases.

()

Source from the content-addressed store, hash-verified

138// ListDeployed returns all releases with Status == DEPLOYED. An error is returned
139// if the storage backend fails to retrieve the releases.
140func (s *Storage) ListDeployed() ([]release.Releaser, error) {
141 s.Logger().Debug("listing all deployed releases in storage")
142 return s.List(func(rls release.Releaser) bool {
143 rel, err := releaserToV1Release(rls)
144 if err != nil {
145 // This will only happen if calling code does not pass the proper types. This is
146 // a problem with the application and not user data.
147 s.Logger().Error("unable to convert release to typed release", slog.Any("error", err))
148 panic(fmt.Sprintf("unable to convert release to typed release: %s", err))
149 }
150 return relutil.StatusFilter(common.StatusDeployed).Check(rel)
151 })
152}
153
154// Deployed returns the last deployed release with the provided release name, or
155// returns driver.NewErrNoDeployedReleases if not found.

Callers

nothing calls this directly

Calls 5

releaserToV1ReleaseFunction · 0.70
LoggerMethod · 0.65
ListMethod · 0.65
ErrorMethod · 0.45
CheckMethod · 0.45

Tested by

no test coverage detected