driver

package
v0.5.8 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2023 License: Apache-2.0 Imports: 38 Imported by: 2

Documentation

Overview

nolint:unparam

Index

Constants

View Source
const ApplicationsDriverName = "storage.x-helm.dev/apps"

ApplicationsDriverName is the string name of the driver.

Variables

This section is empty.

Functions

func ParseKey

func ParseKey(key string) (string, int, error)

ParseKey returns release name and version from a key generated by makeKey. ref: https://github.com/helm/helm/blob/241785c70fb38b2c074d7b3ddf0925812fb3fc69/pkg/storage/storage.go#L242-L250

func ResourceFilename

func ResourceFilename(apiVersion, kind, chartName, name string) (string, string, string)

func ResourceKey

func ResourceKey(apiVersion, kind, chartName, name string) (string, error)

Types

type Applications

type Applications struct {
	Log func(string, ...interface{})
	// contains filtered or unexported fields
}

Applications is a wrapper around an implementation of a kubernetes ApplicationsInterface.

func NewApplications

NewApplications initializes a new Applications wrapping an implementation of the kubernetes ApplicationsInterface.

func (*Applications) Create

func (d *Applications) Create(_ string, rls *rspb.Release) error

Create creates a new Application holding the release. If the Application already exists, ErrReleaseExists is returned.

func (*Applications) Delete

func (d *Applications) Delete(key string) (rls *rspb.Release, err error)

Delete deletes the Application holding the release named by key.

func (*Applications) Get

func (d *Applications) Get(key string) (*rspb.Release, error)

Get fetches the release named by key. The corresponding release is returned or error if not found.

func (*Applications) List

func (d *Applications) List(filter func(*rspb.Release) bool) ([]*rspb.Release, error)

List fetches all releases and returns the list releases such that filter(release) == true. An error is returned if the configmap fails to retrieve the releases.

func (*Applications) Name

func (d *Applications) Name() string

Name returns the name of the driver.

func (*Applications) Query

func (d *Applications) Query(labels map[string]string) ([]*rspb.Release, error)

Query fetches all releases that match the provided map of labels. An error is returned if the configmap fails to retrieve the releases.

func (*Applications) Update

func (d *Applications) Update(_ string, rls *rspb.Release) error

Update updates the Application holding the release. If not found the Application is created to hold the release.

type EditorTemplate

type EditorTemplate struct {
	Manifest []byte                     `json:"manifest,omitempty"`
	Values   *unstructured.Unstructured `json:"values,omitempty"`
}

Jump to

Keyboard shortcuts

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