action

package
v0.0.0-...-e56b846 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2025 License: Apache-2.0 Imports: 74 Imported by: 15

Documentation

Index

Constants

View Source
const (
	DefaultChartRenderOutputFilename = "chart-render-output.yaml"
	DefaultChartRenderLogLevel       = log.ErrorLevel
)
View Source
const (
	DefaultQPSLimit              = 30
	DefaultBurstLimit            = 100
	DefaultNetworkParallelism    = 30
	DefaultLocalKubeVersion      = "1.20.0"
	DefaultProgressPrintInterval = 5 * time.Second
	DefaultReleaseHistoryLimit   = 10
	DefaultLogColorMode          = LogColorModeAuto

	StubReleaseName      = "stub-release"
	StubReleaseNamespace = "stub-namespace"
)
View Source
const (
	DefaultReleaseGetOutputFormat = common.YamlOutputFormat
	DefaultReleaseGetLogLevel     = log.ErrorLevel
)
View Source
const (
	DefaultReleaseInstallReportFilename = "release-install-report.json"
	DefaultReleaseInstallGraphFilename  = "release-install-graph.dot"
	DefaultReleaseInstallLogLevel       = log.InfoLevel
)
View Source
const (
	DefaultReleaseRollbackReportFilename = "release-rollback-report.json"
	DefaultReleaseRollbackGraphFilename  = "release-rollback-graph.dot"
	DefaultReleaseRollbackLogLevel       = log.InfoLevel
)
View Source
const (
	DefaultSecretFileDecryptOutputFilename = "secret-file-decrypt-output.yaml"
	DefaultSecretFileDecryptLogLevel       = log.ErrorLevel
)
View Source
const (
	DefaultSecretFileEncryptOutputFilename = "secret-file-encrypt-output.yaml"
	DefaultSecretFileEncryptLogLevel       = log.ErrorLevel
)
View Source
const (
	DefaultSecretValuesFileDecryptOutputFilename = "secret-values-file-decrypt-output.yaml"
	DefaultSecretValuesFileDecryptLogLevel       = log.ErrorLevel
)
View Source
const (
	DefaultSecretValuesFileEncryptOutputFilename = "secret-values-file-encrypt-output.yaml"
	DefaultSecretValuesFileEncryptLogLevel       = log.ErrorLevel
)
View Source
const (
	DefaultVersionOutputFormat = common.YamlOutputFormat
	DefaultVersionLogLevel     = log.ErrorLevel
)
View Source
const (
	DefaultChartLintLogLevel = log.InfoLevel
)
View Source
const (
	DefaultReleasePlanInstallLogLevel = log.InfoLevel
)
View Source
const (
	DefaultReleaseUninstallLogLevel = log.InfoLevel
)
View Source
const (
	DefaultSecretFileEditLogLevel = log.ErrorLevel
)
View Source
const (
	DefaultSecretKeyCreateLogLevel = log.ErrorLevel
)
View Source
const (
	DefaultSecretKeyRotateLogLevel = log.InfoLevel
)
View Source
const (
	DefaultSecretValuesFileEditLogLevel = log.ErrorLevel
)
View Source
const ReleaseGetResultApiVersionV1 = "v1"

Variables

View Source
var DefaultRegistryCredentialsPath = filepath.Join(homedir.Get(), ".docker", config.ConfigFileName)

Functions

func ChartLint

func ChartLint(ctx context.Context, opts ChartLintOptions) error

func ChartRender

func ChartRender(ctx context.Context, opts ChartRenderOptions) error

func ReleaseInstall

func ReleaseInstall(ctx context.Context, releaseName, releaseNamespace string, opts ReleaseInstallOptions) error

func ReleasePlanInstall

func ReleasePlanInstall(ctx context.Context, releaseName, releaseNamespace string, opts ReleasePlanInstallOptions) error

func ReleaseRollback

