Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ImageSource ¶
type ImageSource struct { Name string `json:"name" yaml:"name"` Repository string `json:"repository" yaml:"repository"` Tag string `json:"tag" yaml:"tag"` Versions string `json:"versions" yaml:"versions"` }
ImageSource contains the repository and the tag of a Docker container image. If the respective image is only valid for a specific Kubernetes version, then it must also contain the 'versions' field describing for which versions it can be used.
func (*ImageSource) ToImage ¶
func (i *ImageSource) ToImage(targetK8sVersion string) *Image
ToImage applies the given <targetK8sVersion> to the source to produce an output image. If the tag of an image source is empty, it will use the given <k8sVersion> as tag.
type ImageVector ¶
type ImageVector []*ImageSource
ImageVector is a list of image sources.
func ReadImageVector ¶
func ReadImageVector() (ImageVector, error)
ReadImageVector reads the image.yaml in the chart directory, unmarshals it into a []*ImageSource type and returns it.
func (ImageVector) FindImage ¶
func (v ImageVector) FindImage(name, k8sVersionRuntime, k8sVersionTarget string) (*Image, error)
FindImage returns an image with the given <name> from the sources in the image vector. The <k8sVersion> specifies the kubernetes version the image will be running on. The <targetK8sVersion> specifies the kubernetes version the image shall target. If multiple entries were found, the provided <k8sVersion> is compared with the constraints stated in the image definition. In case multiple images match the search, the first which was found is returned. In case no image was found, an error is returned.