Documentation
¶
Index ¶
- Constants
- Variables
- func Byte(_ context.Context, in any) []byte
- func ContextGetLifecycleType(ctx context.Context) (string, bool)
- func ContextGetReleaseUniq(ctx context.Context) (uniqname.UniqName, bool)
- func ContextWithLifecycleType(ctx context.Context, typ string) context.Context
- func ContextWithReleaseUniq(ctx context.Context, name uniqname.UniqName) context.Context
- func CopyFile(src, dest string) error
- func CreateFile(p string) (*os.File, error)
- func Dotenv()
- func Download(ctx context.Context, file, uri string) error
- func GetKubernetesVersion(cfg *action.Configuration) (*version.Info, error)
- func IsExists(s string) bool
- func IsURL(str string) bool
- func KubeInit(kubecontext string) (err error)
- func MoveFile(src, dst string) error
- func NewCfg(ns, kubecontext string) (*action.Configuration, error)
- func NewHelm(ns string) *helm.EnvSettings
- func NewRegistryClient(plainHTTP, insecureSkipTLSVerify bool) (*registry.Client, error)
- func SaveInterface(ctx context.Context, file string, in any) error
- func SlicesMap[T any, S interface{ ... }, R any](s S, f func(T) R) []R
- type SlogHandler
Constants ¶
const ( // HTTPTimeout is a timeout for HTTP requests. HTTPTimeout = 30 * time.Second )
const (
// RootAnnoName is prefix for all kubedog annotations.
RootAnnoName = "helmwave.app/"
)
Variables ¶
var ( // Helm is an instance of helm CLI. Helm = helm.New() // HelmRegistryClient is an instance of helm registry client. HelmRegistryClient *registry.Client )
Functions ¶
func ContextGetReleaseUniq ¶
func ContextWithReleaseUniq ¶
func CreateFile ¶
CreateFile creates recursively basedir of file and returns created file object.
func GetKubernetesVersion ¶
func GetKubernetesVersion(cfg *action.Configuration) (*version.Info, error)
GetKubernetesVersion returns kubernetes server version.
func MoveFile ¶
MoveFile moves files or directories. It also handles move between different mounts (copy + rm).
func NewCfg ¶
func NewCfg(ns, kubecontext string) (*action.Configuration, error)
NewCfg creates helm internal configuration for provided namespace and kubecontext.
func NewHelm ¶
func NewHelm(ns string) *helm.EnvSettings
NewHelm is a hack to create an instance of helm CLI and specifying namespace without environment variables.
func NewRegistryClient ¶ added in v1.1.0
NewRegistryClient builds a registry client for a single release whose chart needs a non-default OCI transport (plain HTTP or a skipped TLS verification).
The package-global HelmRegistryClient is TLS-only, and helm v4's OCI getter uses an injected registry client verbatim -- it only honors plain_http / insecure when it builds its own client (see pkg/getter/ocigetter.go). So the shared client can never reach a plain-HTTP or insecure registry; a per-release client carrying these options is the only way the per-chart flags reach the OCI transport. Mirrors helm's own cmd.newRegistryClient.
func SaveInterface ¶
SaveInterface encodes input to YAML and saves to file.
Types ¶
type SlogHandler ¶
type SlogHandler struct {
// contains filtered or unexported fields
}
SlogHandler is a slog.Handler that forwards records to logrus.
Helm v4 dropped the `func(format string, args ...any)` debug callback that v3 accepted and logs through log/slog instead. This handler keeps helm's output inside helmtide's single log stream, so `--log-level` and `--log-format` still control it.
func NewSlogHandler ¶
func NewSlogHandler() *SlogHandler
NewSlogHandler returns a slog.Handler writing to the standard logrus logger.
func (*SlogHandler) Handle ¶
Handle implements slog.Handler.
slog.Handler says so; neither signature is ours to change.