helmdeployer

package
v0.7.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2023 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Overview

Copyright The Helm Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	BundleIDAnnotation           = "fleet.cattle.io/bundle-id"
	CommitAnnotation             = "fleet.cattle.io/commit"
	AgentNamespaceAnnotation     = "fleet.cattle.io/agent-namespace"
	ServiceAccountNameAnnotation = "fleet.cattle.io/service-account"
	DefaultServiceAccount        = "fleet-default"
	KeepResourcesAnnotation      = "fleet.cattle.io/keep-resources"
	HelmUpgradeInterruptedError  = "another operation (install/upgrade/rollback) is in progress"
)

Variables

View Source
var (
	ErrNoRelease    = errors.New("failed to find release")
	ErrNoResourceID = errors.New("no resource ID available")
	DefaultKey      = "values.yaml"
)

Functions

func GetSetID added in v0.4.0

func GetSetID(bundleID, labelPrefix, labelSuffix string) string

GetSetID constructs a identifier from the provided args, bundleID "fleet-agent" is special

func Template

func Template(bundleID string, manifest *manifest.Manifest, options fleet.BundleDeploymentOptions) ([]runtime.Object, error)

Template runs helm template and returns the resources as a list of objects, without applying them.

Types

type DeployedBundle added in v0.4.0

type DeployedBundle struct {
	// BundleID is the bundle.Name
	BundleID string
	// ReleaseName is actually in the form "namespace/release name"
	ReleaseName string
	// KeepResources indicate if resources should be kept when deleting a GitRepo or Bundle
	KeepResources bool
}

type Helm added in v0.4.0

type Helm struct {
	// contains filtered or unexported fields
}

func NewHelm

func NewHelm(namespace, defaultNamespace, labelPrefix, labelSuffix string, getter genericclioptions.RESTClientGetter,
	serviceAccountCache corecontrollers.ServiceAccountCache, configmapCache corecontrollers.ConfigMapCache, secretCache corecontrollers.SecretCache) (*Helm, error)

func (*Helm) Delete added in v0.4.0

func (h *Helm) Delete(bundleID, releaseName string) error

Delete the release for the given bundleID. releaseName is a key in the format "namespace/name". If releaseName is empty, search for a matching release.

func (*Helm) Deploy added in v0.4.0

func (h *Helm) Deploy(bundleID string, manifest *manifest.Manifest, options fleet.BundleDeploymentOptions) (*Resources, error)

func (*Helm) EnsureInstalled added in v0.4.0

func (h *Helm) EnsureInstalled(bundleID, resourcesID string) (bool, error)

func (*Helm) ListDeployments added in v0.4.0

func (h *Helm) ListDeployments() ([]DeployedBundle, error)

ListDeployments returns a list of bundles by listing all helm releases via helm's storage driver (secrets)

func (*Helm) Resources added in v0.4.0

func (h *Helm) Resources(bundleID, resourcesID string) (*Resources, error)

func (*Helm) ResourcesFromPreviousReleaseVersion added in v0.6.0

func (h *Helm) ResourcesFromPreviousReleaseVersion(bundleID, resourcesID string) (*Resources, error)

type Resources added in v0.4.0

type Resources struct {
	ID               string           `json:"id,omitempty"`
	DefaultNamespace string           `json:"defaultNamespace,omitempty"`
	Objects          []runtime.Object `json:"objects,omitempty"`
}

Jump to

Keyboard shortcuts

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