func ReleaseRollback(ctx context.Context, releaseName, releaseNamespace string, opts ReleaseRollbackOptions) error

func ReleaseUninstall

func ReleaseUninstall(ctx context.Context, releaseName, releaseNamespace string, opts ReleaseUninstallOptions) error

func SecretFileDecrypt

func SecretFileDecrypt(ctx context.Context, filePath string, opts SecretFileDecryptOptions) error

func SecretFileEdit

func SecretFileEdit(ctx context.Context, filePath string, opts SecretFileEditOptions) error

func SecretFileEncrypt

func SecretFileEncrypt(ctx context.Context, filePath string, opts SecretFileEncryptOptions) error

func SecretKeyCreate

func SecretKeyCreate(ctx context.Context, opts SecretKeyCreateOptions) (string, error)

func SecretKeyRotate

func SecretKeyRotate(ctx context.Context, opts SecretKeyRotateOptions) error

func SecretValuesFileDecrypt

func SecretValuesFileDecrypt(ctx context.Context, valuesFilePath string, opts SecretValuesFileDecryptOptions) error

func SecretValuesFileEdit

func SecretValuesFileEdit(ctx context.Context, valuesFilePath string, opts SecretValuesFileEditOptions) error

func SecretValuesFileEncrypt

func SecretValuesFileEncrypt(ctx context.Context, valuesFilePath string, opts SecretValuesFileEncryptOptions) error

Types

type ChartLintOptions

type ChartLintOptions struct {
	ChartAppVersion              string
	ChartDirPath                 string
	ChartRepositoryInsecure      bool
	ChartRepositorySkipTLSVerify bool
	ChartRepositorySkipUpdate    bool
	DefaultChartAPIVersion       string
	DefaultChartName             string
	DefaultChartVersion          string
	DefaultSecretValuesDisable   bool
	DefaultValuesDisable         bool
	ExtraAnnotations             map[string]string
	ExtraLabels                  map[string]string
	ExtraRuntimeAnnotations      map[string]string
	KubeAPIServerName            string
	KubeBurstLimit               int
	KubeCAPath                   string
	KubeConfigBase64             string
	KubeConfigPaths              []string
	KubeContext                  string
	KubeQPSLimit                 int
	KubeSkipTLSVerify            bool
	KubeTLSServerName            string
	KubeToken                    string
	Local                        bool
	LocalKubeVersion             string
	LogColorMode                 LogColorMode
	LogLevel                     log.Level
	LogRegistryStreamOut         io.Writer
	NetworkParallelism           int
	RegistryCredentialsPath      string
	ReleaseName                  string
	ReleaseNamespace             string
	ReleaseStorageDriver         ReleaseStorageDriver
	SecretKey                    string
	SecretKeyIgnore              bool
	SecretValuesPaths            []string
	SecretWorkDir                string
	TempDirPath                  string
	ValuesFileSets               []string
	ValuesFilesPaths             []string
	ValuesSets                   []string
	ValuesStringSets             []string
}

type ChartRenderOptions

type ChartRenderOptions struct {
	ChartAppVersion              string
	ChartDirPath                 string
	ChartRepositoryInsecure      bool
	ChartRepositorySkipTLSVerify bool
	ChartRepositorySkipUpdate    bool
	DefaultChartAPIVersion       string
	DefaultChartName             string
	DefaultChartVersion          string
	DefaultSecretValuesDisable   bool
	DefaultValuesDisable         bool
	ExtraAnnotations             map[string]string
	ExtraLabels                  map[string]string
	ExtraRuntimeAnnotations      map[string]string
	KubeAPIServerName            string
	KubeBurstLimit               int
	KubeCAPath                   string
	KubeConfigBase64             string
	KubeConfigPaths              []string
	KubeContext                  string
	KubeQPSLimit                 int
	KubeSkipTLSVerify            bool
	KubeTLSServerName            string
	KubeToken                    string
	Local                        bool
	LocalKubeVersion             string
	LogColorMode                 LogColorMode
	LogLevel                     log.Level
	LogRegistryStreamOut         io.Writer
	NetworkParallelism           int
	OutputFilePath               string
	OutputFileSave               bool
	RegistryCredentialsPath      string
	ReleaseName                  string
	ReleaseNamespace             string
	ReleaseStorageDriver         ReleaseStorageDriver
	SecretKey                    string
	SecretKeyIgnore              bool
	SecretValuesPaths            []string
	SecretWorkDir                string
	ShowCRDs                     bool
	ShowOnlyFiles                []string
	TempDirPath                  string
	ValuesFileSets               []string
	ValuesFilesPaths             []string
	ValuesSets                   []string
	ValuesStringSets             []string
}

