1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-05 05:45:22 +02:00

feat(helm): update helm view [r8s-256] (#582)

Co-authored-by: Cara Ryan <cara.ryan@portainer.io>
Co-authored-by: James Player <james.player@portainer.io>
Co-authored-by: stevensbkang <skan070@gmail.com>
This commit is contained in:
Ali 2025-04-10 16:08:24 +12:00 committed by GitHub
parent 46eddbe7b9
commit 0ca9321db1
57 changed files with 2635 additions and 222 deletions

View file

@ -1,6 +1,9 @@
package release
import "github.com/portainer/portainer/pkg/libhelm/time"
import (
"github.com/portainer/portainer/pkg/libhelm/time"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
)
// Release is the struct that holds the information for a helm release.
// The struct definitions have been copied from the official Helm Golang client/library.
@ -14,7 +17,7 @@ type ReleaseElement struct {
Updated string `json:"updated"`
Status string `json:"status"`
Chart string `json:"chart"`
AppVersion string `json:"app_version"`
AppVersion string `json:"appVersion"`
}
// Release describes a deployment of a chart, together with the chart
@ -23,7 +26,7 @@ type Release struct {
// Name is the name of the release
Name string `json:"name,omitempty"`
// Info provides information about a release
// Info *Info `json:"info,omitempty"`
Info *Info `json:"info,omitempty"`
// Chart is the chart that was released.
Chart Chart `json:"chart,omitempty"`
// Config is the set of extra Values added to the chart.
@ -40,6 +43,13 @@ type Release struct {
// Labels of the release.
// Disabled encoding into Json cause labels are stored in storage driver metadata field.
Labels map[string]string `json:"-"`
// Values are the values used to deploy the chart.
Values Values `json:"values,omitempty"`
}
type Values struct {
UserSuppliedValues string `json:"userSuppliedValues,omitempty"`
ComputedValues string `json:"computedValues,omitempty"`
}
// Chart is a helm package that contains metadata, a default config, zero or more
@ -183,6 +193,8 @@ type Info struct {
Status Status `json:"status,omitempty"`
// Contains the rendered templates/NOTES.txt if available
Notes string `json:"notes,omitempty"`
// Resources is the list of resources that are part of the release
Resources []*unstructured.Unstructured `json:"resources,omitempty"`
}
// Status is the status of a release