options

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareVersions added in v0.4.1

func CompareVersions(a string, b string) bool

CompareVersions compares two semantic versions and determines ascending ordering

Types

type AdditionalChartOptions

type AdditionalChartOptions struct {
	// WorkingDir is the working directory for this chart within packages/<package-name>
	WorkingDir string `yaml:"workingDir"`
	// UpstreamOptions is any options provided on how to get this chart from upstream.
	UpstreamOptions *UpstreamOptions `yaml:"upstreamOptions,omitempty"`
	// CRDChartOptions is any options provided on how to generate a CRD chart.
	CRDChartOptions *CRDChartOptions `yaml:"crdOptions,omitempty"`
	// IgnoreDependencies drops certain dependencies from the list that is parsed from upstream
	IgnoreDependencies []string `yaml:"ignoreDependencies"`
	// ReplacePaths marks paths as those that should be replaced instead of patches. Consequently, these paths will exist in both generated-changes/excludes and generated-changes/overlay
	ReplacePaths []string `yaml:"replacePaths"`
}

AdditionalChartOptions represent the options presented to users to be able to configure the way an additional chart is built using these scripts

type CRDChartOptions

type CRDChartOptions struct {
	// The directory within packages/<package-name>/templates/ that will contain the template for your CRD chart
	TemplateDirectory string `yaml:"templateDirectory"`
	// The directory within your templateDirectory in which CRD files should be placed
	CRDDirectory string `yaml:"crdDirectory" default:"templates"`
	// Whether to add a validation file to your main chart to check that CRDs exist
	AddCRDValidationToMainChart bool `yaml:"addCRDValidationToMainChart"`
	// UseTarArchive indicates whether to bundle and compress CRD files into a tgz file
	UseTarArchive bool `yaml:"useTarArchive"`
}

CRDChartOptions represent any options that are configurable for CRD charts

type ChartOptions

type ChartOptions struct {
	// WorkingDir is the working directory for this chart within packages/<package-name>
	WorkingDir string `yaml:"workingDir" default:"charts"`
	// UpstreamOptions is any options provided on how to get this chart from upstream
	UpstreamOptions UpstreamOptions `yaml:",inline"`
	// IgnoreDependencies drops certain dependencies from the list that is parsed from upstream
	IgnoreDependencies []string `yaml:"ignoreDependencies"`
	// ReplacePaths marks paths as those that should be replaced instead of patches. Consequently, these paths will exist in both generated-changes/excludes and generated-changes/overlay
	ReplacePaths []string `yaml:"replacePaths"`
}

ChartOptions represent the options presented to users to be able to configure the way a main chart is built using these scripts

func LoadChartOptionsFromFile

func LoadChartOptionsFromFile(fs billy.Filesystem, path string) (ChartOptions, error)

LoadChartOptionsFromFile unmarshalls the struct found at the file to YAML and reads it into memory

func (ChartOptions) WriteToFile

func (c ChartOptions) WriteToFile(fs billy.Filesystem, path string) error

WriteToFile marshals the struct to yaml and writes it into the path specified

type ChartsScriptOptions

type ChartsScriptOptions struct {
	// ValidateOptions represent any options that are configurable when validating a chart
	ValidateOptions *ValidateOptions `yaml:"validate"`
	// HelmRepoConfiguration represents the configuration of the Helm Repository that exposes your charts
	HelmRepoConfiguration `yaml:"helmRepo"`
	// Template can be 'staging' or 'live'
	Template string `yaml:"template"`
	// OmitBuildMetadataOnExport instructs the scripts to not add in a +up build metadata flag for forked charts
	// If false, any forked chart whose version differs from the original source version will have the version VERSION+upORIGINAL_VERSION
	OmitBuildMetadataOnExport bool `yaml:"omitBuildMetadataOnExport"`
}

ChartsScriptOptions represents the options provided to the charts scripts for this branch

type HelmRepoConfiguration

type HelmRepoConfiguration struct {
	CNAME string `yaml:"cname"`
}

