Documentation ¶
Overview ¶
Package bundlereader creates a bundle from a source and adds all the referenced resources, as well as image scans.
Index ¶
- func ChartVersion(location fleet.HelmOptions, auth Auth) (string, error)
- func GetContent(ctx context.Context, base, source, version string, auth Auth, ...) (map[string][]byte, error)
- func GetManifestFromHelmChart(ctx context.Context, c client.Client, bd *fleet.BundleDeployment) (*manifest.Manifest, error)
- func NewFleetOCIProvider(options ...helmgetter.Option) (helmgetter.Getter, error)
- func Open(ctx context.Context, name, baseDir, file string, opts *Options) (*fleet.Bundle, []*fleet.ImageScan, error)
- type Auth
- type Options
- type Style
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChartVersion ¶
func ChartVersion(location fleet.HelmOptions, auth Auth) (string, error)
ChartVersion returns the version of the helm chart from a helm repo server, by inspecting the repo's index.yaml
func GetContent ¶
func GetContent(ctx context.Context, base, source, version string, auth Auth, disableDepsUpdate bool) (map[string][]byte, error)
GetContent uses go-getter (and Helm for OCI) to read the files from directories and servers.
func GetManifestFromHelmChart ¶
func GetManifestFromHelmChart(ctx context.Context, c client.Client, bd *fleet.BundleDeployment) (*manifest.Manifest, error)
GetManifestFromHelmChart downloads the given helm chart and creates a manifest with its contents
func NewFleetOCIProvider ¶
func NewFleetOCIProvider(options ...helmgetter.Option) (helmgetter.Getter, error)
func Open ¶
func Open(ctx context.Context, name, baseDir, file string, opts *Options) (*fleet.Bundle, []*fleet.ImageScan, error)
Open reads the fleet.yaml, from stdin, or basedir, or a file in basedir. Then it reads/downloads all referenced resources. It returns the populated bundle and any existing imagescans.
Types ¶
type Auth ¶
type Auth struct { Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` CABundle []byte `json:"caBundle,omitempty"` SSHPrivateKey []byte `json:"sshPrivateKey,omitempty"` InsecureSkipVerify bool `json:"insecureSkipVerify,omitempty"` }
func ReadHelmAuthFromSecret ¶
type Options ¶
type Options struct { Compress bool Labels map[string]string ServiceAccount string TargetsFile string TargetNamespace string Paused bool SyncGeneration int64 Auth Auth HelmRepoURLRegex string KeepResources bool DeleteNamespace bool CorrectDrift *fleet.CorrectDrift }
Options include the GitRepo overrides, which are passed via command line args
type Style ¶
type Style struct { ChartPath string KustomizePath string HasChartYAML bool Options fleet.BundleDeploymentOptions }
func DetermineStyle ¶
func DetermineStyle(m *manifest.Manifest, options fleet.BundleDeploymentOptions) Style