Documentation
¶
Index ¶
- Constants
- Variables
- func ModifyComponentImageConfig(repoRootDir, imageConfigRelPath, configKey, newValue string) error
- func ReplaceConfigVersions(rootDir, gitRef string) error
- func UpdateCalicoComponents(repoDir string, components map[string]string) error
- func UpdateCalicoConfigVersion(repoRootDir, version string) error
- func UpdateEnterpriseComponents(repoDir string, components map[string]string) error
- func UpdateEnterpriseConfigVersion(repoRootDir, version string) error
- type CalicoVersion
- func CalicoConfigVersions(repoDir string) (*CalicoVersion, error)
- func EnterpriseConfigVersions(repoDir string) (*CalicoVersion, error)
- func GitRefConfigCalicoVersion(gitRef string) (*CalicoVersion, error)
- func GitRefConfigEnterpriseVersion(gitRef string) (*CalicoVersion, error)
- func ParseConfigVersions(content []byte) (*CalicoVersion, error)
- type Component
- type VersionConfig
- type Versions
- type VersionsConfig
Constants ¶
const ( CalicoRegistryConfigKey = "CalicoRegistry" CalicoImagePathConfigKey = "CalicoImagePath" EnterpriseRegistryConfigKey = "TigeraRegistry" EnterpriseImagePathConfigKey = "TigeraImagePath" OperatorRegistryConfigKey = "OperatorRegistry" OperatorImagePathConfigKey = "OperatorImagePath" )
Component image config key constants used as keys in ModifyComponentImageConfig.
const ( // CalicoConfigPath is the repo-relative path to the Calico versions config file. CalicoConfigPath = configDir + "/calico_versions.yml" // EnterpriseConfigPath is the repo-relative path to the Enterprise versions config file. EnterpriseConfigPath = configDir + "/enterprise_versions.yml" // MakeTargetGenVersionsCalico is the make target to regenerate Calico versions. MakeTargetGenVersionsCalico = "gen-versions-calico" // MakeTargetGenVersionsEnterprise is the make target to regenerate Enterprise versions. MakeTargetGenVersionsEnterprise = "gen-versions-enterprise" )
Variables ¶
var ComponentImageConfigRelPath = "pkg/components/images.go"
ComponentImageConfigRelPath is the repo-relative path to the component image config file.
Functions ¶
func ModifyComponentImageConfig ¶
ModifyComponentImageConfig modifies variables in the specified component image config file.
func ReplaceConfigVersions ¶
func UpdateCalicoComponents ¶
UpdateCalicoComponents updates individual component versions in the Calico config file.
func UpdateCalicoConfigVersion ¶
UpdateCalicoConfigVersion sets all component versions and the title in the Calico config file to version.
func UpdateEnterpriseComponents ¶
UpdateEnterpriseComponents updates individual component versions in the Enterprise config file.
func UpdateEnterpriseConfigVersion ¶
UpdateEnterpriseConfigVersion sets all component versions and the title in the Enterprise config file to version.
Types ¶
type CalicoVersion ¶
type CalicoVersion struct {
Title string `yaml:"title"`
Components map[string]Component `yaml:"components"`
}
CalicoVersion represents a config/calico_versions.yml or enterprise_versions.yml.
func CalicoConfigVersions ¶
func CalicoConfigVersions(repoDir string) (*CalicoVersion, error)
CalicoConfigVersions reads the CalicoVersion from the local Calico config file.
func EnterpriseConfigVersions ¶
func EnterpriseConfigVersions(repoDir string) (*CalicoVersion, error)
EnterpriseConfigVersions reads the CalicoVersion from the local Enterprise config file.
func GitRefConfigCalicoVersion ¶
func GitRefConfigCalicoVersion(gitRef string) (*CalicoVersion, error)
func GitRefConfigEnterpriseVersion ¶
func GitRefConfigEnterpriseVersion(gitRef string) (*CalicoVersion, error)
func ParseConfigVersions ¶
func ParseConfigVersions(content []byte) (*CalicoVersion, error)
ParseConfigVersions parses a versions YAML file content.
type VersionConfig ¶
VersionConfig holds version, registry, and optional local CRD directory for one product.
type Versions ¶
Versions holds the Calico and Enterprise release version strings.
func ConfigVersions ¶
ConfigVersions reads the current Calico and Enterprise title versions from their config files.
func GitRefConfigVersions ¶
GitRefConfigVersions reads Calico and Enterprise title versions from the given git ref.
type VersionsConfig ¶
type VersionsConfig struct {
RepoRootDir string
Calico VersionConfig
Enterprise VersionConfig
}
VersionsConfig holds configuration for generating both Calico and Enterprise versions.
func (*VersionsConfig) Generate ¶
func (vc *VersionsConfig) Generate() error
Generate updates the version config files and runs the appropriate make targets to regenerate derived files for the configured products.