type LogColorMode

type LogColorMode string
const (
	LogColorModeUnspecified LogColorMode = ""
	LogColorModeAuto        LogColorMode = "auto"
	LogColorModeOff         LogColorMode = "off"
	LogColorModeOn          LogColorMode = "on"
)

type ReleaseGetOptions

type ReleaseGetOptions struct {
	KubeAPIServerName    string
	KubeBurstLimit       int
	KubeCAPath           string
	KubeConfigBase64     string
	KubeConfigPaths      []string
	KubeContext          string
	KubeQPSLimit         int
	KubeSkipTLSVerify    bool
	KubeTLSServerName    string
	KubeToken            string
	LogColorMode         LogColorMode
	LogLevel             log.Level
	NetworkParallelism   int
	OutputFormat         common.OutputFormat
	OutputNoPrint        bool
	ReleaseStorageDriver ReleaseStorageDriver
	Revision             int
	TempDirPath          string
}

type ReleaseGetResultChart

type ReleaseGetResultChart struct {
	Name       string `json:"name"`
	Version    string `json:"version"`
	AppVersion string `json:"appVersion"`
}

type ReleaseGetResultDeployedAt

type ReleaseGetResultDeployedAt struct {
	Human string `json:"human"`
	Unix  int    `json:"unix"`
}

type ReleaseGetResultRelease

type ReleaseGetResultRelease struct {
	Name       string                      `json:"name"`
	Namespace  string                      `json:"namespace"`
	Revision   int                         `json:"revision"`
	Status     release.Status              `json:"status"`
	DeployedAt *ReleaseGetResultDeployedAt `json:"deployedAt"`
}

type ReleaseGetResultV1

type ReleaseGetResultV1 struct {
	ApiVersion string                   `json:"apiVersion"`
	Release    *ReleaseGetResultRelease `json:"release"`
	Chart      *ReleaseGetResultChart   `json:"chart"`
	Hooks      []map[string]interface{} `json:"hooks"`
	Resources  []map[string]interface{} `json:"resources"`
	Notes      string                   `json:"notes"`
}

func ReleaseGet

func ReleaseGet(ctx context.Context, releaseName, releaseNamespace string, opts ReleaseGetOptions) (*ReleaseGetResultV1, error)

type ReleaseInstallOptions

