Documentation ¶
Index ¶
- type ContainerImage
- func (img *ContainerImage) GetFullNameWithTag() string
- func (img *ContainerImage) GetFullNameWithoutTag() string
- func (img *ContainerImage) GetNewestVersionFromTags(constraint string, availableTags []string) (string, error)
- func (img *ContainerImage) IsUpdatable(newTag, tagSpec string) bool
- func (img *ContainerImage) Original() string
- func (img *ContainerImage) String() string
- func (img *ContainerImage) WithTag(newTag string) *ContainerImage
- type ContainerImageList
- type Credential
- type CredentialSource
- type CredentialSourceType
- type KustomizeImage
- type KustomizeImages
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerImage ¶
type ContainerImage struct { RegistryURL string ImageName string ImageTag string SymbolicName string HelmParamImageName string HelmParamImageVersion string // contains filtered or unexported fields }
func NewFromIdentifier ¶
func NewFromIdentifier(identifier string) *ContainerImage
NewFromIdentifier parses an image identifier and returns a populated ContainerImage
func (*ContainerImage) GetFullNameWithTag ¶
func (img *ContainerImage) GetFullNameWithTag() string
func (*ContainerImage) GetFullNameWithoutTag ¶
func (img *ContainerImage) GetFullNameWithoutTag() string
func (*ContainerImage) GetNewestVersionFromTags ¶
func (img *ContainerImage) GetNewestVersionFromTags(constraint string, availableTags []string) (string, error)
GetNewestVersionFromTags returns the latest available version from a list of tags while optionally taking a semver constraint into account. Returns the original version if no new version could be found from the list of tags.
func (*ContainerImage) IsUpdatable ¶
func (img *ContainerImage) IsUpdatable(newTag, tagSpec string) bool
IsUpdatable checks whether the given image can be updated with newTag while taking tagSpec into account. tagSpec must be given as a semver compatible version spec, i.e. ^1.0 or ~2.1
func (*ContainerImage) Original ¶
func (img *ContainerImage) Original() string
func (*ContainerImage) String ¶
func (img *ContainerImage) String() string
String returns the string representation of given ContainerImage
func (*ContainerImage) WithTag ¶
func (img *ContainerImage) WithTag(newTag string) *ContainerImage
WithTag returns a copy of img with new tag information set
type ContainerImageList ¶
type ContainerImageList []*ContainerImage
func (*ContainerImageList) ContainsImage ¶
func (list *ContainerImageList) ContainsImage(img *ContainerImage, checkVersion bool) *ContainerImage
ContainsImage checks whether img is contained in a list of images
func (*ContainerImageList) String ¶
func (list *ContainerImageList) String() string
String Returns the name of all images as a string, seperated using comma
type Credential ¶
type CredentialSource ¶
type CredentialSource struct { Type CredentialSourceType Registry string SecretNamespace string SecretName string SecretField string EnvName string }
func ParseCredentialSource ¶
func ParseCredentialSource(credentialSource string, requirePrefix bool) (*CredentialSource, error)
func (*CredentialSource) FetchCredentials ¶
func (src *CredentialSource) FetchCredentials(registryURL string, kubeclient *client.KubernetesClient) (*Credential, error)
FetchCredentials fetches the credentials for a given registry according to the credential source.
type CredentialSourceType ¶
type CredentialSourceType int
const ( CredentialSourceUnknown CredentialSourceType = 0 CredentialSourcePullSecret CredentialSourceType = 1 CredentialSourceSecret CredentialSourceType = 2 CredentialSourceEnv CredentialSourceType = 3 )
type KustomizeImage ¶
type KustomizeImage string
func (KustomizeImage) Match ¶
func (i KustomizeImage) Match(j KustomizeImage) bool
if the image name matches (i.e. up to the first delimiter)
type KustomizeImages ¶
type KustomizeImages []KustomizeImage
func (KustomizeImages) Find ¶
func (images KustomizeImages) Find(image KustomizeImage) int
find the image or -1