HelmRepoConfiguration represents the configuration of the Helm Repository that exposes your charts

type PackageOptions

type PackageOptions struct {
	// Version represents the version of the package. It will override other values if it exists
	Version *string `yaml:"version,omitempty"`
	// PackageVersion represents the current version of the package. It needs to be incremented whenever there are changes
	PackageVersion *int `yaml:"packageVersion" default:"0"`
	// MainChartOptions represent options presented to the user to configure the main chart
	MainChartOptions ChartOptions `yaml:",inline"`
	// AdditionalChartOptions represent options presented to the user to configure any additional charts
	AdditionalChartOptions []AdditionalChartOptions `yaml:"additionalCharts,omitempty"`
	// DoNotRelease represents a boolean flag that indicates a package should not be tracked in make charts
	DoNotRelease bool `yaml:"doNotRelease,omitempty"`
}

PackageOptions represent the options presented to users to be able to configure the way a package is built using these scripts The YAML that corresponds to these options are stored within packages/<package-name>/package.yaml for each package

func LoadPackageOptionsFromFile

func LoadPackageOptionsFromFile(fs billy.Filesystem, path string) (PackageOptions, error)

LoadPackageOptionsFromFile unmarshalls the struct found at the file to YAML and reads it into memory

func (PackageOptions) WriteToFile

func (p PackageOptions) WriteToFile(fs billy.Filesystem, path string) error

WriteToFile marshals the struct to yaml and writes it into the path specified

type ReleaseOptions added in v0.3.0

type ReleaseOptions map[string][]string

ReleaseOptions represent the values provided in the release.yaml to avoid validation failing on seeing a to-be-released chart. This is only used if ValidateOptions are provided in the configuration.yaml

func LoadReleaseOptionsFromFile added in v0.3.0

func LoadReleaseOptionsFromFile(fs billy.Filesystem, path string) (ReleaseOptions, error)

LoadReleaseOptionsFromFile unmarshalls the struct found at the file to YAML and reads it into memory

func (ReleaseOptions) Append added in v0.3.0

func (r ReleaseOptions) Append(chartName string, chartVersion string) ReleaseOptions

Append adds a chartName and chartVersion to the ReleaseOptions and returns it

func (ReleaseOptions) Contains added in v0.3.0

func (r ReleaseOptions) Contains(chartName string, chartVersion string) bool

Contains checks if a chartName and chartVersion is tracked by the ReleaseOptions

func (ReleaseOptions) Merge added in v0.3.0

Merge merges two ReleaseOptions and returns the merged copy

func (ReleaseOptions) SortBySemver added in v0.4.1

func (r ReleaseOptions) SortBySemver()

SortBySemver sorts the version strings in release options according to semver constraints

func (ReleaseOptions) WriteToFile added in v0.3.0

func (r ReleaseOptions) WriteToFile(fs billy.Filesystem, path string) error

WriteToFile marshals the struct to yaml and writes it into the path specified

type UpstreamOptions

type UpstreamOptions struct {
	// URL represents a source for your upstream (e.g. a Github repository URL or a download link for an archive)
	URL string `yaml:"url,omitempty"`
	// Subdirectory represents a specific directory within the upstream pointed to by the URL to treat as the root
	Subdirectory *string `yaml:"subdirectory,omitempty"`
	// Commit represents a specific commit hash to treat as the head, if the URL points to a Github repository
	Commit *string `yaml:"commit,omitempty"`
}

UpstreamOptions represents the options presented to users to define where the upstream Helm chart is located

type ValidateOptions

type ValidateOptions struct {
	// UpstreamOptions points to the configuration that contains the branch you want to compare against
	UpstreamOptions UpstreamOptions `yaml:",inline"`
	// Branch represents the branch of the GithubConfiguration that you want to compare against
	Branch string `yaml:"branch"`
}

ValidateOptions specify an upstream GitHub repository you would like to validate against

Jump to

Keyboard shortcuts

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