type ReleaseInstallOptions struct {
	AutoRollback                 bool
	ChartAppVersion              string
	ChartDirPath                 string
	ChartRepositoryInsecure      bool
	ChartRepositorySkipTLSVerify bool
	ChartRepositorySkipUpdate    bool
	DefaultChartAPIVersion       string
	DefaultChartName             string
	DefaultChartVersion          string
	DefaultSecretValuesDisable   bool
	DefaultValuesDisable         bool
	InstallGraphPath             string
	InstallGraphSave             bool
	InstallReportPath            string
	InstallReportSave            bool
	ExtraAnnotations             map[string]string
	ExtraLabels                  map[string]string
	ExtraRuntimeAnnotations      map[string]string
	KubeAPIServerName            string
	KubeBurstLimit               int
	KubeCAPath                   string
	KubeConfigBase64             string
	KubeConfigPaths              []string
	KubeContext                  string
	KubeQPSLimit                 int
	KubeSkipTLSVerify            bool
	KubeTLSServerName            string
	KubeToken                    string
	LogColorMode                 LogColorMode
	LogLevel                     log.Level
	LogRegistryStreamOut         io.Writer
	NetworkParallelism           int
	ProgressTablePrint           bool
	ProgressTablePrintInterval   time.Duration
	RegistryCredentialsPath      string
	ReleaseHistoryLimit          int
	ReleaseStorageDriver         ReleaseStorageDriver
	RollbackGraphPath            string
	RollbackGraphSave            bool
	SecretKey                    string
	SecretKeyIgnore              bool
	SecretValuesPaths            []string
	SecretWorkDir                string
	SubNotes                     bool
	TempDirPath                  string
	TrackCreationTimeout         time.Duration
	TrackDeletionTimeout         time.Duration
	TrackReadinessTimeout        time.Duration
	ValuesFileSets               []string
	ValuesFilesPaths             []string
	ValuesSets                   []string
	ValuesStringSets             []string
}

type ReleasePlanInstallOptions

type ReleasePlanInstallOptions struct {
	ChartAppVersion              string
	ChartDirPath                 string
	ChartRepositoryInsecure      bool
	ChartRepositorySkipTLSVerify bool
	ChartRepositorySkipUpdate    bool
	DefaultChartAPIVersion       string
	DefaultChartName             string
	DefaultChartVersion          string
	DefaultSecretValuesDisable   bool
	DefaultValuesDisable         bool
	ErrorIfChangesPlanned        bool
	ExtraAnnotations             map[string]string
	ExtraLabels                  map[string]string
	ExtraRuntimeAnnotations      map[string]string
	KubeAPIServerName            string
	KubeBurstLimit               int
	KubeCAPath                   string
	KubeConfigBase64             string
	KubeConfigPaths              []string
	KubeContext                  string
	KubeQPSLimit                 int
	KubeSkipTLSVerify            bool
	KubeTLSServerName            string
	KubeToken                    string
	LogColorMode                 LogColorMode
	LogLevel                     log.Level
	LogRegistryStreamOut         io.Writer
	NetworkParallelism           int
	RegistryCredentialsPath      string
	ReleaseStorageDriver         ReleaseStorageDriver
	SecretKey                    string
	SecretKeyIgnore              bool
	SecretValuesPaths            []string
	SecretWorkDir                string
	TempDirPath                  string
	ValuesFileSets               []string
	ValuesFilesPaths             []string
	ValuesSets                   []string
	ValuesStringSets             []string
}

type ReleaseRollbackOptions

type ReleaseRollbackOptions struct {
	ExtraRuntimeAnnotations    map[string]string
	KubeAPIServerName          string
	KubeBurstLimit             int
	KubeCAPath                 string
	KubeConfigBase64           string
	KubeConfigPaths            []string
	KubeContext                string
	KubeQPSLimit               int
	KubeSkipTLSVerify          bool
	KubeTLSServerName          string
	KubeToken                  string
	LogColorMode               LogColorMode
	LogLevel                   log.Level
	NetworkParallelism         int
	ProgressTablePrint         bool
	ProgressTablePrintInterval time.Duration
	ReleaseHistoryLimit        int
	ReleaseStorageDriver       ReleaseStorageDriver
	Revision                   int
	RollbackGraphPath          string
	RollbackGraphSave          bool
	RollbackReportPath         string
	RollbackReportSave         bool
	TempDirPath                string
	TrackCreationTimeout       time.Duration
	TrackDeletionTimeout       time.Duration
	TrackReadinessTimeout      time.Duration
}

type ReleaseStorageDriver

