helm

package
v0.0.0-...-0a5baa5 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: Apache-2.0 Imports: 30 Imported by: 4

Documentation

Index

Constants

View Source
const (
	ErrReleaseNotFound = "release: not found"
)

Variables

View Source
var (
	ExpectedResourceKind = []string{"Deployment", "ReplicaSet", "StatefulSet"}
)

Functions

This section is empty.

Types

type Client

type Client interface {
	ListRelease(namespace string) ([]*Release, error)
	//ExecuteTest(request *TestReleaseRequest, username, password string) (*TestReleaseResponse, error)
	InstallRelease(request *InstallReleaseRequest, username, password string) (*Release, error)
	PreInstallRelease(request *InstallReleaseRequest, username, password string) ([]*ReleaseHook, error)
	PreUpgradeRelease(request *UpgradeReleaseRequest, username, password string) ([]*ReleaseHook, error)
	UpgradeRelease(request *UpgradeReleaseRequest, username, password string) (*Release, error)
	DeleteRelease(request *DeleteReleaseRequest) (*release.UninstallReleaseResponse, error)
	StartRelease(request *StartReleaseRequest, cluster *kubernetes.Cluster) (*StartReleaseResponse, error)
	StopRelease(request *StopReleaseRequest, cluster *kubernetes.Cluster) (*StopReleaseResponse, error)
	GetRelease(request *GetReleaseContentRequest) (*Release, error)
	DeleteNamespaceReleases(namespaces string) error
	//GetReleaseContent(request *GetReleaseContentRequest) (*Release, error)
	//RollbackRelease(request *RollbackReleaseRequest) (*Release, error)
	GetKubeClient() (envkube.Client, error)
	ApplyCertManagerCrd() error
}

func NewClient

func NewClient(kubeClient envkube.Client, config *rest.Config) Client

type DeleteReleaseRequest

type DeleteReleaseRequest struct {
	ReleaseName string `json:"releaseName,omitempty"`
	Namespace   string `json:"namespace,omitempty"`
}

type GetReleaseContentRequest

type GetReleaseContentRequest struct {
	ReleaseName string `json:"releaseName,omitempty"`
	Version     int32  `json:"version,omitempty"`
	Namespace   string `json:"namespace,omitempty"`
}

type InstallReleaseRequest

type InstallReleaseRequest struct {
	RepoURL                  string                         `json:"repoUrl,omitempty"`
	ChartName                string                         `json:"chartName,omitempty"`
	ChartVersion             string                         `json:"chartVersion,omitempty"`
	Values                   string                         `json:"values,omitempty"`
	ReleaseName              string                         `json:"releaseName,omitempty"`
	Commit                   string                         `json:"commit,omitempty"`
	Command                  int64                          `json:"command,omitempty"`
	V1Command                string                         `json:"v1Command,omitempty"`
	Namespace                string                         `json:"namespace,omitempty"`
	AppServiceId             int64                          `json:"appServiceId,omitempty"`
	V1AppServiceId           string                         `json:"v1AppServiceId,omitempty"`
	ImagePullSecrets         []core_v1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
	FailedCount              int                            `json:"failedCount,omitempty"`
	LasttimeFailedInstallErr string                         `json:"lasttimeFailedInstallErr"`
}

type Release

type Release struct {
	Name         string             `json:"name,omitempty"`
	Revision     int                `json:"revision,omitempty"`
	Namespace    string             `json:"namespace,omitempty"`
	Status       string             `json:"status,omitempty"`
	ChartName    string             `json:"chartName,omitempty"`
	ChartVersion string             `json:"chartVersion,omitempty"`
	Manifest     string             `json:"-"`
	Hooks        []*ReleaseHook     `json:"hooks,omitempty"`
	Resources    []*ReleaseResource `json:"resources,omitempty"`
	Config       string             `json:"config,omitempty"`
	Commit       string             `json:"commit,omitempty"`
	Command      int64              `json:"command,omitempty"`
	V1Command    string             `json:"v1Command,omitempty"`
}

安装或者升级 返回值。

type ReleaseHook

