@@ -13,7 +13,7 @@ import (
1313// GetParameterHelmImageName gets the value for image-name option for the image
1414// from a set of annotations
1515func (img * ContainerImage ) GetParameterHelmImageName (annotations map [string ]string ) string {
16- key := fmt .Sprintf (common .HelmParamImageNameAnnotation , img .normalizedSymbolicName ())
16+ key := fmt .Sprintf (common .HelmParamImageNameAnnotation , img .NormalizedSymbolicName ())
1717 val , ok := annotations [key ]
1818 if ! ok {
1919 return ""
@@ -24,7 +24,7 @@ func (img *ContainerImage) GetParameterHelmImageName(annotations map[string]stri
2424// GetParameterHelmImageTag gets the value for image-tag option for the image
2525// from a set of annotations
2626func (img * ContainerImage ) GetParameterHelmImageTag (annotations map [string ]string ) string {
27- key := fmt .Sprintf (common .HelmParamImageTagAnnotation , img .normalizedSymbolicName ())
27+ key := fmt .Sprintf (common .HelmParamImageTagAnnotation , img .NormalizedSymbolicName ())
2828 val , ok := annotations [key ]
2929 if ! ok {
3030 return ""
@@ -35,7 +35,7 @@ func (img *ContainerImage) GetParameterHelmImageTag(annotations map[string]strin
3535// GetParameterHelmImageSpec gets the value for image-spec option for the image
3636// from a set of annotations
3737func (img * ContainerImage ) GetParameterHelmImageSpec (annotations map [string ]string ) string {
38- key := fmt .Sprintf (common .HelmParamImageSpecAnnotation , img .normalizedSymbolicName ())
38+ key := fmt .Sprintf (common .HelmParamImageSpecAnnotation , img .NormalizedSymbolicName ())
3939 val , ok := annotations [key ]
4040 if ! ok {
4141 return ""
@@ -46,7 +46,7 @@ func (img *ContainerImage) GetParameterHelmImageSpec(annotations map[string]stri
4646// GetParameterKustomizeImageName gets the value for image-spec option for the
4747// image from a set of annotations
4848func (img * ContainerImage ) GetParameterKustomizeImageName (annotations map [string ]string ) string {
49- key := fmt .Sprintf (common .KustomizeApplicationNameAnnotation , img .normalizedSymbolicName ())
49+ key := fmt .Sprintf (common .KustomizeApplicationNameAnnotation , img .NormalizedSymbolicName ())
5050 val , ok := annotations [key ]
5151 if ! ok {
5252 return ""
@@ -58,7 +58,7 @@ func (img *ContainerImage) GetParameterKustomizeImageName(annotations map[string
5858// image from a set of annotations
5959func (img * ContainerImage ) HasForceUpdateOptionAnnotation (annotations map [string ]string ) bool {
6060 forceUpdateAnnotations := []string {
61- fmt .Sprintf (common .ForceUpdateOptionAnnotation , img .normalizedSymbolicName ()),
61+ fmt .Sprintf (common .ForceUpdateOptionAnnotation , img .NormalizedSymbolicName ()),
6262 common .ApplicationWideForceUpdateOptionAnnotation ,
6363 }
6464 var forceUpdateVal = ""
@@ -75,7 +75,7 @@ func (img *ContainerImage) HasForceUpdateOptionAnnotation(annotations map[string
7575// image from a set of annotations
7676func (img * ContainerImage ) GetParameterUpdateStrategy (annotations map [string ]string ) UpdateStrategy {
7777 updateStrategyAnnotations := []string {
78- fmt .Sprintf (common .UpdateStrategyAnnotation , img .normalizedSymbolicName ()),
78+ fmt .Sprintf (common .UpdateStrategyAnnotation , img .NormalizedSymbolicName ()),
7979 common .ApplicationWideUpdateStrategyAnnotation ,
8080 }
8181 var updateStrategyVal = ""
@@ -123,7 +123,7 @@ func (img *ContainerImage) ParseUpdateStrategy(val string) UpdateStrategy {
123123// default, to prevent accidental matches.
124124func (img * ContainerImage ) GetParameterMatch (annotations map [string ]string ) (MatchFuncFn , interface {}) {
125125 allowTagsAnnotations := []string {
126- fmt .Sprintf (common .AllowTagsOptionAnnotation , img .normalizedSymbolicName ()),
126+ fmt .Sprintf (common .AllowTagsOptionAnnotation , img .NormalizedSymbolicName ()),
127127 common .ApplicationWideAllowTagsOptionAnnotation ,
128128 }
129129 var allowTagsVal = ""
@@ -137,7 +137,7 @@ func (img *ContainerImage) GetParameterMatch(annotations map[string]string) (Mat
137137 if allowTagsVal == "" {
138138 // The old match-tag annotation is deprecated and will be subject to removal
139139 // in a future version.
140- key := fmt .Sprintf (common .OldMatchOptionAnnotation , img .normalizedSymbolicName ())
140+ key := fmt .Sprintf (common .OldMatchOptionAnnotation , img .NormalizedSymbolicName ())
141141 val , ok := annotations [key ]
142142 if ok {
143143 logCtx .Warnf ("The 'tag-match' annotation is deprecated and subject to removal. Please use 'allow-tags' annotation instead." )
@@ -182,7 +182,7 @@ func (img *ContainerImage) ParseMatchfunc(val string) (MatchFuncFn, interface{})
182182// GetParameterPullSecret retrieves an image's pull secret credentials
183183func (img * ContainerImage ) GetParameterPullSecret (annotations map [string ]string ) * CredentialSource {
184184 pullSecretAnnotations := []string {
185- fmt .Sprintf (common .PullSecretAnnotation , img .normalizedSymbolicName ()),
185+ fmt .Sprintf (common .PullSecretAnnotation , img .NormalizedSymbolicName ()),
186186 common .ApplicationWidePullSecretAnnotation ,
187187 }
188188 var pullSecretVal = ""
@@ -208,7 +208,7 @@ func (img *ContainerImage) GetParameterPullSecret(annotations map[string]string)
208208// GetParameterIgnoreTags retrieves a list of tags to ignore from a comma-separated string
209209func (img * ContainerImage ) GetParameterIgnoreTags (annotations map [string ]string ) []string {
210210 ignoreTagsAnnotations := []string {
211- fmt .Sprintf (common .IgnoreTagsOptionAnnotation , img .normalizedSymbolicName ()),
211+ fmt .Sprintf (common .IgnoreTagsOptionAnnotation , img .NormalizedSymbolicName ()),
212212 common .ApplicationWideIgnoreTagsOptionAnnotation ,
213213 }
214214 var ignoreTagsVal = ""
@@ -242,7 +242,7 @@ func (img *ContainerImage) GetParameterIgnoreTags(annotations map[string]string)
242242func (img * ContainerImage ) GetPlatformOptions (annotations map [string ]string , unrestricted bool ) * options.ManifestOptions {
243243 logCtx := img .LogContext ()
244244 var opts * options.ManifestOptions = options .NewManifestOptions ()
245- key := fmt .Sprintf (common .PlatformsAnnotation , img .normalizedSymbolicName ())
245+ key := fmt .Sprintf (common .PlatformsAnnotation , img .NormalizedSymbolicName ())
246246 val , ok := annotations [key ]
247247 if ! ok {
248248 if ! unrestricted {
@@ -291,6 +291,6 @@ func ParsePlatform(platformID string) (string, string, string, error) {
291291 return os , arch , variant , nil
292292}
293293
294- func (img * ContainerImage ) normalizedSymbolicName () string {
294+ func (img * ContainerImage ) NormalizedSymbolicName () string {
295295 return strings .ReplaceAll (img .ImageAlias , "/" , "_" )
296296}
0 commit comments