Documentation ¶
Index ¶
- Constants
- func GetEnvironmentNames(environments []*Environment) []string
- func IsValidEnvironment(apiVersion, kind string) bool
- func IsValidProject(apiVersion, kind string) bool
- func IsValidRelease(apiVersion, kind string) bool
- type Environment
- type EnvironmentMetadata
- type EnvironmentSpec
- type Project
- type ProjectMetadata
- type ProjectSpec
- type Promotion
- type Release
- type ReleaseChart
- type ReleaseMetadata
- type ReleaseSpec
Constants ¶
View Source
const EnvironmentKind = "Environment"
View Source
const ProjectKind = "Project"
View Source
const ReleaseKind = "Release"
Variables ¶
This section is empty.
Functions ¶
func GetEnvironmentNames ¶
func GetEnvironmentNames(environments []*Environment) []string
func IsValidEnvironment ¶
func IsValidProject ¶
func IsValidRelease ¶
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
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"` // 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"` }
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:"-"` }
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 strings that uniquely identifies the owners, such as email addresses or Jac group identifiers. Owners []string `yaml:"owners,omitempty" json:"owners,omitempty"` // Git repository of the project. Repository string `yaml:"repository,omitempty" json:"repository,omitempty"` // Location of the project in the repository. Should be empty if the whole repository is the project. RepositorySubdirectory string `yaml:"repositorySubdirectory,omitempty" json:"repositorySubdirectory,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:"-"` }
type ReleaseChart ¶
type ReleaseChart struct { // Name is the name of the chart. Name string `yaml:"name,omitempty" json:"name,omitempty"` // RepoUrl is the url of the chart repository. RepoUrl string `yaml:"repoUrl,omitempty" json:"repoUrl,omitempty"` // Version of the chart. Version string `yaml:"version,omitempty" json:"version,omitempty"` }
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"` }
Click to show internal directories.
Click to hide internal directories.