Documentation
¶
Overview ¶
Package project generates OpenChoreo Project YAML from a (Cluster)ProjectType.
The parameter section is rendered with the same required/optional/default behavior as the component scaffolder by reusing its schema-to-YAML primitives (imported as render).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator renders a Project manifest (and optional ProjectReleaseBindings) from a (Cluster)ProjectType parameter schema.
func NewGenerator ¶
func NewGenerator(parametersSchema *extv1.JSONSchemaProps, opts *Options) *Generator
NewGenerator creates a project scaffold generator. parametersSchema may be nil (a project type with no parameters), in which case spec.parameters is omitted.
type Options ¶
type Options struct {
// ProjectName is the name for the generated Project.
ProjectName string
// Namespace is the target namespace for the Project (and its bindings).
Namespace string
// ProjectTypeKind is "ProjectType" or "ClusterProjectType".
ProjectTypeKind string
// ProjectTypeName is the referenced (Cluster)ProjectType name.
ProjectTypeName string
// DeploymentPipeline is the name referenced by spec.deploymentPipelineRef.
DeploymentPipeline string
// Environments, when non-empty, produces one ProjectReleaseBinding per entry.
Environments []string
// BindingsNote, when set, is rendered as an informational comment on the
// Project document explaining why no ProjectReleaseBindings were generated.
// It is emitted regardless of IncludeStructuralComments, since it explains
// the shape of the output rather than documenting a field.
BindingsNote string
// IncludeAllFields includes optional fields (without defaults) as commented examples.
IncludeAllFields bool
// IncludeFieldDescriptions includes schema-derived comments.
IncludeFieldDescriptions bool
// IncludeStructuralComments includes section headers and guidance comments.
IncludeStructuralComments bool
}
Options configures the project scaffolding generator.
Click to show internal directories.
Click to hide internal directories.