manifest

package
v0.0.0-...-7f9a46d Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChartInfo

type ChartInfo struct {
	ChartPath    string
	RepoName     string
	URL          string
	ChartName    string
	ReleaseName  string
	ClientConfig map[string]interface{}
	Overrides    map[string]interface{}
}

ChartInfo defines chart information.

type HelmClient

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

func NewHelmClient

func NewHelmClient(kubeClient *kube.Client, restGetter *manifestRest.ManifestRESTClientGetter,
	restConfig *rest.Config, settings *cli.EnvSettings,
) (*HelmClient, error)

func (*HelmClient) CheckReadyState

func (h *HelmClient) CheckReadyState(ctx context.Context, targetResources kube.ResourceList,
) (bool, error)

func (*HelmClient) CheckWaitForResources

func (h *HelmClient) CheckWaitForResources(targetResources kube.ResourceList, actionClient *action.Install,
	operation HelmOperation,
) error

func (*HelmClient) DownloadChart

func (h *HelmClient) DownloadChart(actionClient *action.Install, chartName string) (string, error)

func (*HelmClient) GetTargetResources

func (h *HelmClient) GetTargetResources(ctx context.Context, manifest string, targetNamespace string,
	transforms []types.ObjectTransform, object types.BaseCustomObject,
) (kube.ResourceList, error)

func (*HelmClient) HandleNamespace

func (h *HelmClient) HandleNamespace(actionClient *action.Install, operationType HelmOperation) error

func (*HelmClient) NewInstallActionClient

func (h *HelmClient) NewInstallActionClient(namespace, releaseName string, args map[string]map[string]interface{},
) (*action.Install, error)

func (*HelmClient) NewUninstallActionClient

func (h *HelmClient) NewUninstallActionClient(namespace string) (*action.Uninstall, error)

func (*HelmClient) PerformCreate

func (h *HelmClient) PerformCreate(targetResources kube.ResourceList) (*kube.Result, error)

func (*HelmClient) PerformUpdate

func (h *HelmClient) PerformUpdate(existingResources, targetResources kube.ResourceList, force bool,
) (*kube.Result, error)

func (*HelmClient) SetDefaultClientConfig

func (h *HelmClient) SetDefaultClientConfig(actionClient *action.Install, releaseName string)

func (*HelmClient) SetFlags

func (h *HelmClient) SetFlags(args map[string]map[string]interface{}, actionClient *action.Install) error

type HelmOperation

type HelmOperation OperationType
const (
	OperationCreate HelmOperation = "create"
	OperationDelete HelmOperation = "delete"
)

type InstallInfo

type InstallInfo struct {
	*ChartInfo
	ResourceInfo
	custom.RemoteInfo
	Ctx              context.Context //nolint:containedctx
	CheckFn          custom.CheckFnType
	CheckReadyStates bool
}

TODO: move Ctx out of struct.

type InstallResponse

type InstallResponse struct {
	Ready             bool
	ChartName         string
	ClientConfig      map[string]interface{}
	Overrides         map[string]interface{}
	ResNamespacedName client.ObjectKey
	Err               error
}

nolint:errname

func (*InstallResponse) Error

func (r *InstallResponse) Error() string

type Mode

type Mode int
const (
	CreateMode Mode = iota
	DeletionMode
)

type OperationType

type OperationType string

type Operations

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

func NewOperations

func NewOperations(logger *logr.Logger, restConfig *rest.Config, releaseName string, settings *cli.EnvSettings,
	args map[string]map[string]interface{}, resourceTransforms []types.ObjectTransform,
) (*Operations, error)

func (*Operations) Install

func (o *Operations) Install(deployInfo InstallInfo) (bool, error)

func (*Operations) Uninstall

func (o *Operations) Uninstall(deployInfo InstallInfo) (bool, error)

func (*Operations) VerifyResources

func (o *Operations) VerifyResources(deployInfo InstallInfo) (bool, error)

type RepoHandler

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

func NewRepoHandler

func NewRepoHandler(logger *logr.Logger, settings *cli.EnvSettings) *RepoHandler

func (*RepoHandler) Add

func (r *RepoHandler) Add(repoName string, url string, logger *logr.Logger) error

func (*RepoHandler) LoadChart

func (r *RepoHandler) LoadChart(chartPath string, actionClient *action.Install) (*chart.Chart, error)

func (*RepoHandler) Update

func (r *RepoHandler) Update(ctx context.Context) error

type ResourceInfo

type ResourceInfo struct {
	BaseResource    *unstructured.Unstructured
	CustomResources []*unstructured.Unstructured
	Crds            []*apiextensions.CustomResourceDefinition
}

type ResponseChan

type ResponseChan chan *InstallResponse

Jump to

Keyboard shortcuts

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