helm

package
v1.108.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 58 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HelmReleaseSecretType = "helm.sh/release.v1"
)

Variables

This section is empty.

Functions

func AddHelmApp

func AddHelmApp(releaseName string, helmApp *apptypes.HelmApp)

func CreateHelmRegistryCreds

func CreateHelmRegistryCreds(username string, password string, url string) error

func GetCachedHelmApps

func GetCachedHelmApps() []string

func GetChartConfigSecret

func GetChartConfigSecret(helmApp *apptypes.HelmApp) (*corev1.Secret, error)

func GetChartLicenseFromSecretOrDownload added in v1.82.0

func GetChartLicenseFromSecretOrDownload(helmApp *apptypes.HelmApp) (*kotsv1beta1.License, error)

func GetChartSecret

func GetChartSecret(releaseName, namespace, version string) (*helmrelease.Release, error)

func GetConfigValuesMap added in v1.82.0

func GetConfigValuesMap(configValues *kotsv1beta1.ConfigValues) (map[string]interface{}, error)

func GetHelmApp

func GetHelmApp(releaseName string) *apptypes.HelmApp

func GetKotsKindsForRevision added in v1.82.0

func GetKotsKindsForRevision(releaseName string, revision int64, namespace string) (kotsutil.KotsKinds, error)

func GetKotsKindsFromHelmApp added in v1.84.0

func GetKotsKindsFromHelmApp(helmApp *apptypes.HelmApp) (kotsutil.KotsKinds, error)

func GetKotsKindsFromReplicatedSecret added in v1.84.0

func GetKotsKindsFromReplicatedSecret(secret *corev1.Secret) (kotsutil.KotsKinds, error)

func GetKotsKindsFromUpstreamChartVersion added in v1.85.0

func GetKotsKindsFromUpstreamChartVersion(helmApp *apptypes.HelmApp, licenseID string, version string) (kotsutil.KotsKinds, error)

func GetKotsLicenseID

func GetKotsLicenseID(release *helmrelease.Release) string

func GetMergedValues

func GetMergedValues(releasedValues, renderedValues map[string]interface{}) (map[string]interface{}, error)

func GetReplicatedSecretForRevision added in v1.86.0

func GetReplicatedSecretForRevision(releaseName string, revision int64, namespace string) (*corev1.Secret, error)

func GetReplicatedSecretFromUpstreamChartVersion added in v1.86.0

func GetReplicatedSecretFromUpstreamChartVersion(helmApp *apptypes.HelmApp, licenseID string, version string) (*corev1.Secret, error)

func GetUpdateCheckSpec added in v1.86.1

func GetUpdateCheckSpec(helmApp *apptypes.HelmApp) (string, error)

func HelmReleaseFromSecretData

func HelmReleaseFromSecretData(data []byte) (*helmrelease.Release, error)

func HelmUpdateToDownsreamVersion added in v1.85.0

func HelmUpdateToDownsreamVersion(update ChartUpdate, sequence int64) *downstreamtypes.DownstreamVersion

func Init

func Init(ctx context.Context) error

func MigrateExistingHelmReleaseSecrets added in v1.96.2

func MigrateExistingHelmReleaseSecrets(clientset kubernetes.Interface, releaseName string, releaseNamespace string, kotsadmNamespace string) error

MigrateExistingHelmReleaseSecrets will move all helm release secrets from the kotsadm namespace to the release namespace

func RemoveHelmApp

func RemoveHelmApp(releaseName string)

func RenderValuesFromConfig

func RenderValuesFromConfig(helmApp *apptypes.HelmApp, kotsKinds *kotsutil.KotsKinds, chart []byte) (map[string]interface{}, error)

func ResponseAppFromHelmApp added in v1.85.0

func ResponseAppFromHelmApp(helmApp *apptypes.HelmApp) (*types.HelmResponseApp, error)

func SaveChartLicenseInSecret

func SaveChartLicenseInSecret(helmApp *apptypes.HelmApp, licenseData []byte) error

Always save original data returned from the server without remarshaling.

func SetCachedUpdateMetadata added in v1.88.0

func SetCachedUpdateMetadata(chartPath string, tag string, meta *ReplicatedMeta)

func SetCachedUpdateStatus added in v1.85.0

func SetCachedUpdateStatus(chartPath string, tag string, status storetypes.DownstreamVersionStatus)

func SetUpdateCheckSpec added in v1.86.1

func SetUpdateCheckSpec(helmApp *apptypes.HelmApp, updateSpec string) error

func SyncLicense added in v1.86.0

func SyncLicense(helmApp *apptypes.HelmApp) (bool, error)

Types

type ChartUpdate

type ChartUpdate struct {
	Tag          string
	Version      semver.Version
	Status       storetypes.DownstreamVersionStatus
	CreatedOn    *time.Time
	IsDownloaded bool
}

type ChartUpdates

type ChartUpdates []ChartUpdate

func CheckForUpdates

func CheckForUpdates(helmApp *apptypes.HelmApp, license *kotsv1beta1.License, currentVersion *semver.Version) (ChartUpdates, error)

func GetCachedUpdates

func GetCachedUpdates(chartPath string) ChartUpdates

func GetDownloadedUpdates added in v1.88.0

func GetDownloadedUpdates(chartPath string) ChartUpdates

func (ChartUpdates) Len

func (v ChartUpdates) Len() int

func (ChartUpdates) Less

func (v ChartUpdates) Less(i, j int) bool

func (ChartUpdates) Swap

func (v ChartUpdates) Swap(i, j int)

func (ChartUpdates) ToTagList

func (u ChartUpdates) ToTagList() []string

type InstalledRelease

type InstalledRelease struct {
	ReleaseName string
	Revision    int
	Version     string
	Semver      *semver.Version
	Status      helmrelease.Status
	DeployedOn  *time.Time
	ReleasedOn  *time.Time
}

Secret labels from Helm v3 code:

lbs.set("name", rls.Name) lbs.set("owner", owner) lbs.set("status", rls.Info.Status.String()) lbs.set("version", strconv.Itoa(rls.Version))

func GetChartVersion added in v1.83.0

func GetChartVersion(releaseName string, revision int64, namespace string) (*InstalledRelease, error)

func ListChartVersions

func ListChartVersions(releaseName string, namespace string) ([]InstalledRelease, error)

type InstalledReleases

type InstalledReleases []InstalledRelease

func (InstalledReleases) Len

func (v InstalledReleases) Len() int

func (InstalledReleases) Less

func (v InstalledReleases) Less(i, j int) bool

func (InstalledReleases) Swap

func (v InstalledReleases) Swap(i, j int)

type ReplicatedMeta added in v1.88.0

type ReplicatedMeta struct {
	LicenseID string     `yaml:"license_id"`
	Username  string     `yaml:"username"`
	CreatedAt *time.Time `yaml:"created_at"`
}

func GetReplicatedMetadataFromUpstreamChartVersion added in v1.88.0

func GetReplicatedMetadataFromUpstreamChartVersion(helmApp *apptypes.HelmApp, licenseID string, version string) (*ReplicatedMeta, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL