Documentation ¶
Index ¶
- Constants
- func EnvironmentSpecification() string
- func GetEnvironmentNames(environments []*Environment) []string
- func IsValidEnvironment(apiVersion, kind string) bool
- func IsValidProject(apiVersion, kind string) bool
- func IsValidRelease(apiVersion, kind string) bool
- func ProjectSpecification() string
- func ReleaseSpecification() string
- type Environment
- type EnvironmentMetadata
- type EnvironmentSpec
- type Project
- type ProjectMetadata
- type ProjectSpec
- type Promotion
- type Release
- type ReleaseChart
- type ReleaseMetadata
- type ReleaseSpec
- type Schemas
Constants ¶
View Source
const EnvironmentKind = "Environment"
View Source
const ProjectKind = "Project"
View Source
const ReleaseKind = "Release"
Variables ¶
This section is empty.
Functions ¶
func EnvironmentSpecification ¶ added in v0.56.0
func EnvironmentSpecification() string
func GetEnvironmentNames ¶
func GetEnvironmentNames(environments []*Environment) []string
func IsValidEnvironment ¶
func IsValidProject ¶
func IsValidRelease ¶
func ProjectSpecification ¶ added in v0.56.0
func ProjectSpecification() string
func ReleaseSpecification ¶ added in v0.56.0
func ReleaseSpecification() string
Types ¶
type Environment ¶
type Environment struct { // ApiVersion is the API version of the environment. ApiVersion string `yaml:"apiVersion,omitempty" json:"apiVersion,omitempty"` // Kind is the kind of the environment. Kind string `yaml:"kind,omitempty" json:"kind,omitempty"` // EnvironmentMetadata is the metadata of the environment. EnvironmentMetadata `yaml:"metadata,omitempty" json:"metadata,omitempty"` // Spec is the spec of the environment. Spec EnvironmentSpec `yaml:"spec,omitempty" json:"spec,omitempty"` // File represents the in-memory yaml file of the project. File *yml.File `yaml:"-" json:"-"` // Dir is the path to the environment directory. Dir string `yaml:"-" json:"-"` }
func GetEnvironmentByName ¶
func GetEnvironmentByName(environments []*Environment, name string) (*Environment, error)
func GetEnvironmentsByNames ¶
func GetEnvironmentsByNames(environments []*Environment, names []string) []*Environment
GetEnvironmentsByNames returns the subset of environments with given names, preserving their order in the original list. If names is empty, all environments are returned.
func NewEnvironment ¶
func NewEnvironment(file *yml.File) (*Environment, error)
NewEnvironment creates a new environment from given yaml file.
func (Environment) IsPromotableTo ¶
func (e Environment) IsPromotableTo(targetEnv *Environment) bool
func (Environment) Validate ¶ added in v0.39.0
func (e Environment) Validate(validChartRefs []string) error
type EnvironmentMetadata ¶
type EnvironmentMetadata struct { // Name is the name of the environment. Name string `yaml:"name,omitempty" json:"name,omitempty"` // Labels is the list of labels for the environment. Labels map[string]string `yaml:"labels,omitempty" json:"labels,omitempty"` // Annotations is the list of annotations for the environment. Annotations map[string]string `yaml:"annotations,omitempty" json:"annotations,omitempty"` }
type EnvironmentSpec ¶
type EnvironmentSpec struct { // Order controls the display order of the environment. Order int `yaml:"order,omitempty" json:"order,omitempty"` // Promotion controls the promotion of releases to this environment. Promotion Promotion `yaml:"promotion,omitempty" json:"promotion,omitempty"` // Cluster is the name of environment's cluster. Cluster string `yaml:"cluster,omitempty" json:"cluster,omitempty"` // Namespace is the name of environment's namespace within cluster. Namespace string `yaml:"namespace,omitempty" json:"namespace,omitempty"` // ChartVersions allows the environment to override the given version of the catalog's chart references. // This allows for environments to roll out new versions of chart references. ChartVersions map[string]string `yaml:"chartVersions,omitempty" json:"chartVersions,omitempty"` // Owners is the list of identifiers of owners of the environment. // It can be any strings that uniquely identifies the owners, such as email addresses or Jac group identifiers. Owners []string `yaml:"owners,omitempty" json:"owners,omitempty"` // SealedSecretsCert is the public certificate of the Sealed Secrets controller for this environment // that can be used to encrypt secrets targeted to this environment using the `joy secret seal` command. SealedSecretsCert string `yaml:"sealedSecretsCert,omitempty" json:"sealedSecretsCert,omitempty"` // Values are the environment-level values that can optionally be injected into releases' values during rendering // via the `$ref(.Environment.Spec.Values.someKey)` or `$spread(...)` template expressions. Values map[string]any `yaml:"values,omitempty" json:"values,omitempty"` }
type Project ¶
type Project struct { // ApiVersion is the API version of the project. ApiVersion string `yaml:"apiVersion,omitempty" json:"apiVersion,omitempty"` // Kind is the kind of the project. Kind string `yaml:"kind,omitempty" json:"kind,omitempty"` // ProjectMetadata is the metadata of the project. ProjectMetadata `yaml:"metadata,omitempty" json:"metadata,omitempty"` // Spec is the spec of the project. Spec ProjectSpec `yaml:"spec,omitempty" json:"spec,omitempty"` // File represents the in-memory yaml file of the project. File *yml.File `yaml:"-" json:"-"` }
func NewProject ¶
NewProject creates a new project from given yaml file.
type ProjectMetadata ¶
type ProjectMetadata struct { // Name is the name of the project. Name string `yaml:"name,omitempty" json:"name,omitempty"` // Labels is the list of labels for the project. Labels map[string]string `yaml:"labels,omitempty" json:"labels,omitempty"` // Annotations is the list of annotations for the project. Annotations map[string]string `yaml:"annotations,omitempty" json:"annotations,omitempty"` }
type ProjectSpec ¶
type ProjectSpec struct { // Owners is the list of identifiers of owners of the project. // It can be any string that uniquely identifies the owners, such as email addresses or Jac group identifiers. Owners []string `yaml:"owners,omitempty" json:"owners,omitempty"` // Reviewers is the list of GitHub users who should always added a reviewer for the project. Reviewers []string `yaml:"reviewers,omitempty" json:"reviewers,omitempty"` // Git repository of the project. Repository string `yaml:"repository,omitempty" json:"repository,omitempty"` // Location of the project files in the repository. Should be empty if the whole repository is the project. // If there is more than one location, specify the main subdirectory of the project first. RepositorySubpaths []string `yaml:"repositorySubpaths,omitempty" json:"repositorySubpaths,omitempty"` // GitTagTemplate allows you to configure what your git tag look like relative to a release via go templates // example: gitTagTemplate: api/v{{ .Release.Spec.Version }} GitTagTemplate string `yaml:"gitTagTemplate,omitempty" json:"gitTagTemplate,omitempty"` // Links is the map of project-level overrides and additions for project links defined in catalog configuration. Links map[string]string `yaml:"links,omitempty" json:"links,omitempty"` // ReleaseLinks is the map of project-level overrides and additions for release links defined in catalog configuration. ReleaseLinks map[string]string `yaml:"releaseLinks,omitempty" json:"releaseLinks,omitempty"` }
type Release ¶
type Release struct { // ApiVersion is the API version of the release. ApiVersion string `yaml:"apiVersion,omitempty" json:"apiVersion,omitempty"` // Kind is the kind of the release. Kind string `yaml:"kind,omitempty" json:"kind,omitempty"` // ReleaseMetadata is the metadata of the release. ReleaseMetadata `yaml:"metadata,omitempty" json:"metadata,omitempty"` // Spec is the spec of the release. Spec ReleaseSpec `yaml:"spec,omitempty" json:"spec,omitempty"` // File represents the in-memory yaml file of the release. File *yml.File `yaml:"-" json:"-"` // Project is the project that the release belongs to. Project *Project `yaml:"-" json:"-"` // Environment is the environment that the release is deployed to. Environment *Environment `yaml:"-" json:"-"` }
func LoadRelease ¶
LoadRelease loads a release from the given release file.
func (*Release) UnmarshalYAML ¶ added in v0.20.3
type ReleaseChart ¶
type ReleaseChart struct { Ref string `yaml:"ref,omitempty" json:"ref,omitempty"` Version string `yaml:"version,omitempty" json:"version,omitempty"` Name string `yaml:"name,omitempty" json:"name,omitempty"` RepoUrl string `yaml:"repoUrl,omitempty" json:"repoUrl,omitempty"` Mappings map[string]any `yaml:"mappings,omitempty" json:"mappings,omitempty"` }
func (ReleaseChart) Validate ¶ added in v0.39.0
func (chart ReleaseChart) Validate(validRefs []string) error
type ReleaseMetadata ¶
type ReleaseMetadata struct { // Name is the name of the release. Name string `yaml:"name,omitempty" json:"name,omitempty"` // Labels is the list of labels for the release. Labels map[string]string `yaml:"labels,omitempty" json:"labels,omitempty"` // Annotations is the list of annotations for the release. Annotations map[string]string `yaml:"annotations,omitempty" json:"annotations,omitempty"` }
type ReleaseSpec ¶
type ReleaseSpec struct { // Project is the name of the project that the release belongs to. Project string `yaml:"project,omitempty" json:"project,omitempty"` // Version of the release, typically corresponding to the image build version being deployed. Version string `yaml:"version,omitempty" json:"version,omitempty"` // Chart is the chart that the release is based on. Chart ReleaseChart `yaml:"chart,omitempty" json:"chart,omitempty"` // Values is the values to use to render the chart. Values map[string]interface{} `yaml:"values,omitempty" json:"values,omitempty"` // Links is the map of release-level overrides and additions for release links defined in project and/or catalog configuration. Links map[string]string `yaml:"links,omitempty" json:"links,omitempty"` }
Click to show internal directories.
Click to hide internal directories.