Documentation
¶
Overview ¶
Package v1 defines some common types used in TKR.
Index ¶
- func FilterTkgVersionByTkr(compatibility Compatibility, tkrName string) (version string, err error)
- type AMIInfo
- type AMIInfos
- type Addon
- type Addons
- type AzureInfo
- type AzureInfos
- type Bom
- func (b *Bom) Addons() (Addons, error)
- func (b *Bom) Components() (map[string][]ComponentInfo, error)
- func (b *Bom) GetAMIInfo() (map[string][]AMIInfo, error)
- func (b *Bom) GetAddon(name string) (Addon, error)
- func (b *Bom) GetAzureInfo() ([]AzureInfo, error)
- func (b *Bom) GetCompatibility() string
- func (b *Bom) GetComponent(name string) ([]ComponentInfo, error)
- func (b *Bom) GetImageInfo(componentName, componentVersion, imageName string) (ImageInfo, error)
- func (b *Bom) GetImageRepository() (string, error)
- func (b *Bom) GetOVAInfo() ([]OVAInfo, error)
- func (b *Bom) GetReleaseVersion() (string, error)
- type BomContent
- type Compatibility
- type CompatibilityMetadata
- type ComponentInfo
- type ComponentReference
- type DNSAddOnType
- type ImageConfig
- type ImageInfo
- type ImagePathInfo
- type ManagementClusterVersion
- type ManagementClusterVersions
- type OSInfo
- type OVAInfo
- type OVAInfos
- type Release
- type ReleaseInfo
- type TkgBom
- type TkgBomContent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterTkgVersionByTkr ¶
func FilterTkgVersionByTkr(compatibility Compatibility, tkrName string) (version string, err error)
Types ¶
type AMIInfo ¶
type AMIInfo struct { ID string `yaml:"id"` OSInfo Metadata map[string]interface{} `yaml:"metadata,omitempty"` }
AMIInfo defines information about an AMI shipped
type Addon ¶
type Addon struct { Category string `yaml:"category,omitempty"` ClusterTypes []string `yaml:"clusterTypes,omitempty"` Version string `yaml:"version,omitempty"` TemplatesImagePath string `yaml:"templatesImagePath,omitempty"` TemplatesImageTag string `yaml:"templatesImageTag,omitempty"` AddonTemplatesImage []ComponentReference `yaml:"addonTemplatesImage,omitempty"` AddonContainerImages []ComponentReference `yaml:"addonContainerImages,omitempty"` PackageName string `yaml:"packageName,omitempty"` }
Addon contains addon info
type AzureInfo ¶
type AzureInfo struct { Sku string `yaml:"sku"` Publisher string `yaml:"publisher"` Offer string `yaml:"offer"` Version string `yaml:"version"` ThirdPartyImage bool `yaml:"thirdPartyImage,omitempty"` Metadata map[string]interface{} `yaml:"metadata,omitempty"` OSInfo }
AzureInfo defines information about an Azure Image shipped
type Bom ¶
type Bom struct {
// contains filtered or unexported fields
}
Bom represents a BOM file
func (*Bom) Components ¶
func (b *Bom) Components() (map[string][]ComponentInfo, error)
Components gets all release components in the BOM file
func (*Bom) GetAMIInfo ¶
GetAMIInfo gets ami info
func (*Bom) GetAzureInfo ¶
GetAzureInfo gets azure os image info
func (*Bom) GetCompatibility ¶
func (*Bom) GetComponent ¶
func (b *Bom) GetComponent(name string) ([]ComponentInfo, error)
GetComponent gets a release component
func (*Bom) GetImageInfo ¶
GetImageInfo gets a image in a component of specific version. If version is "" or not found, get the image of the first version in the component array
func (*Bom) GetImageRepository ¶
GetImageRepository gets the image repository
func (*Bom) GetOVAInfo ¶
GetOVAInfo gets vsphere ova info
func (*Bom) GetReleaseVersion ¶
GetReleaseVersion gets the Tanzu release version
type BomContent ¶
type BomContent struct { Release Release `yaml:"release"` Components map[string][]ComponentInfo `yaml:"components"` ImageConfig ImageConfig `yaml:"imageConfig"` OVA OVAInfos `yaml:"ova"` AMI AMIInfos `yaml:"ami,omitempty"` Azure AzureInfos `yaml:"azure,omitempty"` Addons Addons `yaml:"addons,omitempty"` Compatibility ImagePathInfo `yaml:"tkr-compatibility"` }
BomContent contains the content of a BOM file
type Compatibility ¶
type Compatibility struct {
ManagementClusterVersions []ManagementClusterVersions `yaml:"managementClusterVersions"`
}
func NewCompatibility ¶
func NewCompatibility(data []byte) (Compatibility, error)
type CompatibilityMetadata ¶
type CompatibilityMetadata struct {
ManagementClusterVersions []ManagementClusterVersion `json:"managementClusterVersions"`
}
CompatibilityMetadata contains tanzu release support matrix
type ComponentInfo ¶
type ComponentInfo struct { Version string `yaml:"version"` // Each component can optionally have container images associated with it Images map[string]ImageInfo `yaml:"images,omitempty"` // Metadata section can be anything for the component Metadata map[string]string `yaml:"metadata,omitempty"` }
ComponentInfo contains component information
type ComponentReference ¶
type ComponentReference struct { ComponentRef string `yaml:"componentRef"` ImageRefs []string `yaml:"imageRefs"` }
ComponentReference references the images in a component
type DNSAddOnType ¶
type DNSAddOnType string
DNSAddOnType defines string identifying DNS add-on types
type ImageConfig ¶
type ImageConfig struct {
ImageRepository string `yaml:"imageRepository"`
}
ImageConfig contains the path of the image registry
type ImagePathInfo ¶
type ImagePathInfo struct {
ImagePath string `yaml:"imagePath"`
}
type ManagementClusterVersion ¶
type ManagementClusterVersion struct { TKGVersion string `json:"version"` SupportedKubernetesVersions []string `json:"supportedKubernetesVersions"` }
ManagementClusterVersion contains kubernetes versions that are supported by the management cluster with a certain TKG version.
type OSInfo ¶
type OSInfo struct { Name string `yaml:"name"` Version string `yaml:"version"` Arch string `yaml:"arch"` }
OSInfo contains the OS information
type OVAInfo ¶
type OVAInfo struct { Name string `yaml:"name"` OSInfo Version string `yaml:"version"` Metadata map[string]interface{} `yaml:"metadata,omitempty"` }
OVAInfo gets the Open Virtual Appliance (OVA) information
type Release ¶
type Release struct {
Version string `yaml:"version"`
}
Release contains the release name.
type ReleaseInfo ¶
type ReleaseInfo struct {
Version string `yaml:"version"`
}
ReleaseInfo represents the release version information
type TkgBom ¶
type TkgBom struct {
// contains filtered or unexported fields
}
func (*TkgBom) GetBomContent ¶
func (b *TkgBom) GetBomContent() (TkgBomContent, error)
func (*TkgBom) GetTKRPackage ¶
nolint:revive,stylecheck
func (*TkgBom) GetTKRPackageRepo ¶
nolint:revive,stylecheck
type TkgBomContent ¶
type TkgBomContent struct { Default *defaultInfo `yaml:"default"` Release *ReleaseInfo `yaml:"release"` Components map[string][]ComponentInfo `yaml:"components"` KindKubeadmConfigSpec []string `yaml:"kindKubeadmConfigSpec"` KubeadmConfigSpec *kubeadmConfig `yaml:"kubeadmConfigSpec"` ImageConfig *imageConfig `yaml:"imageConfig"` Extensions map[string]*extensionInfo `yaml:"extensions,omitempty"` TKRBOM *tkrBOMInfo `yaml:"tkr-bom"` TKRCompatibility *tkrCompatibilityInfo `yaml:"tkr-compatibility"` TKRPackageRepo tkrPackageRepo `yaml:"tkr-package-repo"` TKRPackage tkrPackage `yaml:"tkr-package"` }
TkgBomContent defines the struct to represent BOM information