type ReleaseHook struct {
	Name        string `json:"name,omitempty"`
	Kind        string `json:"kind,omitempty"`
	Manifest    string `json:"manifest,omitempty"`
	Weight      int    `json:"weight,omitempty"`
	ReleaseName string `json:"releaseName,omitempty"`
}

type ReleaseResource

type ReleaseResource struct {
	Group           string `json:"group,omitempty"`
	Version         string `json:"version,omitempty"`
	Kind            string `json:"kind,omitempty"`
	Name            string `json:"name,omitempty"`
	ResourceVersion string `json:"resourceVersion,omitempty"`
	Object          string `json:"object,omitempty"`
}

type RollbackReleaseRequest

type RollbackReleaseRequest struct {
	ReleaseName string `json:"releaseName,omitempty"`
	Version     int    `json:"version,omitempty"`
}

type StartReleaseRequest

type StartReleaseRequest struct {
	ReleaseName string `json:"releaseName,omitempty"`
	Namespace   string `json:"namespace,omitempty"`
}

type StartReleaseResponse

type StartReleaseResponse struct {
	ReleaseName string `json:"releaseName,omitempty"`
}

type StopReleaseRequest

type StopReleaseRequest struct {
	ReleaseName string `json:"releaseName,omitempty"`
	Namespace   string `json:"namespace,omitempty"`
}

type StopReleaseResponse

type StopReleaseResponse struct {
	ReleaseName string `json:"releaseName,omitempty"`
	Namespace   string `json:"namespace,omitempty"`
}

type SyncRequest

type SyncRequest struct {
	ResourceType   string `json:"resourceType,omitempty"`
	ResourceName   string `json:"resourceName,omitempty"`
	Commit         string `json:"commit,omitempty"`
	Id             int64  `json:"id,omitempty"`
	Namespace      string `json:"namespace,omitempty"`
	ResourceStatus string `json:"resourceStatus,omitempty"`
}

type TestJobFinished

type TestJobFinished struct {
	Succeed bool   `json:"succeed,omitempty"`
	Log     string `json:"log,omitempty"`
}

type TestReleaseRequest

type TestReleaseRequest struct {
	RepoURL          string                         `json:"repoUrl,omitempty"`
	ChartName        string                         `json:"chartName,omitempty"`
	ChartVersion     string                         `json:"chartVersion,omitempty"`
	Values           string                         `json:"values,omitempty"`
	ReleaseName      string                         `json:"releaseName,omitempty"`
	Label            string                         `json:"label,omitempty"`
	ImagePullSecrets []core_v1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
}

type TestReleaseResponse

type TestReleaseResponse struct {
	ReleaseName string `json:"releaseName,omitempty"`
}

type TestReleaseStatus

type TestReleaseStatus struct {
	ReleaseName string `json:"releaseName,omitempty"`
	Status      string `json:"status,omitempty"`
}

type TestStatusResponse

type TestStatusResponse struct {
	ReleaseName   string `json:"releaseName,omitempty"`
	Pod           string `json:"pod,omitempty"`
	ReleaseStatus string `json:"releaseStatus,omitempty"`
}

type UpgradeReleaseRequest

type UpgradeReleaseRequest struct {
	ReleaseName      string                         `json:"releaseName,omitempty"`
	RepoURL          string                         `json:"repoUrl,omitempty,omitempty"`
	ChartName        string                         `json:"chartName,omitempty"`
	ChartVersion     string                         `json:"chartVersion,omitempty"`
	Values           string                         `json:"values,omitempty"`
	Command          int64                          `json:"command,omitempty"`
	V1Command        string                         `json:"v1Command,omitempty"`
	Commit           string                         `json:"commit,omitempty"`
	Namespace        string                         `json:"namespace,omitempty"`
	AppServiceId     int64                          `json:"appServiceId,omitempty"`
	V1AppServiceId   string                         `json:"v1AppServiceId,omitempty"`
	ImagePullSecrets []core_v1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
	ReUseValues      bool                           `json:"reUseValues"`
}

Directories

Path Synopsis
v2
v3

Jump to

Keyboard shortcuts

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