objects

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 50 Imported by: 0

Documentation

Index

Constants

View Source
const AnnRepo = "helm-dashboard/repository-name"

Variables

This section is empty.

Functions

func ParseManifests

func ParseManifests(out string) ([]*v1.Carp, error)

Types

type Application

type Application struct {
	Settings   *cli.EnvSettings
	HelmConfig HelmNSConfigGetter

	K8s *K8s

	Releases     *Releases
	Repositories *Repositories
}

func NewApplication

func NewApplication(settings *cli.EnvSettings, helmConfig HelmNSConfigGetter, namespaces []string, devel bool) (*Application, error)

type ArtifactHubRepo added in v1.2.0

type ArtifactHubRepo struct {
	Url                     string `json:"url"`
	Kind                    int    `json:"kind"`
	Name                    string `json:"name"`
	Official                bool   `json:"official"`
	DisplayName             string `json:"display_name"`
	RepositoryId            string `json:"repository_id"`
	ScannerDisabled         bool   `json:"scanner_disabled"`
	OrganizationName        string `json:"organization_name"`
	VerifiedPublisher       bool   `json:"verified_publisher"`
	OrganizationDisplayName string `json:"organization_display_name"`
}

type ArtifactHubResult added in v1.2.0

type ArtifactHubResult struct {
	PackageId                    string          `json:"package_id"`
	Name                         string          `json:"name"`
	NormalizedName               string          `json:"normalized_name"`
	LogoImageId                  string          `json:"logo_image_id"`
	Stars                        int             `json:"stars"`
	Description                  string          `json:"description"`
	Version                      string          `json:"version"`
	AppVersion                   string          `json:"app_version"`
	Deprecated                   bool            `json:"deprecated"`
	Signed                       bool            `json:"signed"`
	ProductionOrganizationsCount int             `json:"production_organizations_count"`
	Ts                           int             `json:"ts"`
	Repository                   ArtifactHubRepo `json:"repository"`
}

func QueryArtifactHub added in v1.2.0

func QueryArtifactHub(chartName string) ([]*ArtifactHubResult, error)

type ArtifactHubResults added in v1.2.0

type ArtifactHubResults struct {
	Packages []*ArtifactHubResult `json:"packages"`
}

type Cache

type Cache struct {
	Marshaler *marshaler.Marshaler `json:"-"`
	HitCount  int
	MissCount int
}

func NewCache

func NewCache() *Cache

func (*Cache) Clear

func (c *Cache) Clear() error

func (*Cache) Invalidate

func (c *Cache) Invalidate(tags ...CacheKey)

func (*Cache) String

func (c *Cache) String(key CacheKey, tags []string, callback func() (string, error)) (string, error)

type CacheKey

type CacheKey = string

type DataLayer

type DataLayer struct {
	KubeContext string
	Scanners    []subproc.Scanner
	StatusInfo  *StatusInfo
	Namespaces  []string
	Cache       *Cache

	ConfGen HelmConfigGetter

	LocalCharts []string
	// contains filtered or unexported fields
}

func NewDataLayer

func NewDataLayer(ns []string, ver string, cg HelmConfigGetter, devel bool) (*DataLayer, error)

func (*DataLayer) AppForCtx

func (d *DataLayer) AppForCtx(ctx string) (*Application, error)

func (*DataLayer) GetStatus

func (d *DataLayer) GetStatus() *StatusInfo

func (*DataLayer) ListContexts

func (d *DataLayer) ListContexts() ([]KubeContext, error)

func (*DataLayer) PeriodicTasks

func (d *DataLayer) PeriodicTasks(ctx context.Context)

func (*DataLayer) SetContext

func (d *DataLayer) SetContext(ctx string) error

type HelmConfigGetter

type HelmConfigGetter = func(sett *cli.EnvSettings, ns string) (*action.Configuration, error)

type HelmNSConfigGetter

type HelmNSConfigGetter = func(ns string) (*action.Configuration, error)

type HelmRepo added in v1.1.0

type HelmRepo struct {
	Settings *cli.EnvSettings
	Orig     *repo.Entry
	// contains filtered or unexported fields
}

func (*HelmRepo) ByName added in v1.1.0

func (r *HelmRepo) ByName(name string) (repo.ChartVersions, error)

func (*HelmRepo) Charts added in v1.1.0

func (r *HelmRepo) Charts() (repo.ChartVersions, error)

func (*HelmRepo) Name added in v1.1.0

func (r *HelmRepo) Name() string

func (*HelmRepo) URL added in v1.1.0