type ReleaseStorageDriver string
const (
	ReleaseStorageDriverDefault    ReleaseStorageDriver = ""
	ReleaseStorageDriverSecrets    ReleaseStorageDriver = "secrets"
	ReleaseStorageDriverSecret     ReleaseStorageDriver = "secret"
	ReleaseStorageDriverConfigMaps ReleaseStorageDriver = "configmaps"
	ReleaseStorageDriverConfigMap  ReleaseStorageDriver = "configmap"
	ReleaseStorageDriverMemory     ReleaseStorageDriver = "memory"
	ReleaseStorageDriverSQL        ReleaseStorageDriver = "sql"
)

type ReleaseUninstallOptions

type ReleaseUninstallOptions struct {
	DeleteHooks                bool
	DeleteReleaseNamespace     bool
	KubeAPIServerName          string
	KubeBurstLimit             int
	KubeCAPath                 string
	KubeConfigBase64           string
	KubeConfigPaths            []string
	KubeContext                string
	KubeQPSLimit               int
	KubeSkipTLSVerify          bool
	KubeTLSServerName          string
	KubeToken                  string
	LogColorMode               LogColorMode
	LogLevel                   log.Level
	NetworkParallelism         int
	ProgressTablePrintInterval time.Duration
	ReleaseHistoryLimit        int
	ReleaseStorageDriver       ReleaseStorageDriver
	TempDirPath                string
}

type SecretFileDecryptOptions

type SecretFileDecryptOptions struct {
	LogColorMode   LogColorMode
	LogLevel       log.Level
	OutputFilePath string
	OutputFileSave bool
	SecretKey      string
	SecretWorkDir  string
	TempDirPath    string
}

type SecretFileEditOptions

type SecretFileEditOptions struct {
	LogColorMode  LogColorMode
	LogLevel      log.Level
	SecretKey     string
	SecretWorkDir string
	TempDirPath   string
}

type SecretFileEncryptOptions

type SecretFileEncryptOptions struct {
	LogColorMode   LogColorMode
	LogLevel       log.Level
	OutputFilePath string
	OutputFileSave bool
	SecretKey      string
	SecretWorkDir  string
	TempDirPath    string
}

type SecretKeyCreateOptions

type SecretKeyCreateOptions struct {
	LogColorMode  LogColorMode
	LogLevel      log.Level
	OutputNoPrint bool
	TempDirPath   string
}

type SecretKeyRotateOptions

type SecretKeyRotateOptions struct {
	ChartDirPath      string
	LogColorMode      LogColorMode
	LogLevel          log.Level
	NewSecretKey      string
	OldSecretKey      string
	SecretValuesPaths []string
	SecretWorkDir     string
	TempDirPath       string
}

type SecretValuesFileDecryptOptions

type SecretValuesFileDecryptOptions struct {
	LogColorMode   LogColorMode
	LogLevel       log.Level
	OutputFilePath string
	OutputFileSave bool
	SecretKey      string
	SecretWorkDir  string
	TempDirPath    string
}

type SecretValuesFileEditOptions

type SecretValuesFileEditOptions struct {
	LogColorMode  LogColorMode
	LogLevel      log.Level
	SecretKey     string
	SecretWorkDir string
	TempDirPath   string
}

type SecretValuesFileEncryptOptions

type SecretValuesFileEncryptOptions struct {
	LogColorMode   LogColorMode
	LogLevel       log.Level
	OutputFilePath string
	OutputFileSave bool
	SecretKey      string
	SecretWorkDir  string
	TempDirPath    string
}

type VersionOptions

type VersionOptions struct {
	LogColorMode  LogColorMode
	LogLevel      log.Level
	OutputFormat  common.OutputFormat
	OutputNoPrint bool
	TempDirPath   string
}

type VersionResult

type VersionResult struct {
	FullVersion  string `json:"full"`
	MajorVersion int    `json:"major"`
	MinorVersion int    `json:"minor"`
	PatchVersion int    `json:"patch"`
}

func Version

func Version(ctx context.Context, opts VersionOptions) (*VersionResult, error)

Jump to

Keyboard shortcuts

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