Documentation
¶
Overview ¶
Package v1alpha1 contains types for the v1alpha1 API group +groupName=blueprints.windsorcli.dev
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Blueprint ¶
type Blueprint struct {
// Kind is the blueprint type, following Kubernetes conventions.
Kind string `yaml:"kind"`
// ApiVersion is the API schema version of the blueprint.
ApiVersion string `yaml:"apiVersion"`
// Metadata includes the blueprint's name and description.
Metadata Metadata `yaml:"metadata"`
// Repository details the source repository of the blueprint.
Repository Repository `yaml:"repository"`
// Sources are external resources referenced by the blueprint.
Sources []Source `yaml:"sources"`
// TerraformComponents are Terraform modules in the blueprint.
TerraformComponents []TerraformComponent `yaml:"terraform"`
// Kustomizations are kustomization configs in the blueprint.
Kustomizations []Kustomization `yaml:"kustomize"`
}
Blueprint is a configuration blueprint for initializing a project.
type Config ¶
type Config struct {
Version string `yaml:"version"`
ToolsManager string `yaml:"toolsManager,omitempty"`
Contexts map[string]*Context `yaml:"contexts"`
}
Config represents the entire configuration
type Context ¶
type Context struct {
ProjectName *string `yaml:"projectName,omitempty"`
Blueprint *string `yaml:"blueprint,omitempty"`
Environment map[string]string `yaml:"environment,omitempty"`
Secrets *secrets.SecretsConfig `yaml:"secrets,omitempty"`
AWS *aws.AWSConfig `yaml:"aws,omitempty"`
Docker *docker.DockerConfig `yaml:"docker,omitempty"`
Git *git.GitConfig `yaml:"git,omitempty"`
Terraform *terraform.TerraformConfig `yaml:"terraform,omitempty"`
VM *vm.VMConfig `yaml:"vm,omitempty"`
Cluster *cluster.ClusterConfig `yaml:"cluster,omitempty"`
Network *network.NetworkConfig `yaml:"network,omitempty"`
DNS *dns.DNSConfig `yaml:"dns,omitempty"`
}
Context represents the context configuration
type Kustomization ¶
type Kustomization struct {
// Name of the kustomization.
Name string `yaml:"name"`
// Path of the kustomization.
Path string `yaml:"path"`
// Source of the kustomization.
Source string `yaml:"source,omitempty"`
// DependsOn lists dependencies of this kustomization.
DependsOn []string `yaml:"dependsOn,omitempty"`
// Interval for applying the kustomization.
Interval *metav1.Duration `yaml:"interval,omitempty"`
// RetryInterval before retrying a failed kustomization.
RetryInterval *metav1.Duration `yaml:"retryInterval,omitempty"`
// Timeout for the kustomization to complete.
Timeout *metav1.Duration `yaml:"timeout,omitempty"`
// Patches to apply to the kustomization.
Patches []kustomize.Patch `yaml:"patches,omitempty"`
// Wait for the kustomization to be fully applied.
Wait *bool `yaml:"wait,omitempty"`
// Force apply the kustomization.
Force *bool `yaml:"force,omitempty"`
// Components to include in the kustomization.
Components []string `yaml:"components,omitempty"`
// PostBuild is a post-build step to run after the kustomization is applied.
PostBuild *PostBuild `yaml:"postBuild,omitempty"`
}
Kustomization defines a kustomization config in a blueprint.
type Metadata ¶
type Metadata struct {
// Name is the blueprint's unique identifier.
Name string `yaml:"name"`
// Description is a brief overview of the blueprint.
Description string `yaml:"description,omitempty"`
// Authors are the creators or maintainers of the blueprint.
Authors []string `yaml:"authors,omitempty"`
}
Metadata describes a blueprint, including name and authors.
type PartialBlueprint ¶
type PartialBlueprint struct {
Kind string `yaml:"kind"`
ApiVersion string `yaml:"apiVersion"`
Metadata Metadata `yaml:"metadata"`
Sources []Source `yaml:"sources"`
Repository Repository `yaml:"repository"`
TerraformComponents []TerraformComponent `yaml:"terraform"`
Kustomizations []map[string]interface{} `yaml:"kustomize"`
}
type PostBuild ¶ added in v0.4.0
type PostBuild struct {
// Substitute is a map of resources to substitute from.
Substitute map[string]string `yaml:"substitute,omitempty"`
// SubstituteFrom is a list of resources to substitute from.
SubstituteFrom []SubstituteReference `yaml:"substituteFrom,omitempty"`
}
PostBuild is a post-build step to run after the kustomization is applied.
type Reference ¶
type Reference struct {
// Branch to use.
Branch string `yaml:"branch,omitempty"`
// Tag to use.
Tag string `yaml:"tag,omitempty"`
// SemVer to use.
SemVer string `yaml:"semver,omitempty"`
// Name of the reference.
Name string `yaml:"name,omitempty"`
// Commit hash to use.
Commit string `yaml:"commit,omitempty"`
}
Reference details a specific version or state of a repository or source.
type Repository ¶
type Repository struct {
// Url is the repository location.
Url string `yaml:"url"`
// Ref details the branch, tag, or commit to use.
Ref Reference `yaml:"ref"`
// SecretName is the secret for repository access.
SecretName string `yaml:"secretName,omitempty"`
}
Repository contains source code repository info.
type Source ¶
type Source struct {
// Name identifies the source.
Name string `yaml:"name"`
// Url is the source location.
Url string `yaml:"url"`
// PathPrefix is a prefix to the source path.
PathPrefix string `yaml:"pathPrefix,omitempty"`
// Ref details the branch, tag, or commit to use.
Ref Reference `yaml:"ref"`
// SecretName is the secret for source access.
SecretName string `yaml:"secretName,omitempty"`
}
Source is an external resource referenced by a blueprint.
type SubstituteReference ¶ added in v0.4.0
type SubstituteReference struct {
// Kind of the resource to substitute from.
Kind string `yaml:"kind"`
// Name of the resource to substitute from.
Name string `yaml:"name"`
// Optional indicates if the resource is optional.
Optional bool `yaml:"optional,omitempty"`
}
SubstituteReference is a reference to a resource to substitute from.
type TerraformComponent ¶
type TerraformComponent struct {
// Source of the Terraform module.
Source string `yaml:"source,omitempty"`
// Path of the Terraform module.
Path string `yaml:"path"`
// FullPath is the complete path, not serialized to YAML.
FullPath string `yaml:"-"`
// Values are configuration values for the module.
Values map[string]interface{} `yaml:"values,omitempty"`
// Variables are input variables for the module.
Variables map[string]TerraformVariable `yaml:"variables,omitempty"`
}
TerraformComponent defines a Terraform module in a blueprint.
type TerraformVariable ¶
type TerraformVariable struct {
// Type of the variable.
Type string `yaml:"type,omitempty"`
// Default value for the variable.
Default interface{} `yaml:"default,omitempty"`
// Description of the variable's purpose.
Description string `yaml:"description,omitempty"`
// Sensitive indicates if the variable is sensitive.
Sensitive bool `yaml:"sensitive,omitempty"`
}
TerraformVariable describes a variable in a Terraform component.