func (r *HelmRepo) URL() string

func (*HelmRepo) Update added in v1.1.0

func (r *HelmRepo) Update() error

type K8s

type K8s struct {
	Namespaces       []string
	Factory          kube.Factory
	RestClientGetter genericclioptions.RESTClientGetter
}

func NewK8s

func NewK8s(helmConfig *action.Configuration, namespaces []string) (*K8s, error)

func (*K8s) DescribeResource

func (k *K8s) DescribeResource(kind string, ns string, name string) (string, error)

func (*K8s) GetNameSpaces

func (k *K8s) GetNameSpaces() (res *corev1.NamespaceList, err error)

func (*K8s) GetResource

func (k *K8s) GetResource(kind string, namespace string, name string) (*runtime.Object, error)

func (*K8s) GetResourceInfo

func (k *K8s) GetResourceInfo(kind string, namespace string, name string) (*testapiv1.Carp, error)

func (*K8s) GetResourceYAML

func (k *K8s) GetResourceYAML(kind string, namespace string, name string) (string, error)

type KubeContext

type KubeContext struct {
	IsCurrent bool
	Name      string
	Cluster   string
	AuthInfo  string
	Namespace string
}

type LocalChart added in v1.1.0

type LocalChart struct {
	LocalCharts []string
	// contains filtered or unexported fields
}

func (*LocalChart) ByName added in v1.1.0

func (l *LocalChart) ByName(name string) (repo.ChartVersions, error)

func (*LocalChart) Charts added in v1.1.0

func (l *LocalChart) Charts() (repo.ChartVersions, error)

func (*LocalChart) Name added in v1.1.0

func (l *LocalChart) Name() string

func (*LocalChart) URL added in v1.1.0

func (l *LocalChart) URL() string

func (*LocalChart) Update added in v1.1.0

func (l *LocalChart) Update() error

Update reloads the chart information from disk

type Release

type Release struct {
	Settings   *cli.EnvSettings
	HelmConfig HelmNSConfigGetter
	Orig       *release.Release
	// contains filtered or unexported fields
}

func (*Release) GetRev

func (r *Release) GetRev(revNo int) (*Release, error)

func (*Release) History

func (r *Release) History() ([]*Release, error)

func (*Release) ParsedManifests

func (r *Release) ParsedManifests() ([]*v1.Carp, error)

func (*Release) Rollback

func (r *Release) Rollback(toRevision int) error

func (*Release) RunTests

func (r *Release) RunTests() (string, error)

func (*Release) Uninstall

func (r *Release) Uninstall() error

func (*Release) Upgrade

func (r *Release) Upgrade(repoChart string, version string, justTemplate bool, values map[string]interface{}) (*release.Release, error)

type Releases

type Releases struct {
	Namespaces []string
	HelmConfig HelmNSConfigGetter
	Settings   *cli.EnvSettings
	// contains filtered or unexported fields
}

func (*Releases) ByName

func (a *Releases) ByName(namespace string, name string) (*Release, error)

func (*Releases) Install

func (a *Releases) Install(namespace string, name string, repoChart string, version string, justTemplate bool, values map[string]interface{}) (*release.Release, error)

func (*Releases) List

func (a *Releases) List() ([]*Release, error)

type Repositories

type Repositories struct {
	Settings   *cli.EnvSettings
	HelmConfig *action.Configuration

	LocalCharts []string
	// contains filtered or unexported fields
}

func (*Repositories) Add

func (r *Repositories) Add(name string, url string, username string, password string) error

func (*Repositories) Containing

func (r *Repositories) Containing(name string) (repo.ChartVersions, error)

Containing returns list of chart versions for the given chart name, across all repositories

func (*Repositories) Delete

func (r *Repositories) Delete(name string) error

func (*Repositories) Get

func (r *Repositories) Get(name string) (Repository, error)

func (*Repositories) GetChartValues

func (r *Repositories) GetChartValues(chart string, ver string) (string, error)

func (*Repositories) List

func (r *Repositories) List() ([]Repository, error)

type Repository

type Repository interface {
	Name() string
	URL() string
	Update() error
	Charts() (repo.ChartVersions, error)
	ByName(name string) (repo.ChartVersions, error)
}

type SectionFn

type SectionFn = func(*release.Release, bool) (string, error)

type StatusInfo

type StatusInfo struct {
	CurVer        string
	LatestVer     string
	Analytics     bool
	CacheHitRatio float64
	ClusterMode   bool
}

Jump to

Keyboard shortcuts

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