Documentation ¶
Index ¶
- func GetImageRegistry(image string) (string, error)
- func GetImageRepository(image string) (string, error)
- func RemoveTagFromStackImages(stack *kabanerov1alpha2.StackVersion, stackName string) error
- func SecretAnnotationFilter(secretList *corev1.SecretList, filterStrings ...string) (*corev1.Secret, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetImageRegistry ¶
Retrieves the registry (domain) part of the input image. If a registry is not found, the default registry (docker.io) is returned. Reference: https://github.com/docker/distribution/blob/release/2.7/reference/reference.go
func GetImageRepository ¶
Retrieves the repository part of input image that contains both a repo path and tag. An error is returned if the image input is empty.
Reference (docker-specific, but should apply to others):
https://github.com/docker/distribution/blob/release/2.7/reference/reference.go https://docs.docker.com/engine/reference/commandline/tag/
func RemoveTagFromStackImages ¶
func RemoveTagFromStackImages(stack *kabanerov1alpha2.StackVersion, stackName string) error
Removes the tag portion of all images associated with the input stack version.
func SecretAnnotationFilter ¶
func SecretAnnotationFilter(secretList *corev1.SecretList, filterStrings ...string) (*corev1.Secret, error)
Custom filter method that allows the retrieval of a secret containing an annotation with a key of the form [string]-[number] (i.e kabanero.io/git-0), and a value that contains a hostname/domain (i.e. github.com). If there are multiple matching secrets, the annotation with the lexically lowest value key is used. If no secret matches annotation key, but there are secrets with an annotation value that matches the hostname/domain, the first one seen is used. If a secret could not be found, nil is returned.
Types ¶
This section is empty.