Documentation ¶
Index ¶
- Constants
- Variables
- func AddRegistryCredentials(registry, username, password string) error
- func NewCachedFetcher(source remotes.Fetcher) remotes.Fetcher
- func Template(name, description string, packages ...string) error
- func UploadPackage(pkg Package, ref string) error
- func Validate(name string) error
- func ValidateManifest(manifest []byte) error
- type CachedFetcher
- type Command
- type Manifest
- func (m *Manifest) ApplyDefaultVars(vs vars.VarSet) error
- func (m *Manifest) FilterSensitiveVars(vs vars.VarSet) vars.VarSet
- func (m *Manifest) FilterVars(vs vars.VarSet) vars.VarSet
- func (m *Manifest) GetAnnotation(key string) string
- func (m *Manifest) ValidateDefaults() error
- func (m *Manifest) ValidateVarSet(vs vars.VarSet, write bool) error
- type Package
- type Schema
- type TemplateManifest
- type VariableSchemas
Constants ¶
View Source
const ( TerraformVersionAnnotation = "corral.cattle.io/terraform-version" PublisherAnnotation = "corral.cattle.io/published-by" CorralVersionAnnotation = "corral.cattle.io/corral-version" PublishTimestampAnnotation = "corral.cattle.io/published-at" )
Variables ¶
View Source
var ErrOverlayNotFound = errors.New("overlay folder not found")
Functions ¶
func AddRegistryCredentials ¶
func UploadPackage ¶
func ValidateManifest ¶
ValidateManifest returns an error of the manifest violates any rules defined in the package-manifest.schema.json
Types ¶
type CachedFetcher ¶
type CachedFetcher struct {
// contains filtered or unexported fields
}
func (*CachedFetcher) Fetch ¶
func (c *CachedFetcher) Fetch(ctx context.Context, desc v1.Descriptor) (io.ReadCloser, error)
type Manifest ¶
type Manifest struct { Name string `yaml:"name"` Annotations map[string]string `yaml:"annotations,omitempty"` Description string `yaml:"description,omitempty"` Commands []Command `yaml:"commands"` Overlay map[string]string `yaml:"overlay,omitempty"` VariableSchemas VariableSchemas `yaml:"variables,omitempty"` }
func LoadManifest ¶
LoadManifest reads a manifest file and validates it is a valid manifest.
func (*Manifest) FilterSensitiveVars ¶
FilterSensitiveVars returns the given VarSet without any variables marked as sensitive in the manifest
func (*Manifest) FilterVars ¶
FilterVars returns the given VarSet without any variables not defined in the manifest
func (*Manifest) GetAnnotation ¶
func (*Manifest) ValidateDefaults ¶
ValidateDefaults returns an error if the var set does not match the manifest variable schemas.
type Package ¶
func LoadPackage ¶
func (Package) ManifestPath ¶
func (*Package) OverlayPath ¶
func (Package) TerraformModulePath ¶
func (Package) TerraformVersion ¶
type TemplateManifest ¶
type TemplateManifest struct { Name string `yaml:"name"` Annotations map[string]string `yaml:"annotations,omitempty"` Description string `yaml:"description"` Commands []Command `yaml:"commands"` Overlay map[string]string `yaml:"overlay,omitempty"` VariableSchemas map[string]any `yaml:"variables,omitempty"` }
func MergePackages ¶
func MergePackages(name, description string, pkgs []Package) (TemplateManifest, error)
type VariableSchemas ¶
func (*VariableSchemas) UnmarshalYAML ¶
func (s *VariableSchemas) UnmarshalYAML(unmarshal func(any) error) error
Click to show internal directories.
Click to hide internal directories.