Documentation
¶
Index ¶
- Constants
- Variables
- func IsHelmOciRepo(repoURL string) bool
- func IsMissingDependencyErr(err error) bool
- func Version() (string, error)
- type AzureWorkloadIdentityCreds
- func (creds AzureWorkloadIdentityCreds) GetAccessToken() (string, error)
- func (creds AzureWorkloadIdentityCreds) GetCAPath() string
- func (creds AzureWorkloadIdentityCreds) GetCertData() []byte
- func (creds AzureWorkloadIdentityCreds) GetInsecureSkipVerify() bool
- func (creds AzureWorkloadIdentityCreds) GetKeyData() []byte
- func (creds AzureWorkloadIdentityCreds) GetPassword() (string, error)
- func (creds AzureWorkloadIdentityCreds) GetUsername() string
- type Client
- type ClientOpts
- type Cmd
- func (c *Cmd) Close()
- func (c *Cmd) Fetch(repo, chartName, version, destination string, creds Creds, ...) (string, error)
- func (c *Cmd) Freestyle(args ...string) (string, error)
- func (c *Cmd) InspectChart() (string, error)
- func (c *Cmd) PullOCI(repo string, chart string, version string, destination string, creds Creds, ...) (string, error)
- func (c *Cmd) RegistryLogin(repo string, creds Creds, plainHTTP bool) (string, error)
- func (c *Cmd) RegistryLogout(repo string, _ Creds) (string, error)
- func (c *Cmd) RepoAdd(name string, url string, opts Creds, passCredentials bool) (string, error)
- type Creds
- type Entries
- type Entry
- type Helm
- type HelmCreds
- type HelmRepository
- type Index
- type TemplateOpts
Constants ¶
View Source
const ( ResourcePolicyAnnotation = "helm.sh/resource-policy" ResourcePolicyKeep = "keep" )
Variables ¶
View Source
var (
ErrOCINotEnabled = errors.New("could not perform the action when oci is not enabled")
)
Functions ¶
func IsHelmOciRepo ¶ added in v1.8.8
Ensures that given OCI registries URL does not have protocol
func IsMissingDependencyErr ¶ added in v0.11.0
IsMissingDependencyErr tests if the error is related to a missing chart dependency
Types ¶
type AzureWorkloadIdentityCreds ¶ added in v1.8.8
type AzureWorkloadIdentityCreds struct {
CAPath string
CertData []byte
KeyData []byte
InsecureSkipVerify bool
// contains filtered or unexported fields
}
func NewAzureWorkloadIdentityCreds ¶ added in v1.8.8
func NewAzureWorkloadIdentityCreds(repoURL string, caPath string, certData []byte, keyData []byte, insecureSkipVerify bool, tokenProvider workloadidentity.TokenProvider) AzureWorkloadIdentityCreds
func (AzureWorkloadIdentityCreds) GetAccessToken ¶ added in v1.8.8
func (creds AzureWorkloadIdentityCreds) GetAccessToken() (string, error)
func (AzureWorkloadIdentityCreds) GetCAPath ¶ added in v1.8.8
func (creds AzureWorkloadIdentityCreds) GetCAPath() string
func (AzureWorkloadIdentityCreds) GetCertData ¶ added in v1.8.8
func (creds AzureWorkloadIdentityCreds) GetCertData() []byte
func (AzureWorkloadIdentityCreds) GetInsecureSkipVerify ¶ added in v1.8.8
func (creds AzureWorkloadIdentityCreds) GetInsecureSkipVerify() bool
func (AzureWorkloadIdentityCreds) GetKeyData ¶ added in v1.8.8
func (creds AzureWorkloadIdentityCreds) GetKeyData() []byte
func (AzureWorkloadIdentityCreds) GetPassword ¶ added in v1.8.8
func (creds AzureWorkloadIdentityCreds) GetPassword() (string, error)
func (AzureWorkloadIdentityCreds) GetUsername ¶ added in v1.8.8
func (creds AzureWorkloadIdentityCreds) GetUsername() string
type Client ¶ added in v1.3.0
type Client interface {
CleanChartCache(chart string, version string) error
ExtractChart(ctx context.Context, chart string, version string, passCredentials bool, manifestMaxExtractedSize int64, disableManifestMaxExtractedSize bool) (string, utilio.Closer, error)
GetIndex(ctx context.Context, noCache bool, maxIndexSize int64) (*Index, error)
GetTags(ctx context.Context, chart string, noCache bool) ([]string, error)
TestHelmOCI() (bool, error)
}
type ClientOpts ¶ added in v1.8.8
type ClientOpts func(c *nativeHelmChart)
func WithChartPaths ¶ added in v1.8.8
func WithChartPaths(chartPaths utilio.TempPaths) ClientOpts
func WithHelmChartCacheExpiration ¶ added in v1.8.8
func WithHelmChartCacheExpiration(helmChartCacheExpiration time.Duration) ClientOpts
WithHelmChartCacheExpiration sets the cache expiration duration for chart cache.
func WithIndexCache ¶ added in v1.8.8
func WithIndexCache(indexCache indexCache) ClientOpts
func WithPlainHTTP ¶ added in v1.8.8
func WithPlainHTTP() ClientOpts
WithPlainHTTP configures the client to use plain HTTP instead of HTTPS for OCI registry operations.
func WithUserAgent ¶ added in v1.8.8
func WithUserAgent(userAgent string) ClientOpts
WithUserAgent sets a custom User-Agent string for HTTP requests. If not set, a default User-Agent will be generated automatically.
type Cmd ¶ added in v1.3.0
type Cmd struct {
WorkDir string
IsLocal bool
IsHelmOci bool
// contains filtered or unexported fields
}
A thin wrapper around the "helm" command, adding logging and error translation.
func NewCmdWithVersion ¶ added in v1.5.0
func (*Cmd) InspectChart ¶ added in v1.8.8
func (*Cmd) RegistryLogin ¶ added in v1.8.8
func (*Cmd) RegistryLogout ¶ added in v1.8.8
type Helm ¶
type Helm interface {
// Template returns a list of unstructured objects from a `helm template` command
Template(opts *TemplateOpts) (string, string, error)
// GetParameters returns a list of chart parameters taking into account values in provided YAML files.
GetParameters(valuesFiles []pathutil.ResolvedFilePath, appPath, repoRoot string) (map[string]string, error)
// DependencyBuild runs `helm dependency build` to download a chart's dependencies
DependencyBuild() error
// Dispose deletes temp resources
Dispose()
}
Helm provides wrapper functionality around the `helm` command.
type HelmCreds ¶ added in v1.8.8
type HelmCreds struct {
Username string
Password string
CAPath string
CertData []byte
KeyData []byte
InsecureSkipVerify bool
}
func (HelmCreds) GetCertData ¶ added in v1.8.8
func (HelmCreds) GetInsecureSkipVerify ¶ added in v1.8.8
func (HelmCreds) GetKeyData ¶ added in v1.8.8
func (HelmCreds) GetPassword ¶ added in v1.8.8
func (HelmCreds) GetUsername ¶ added in v1.8.8
type HelmRepository ¶ added in v1.3.0
type TemplateOpts ¶ added in v1.3.0
type TemplateOpts struct {
Name string
Namespace string
KubeVersion string
APIVersions []string
Set map[string]string
SetString map[string]string
SetFile map[string]pathutil.ResolvedFilePath
Values []pathutil.ResolvedFilePath
// ExtraValues is the randomly-generated path to the temporary values file holding the contents of
// spec.source.helm.values/valuesObject.
ExtraValues pathutil.ResolvedFilePath
SkipCrds bool
SkipSchemaValidation bool
SkipTests bool
}
Click to show internal directories.
Click to hide internal directories.