@@ -13,7 +13,7 @@ import (
13
13
// GetParameterHelmImageName gets the value for image-name option for the image
14
14
// from a set of annotations
15
15
func (img * ContainerImage ) GetParameterHelmImageName (annotations map [string ]string ) string {
16
- key := fmt .Sprintf (common .HelmParamImageNameAnnotation , img .NormalizedSymbolicName ())
16
+ key := fmt .Sprintf (common .HelmParamImageNameAnnotation , img .normalizedSymbolicName ())
17
17
val , ok := annotations [key ]
18
18
if ! ok {
19
19
return ""
@@ -24,7 +24,7 @@ func (img *ContainerImage) GetParameterHelmImageName(annotations map[string]stri
24
24
// GetParameterHelmImageTag gets the value for image-tag option for the image
25
25
// from a set of annotations
26
26
func (img * ContainerImage ) GetParameterHelmImageTag (annotations map [string ]string ) string {
27
- key := fmt .Sprintf (common .HelmParamImageTagAnnotation , img .NormalizedSymbolicName ())
27
+ key := fmt .Sprintf (common .HelmParamImageTagAnnotation , img .normalizedSymbolicName ())
28
28
val , ok := annotations [key ]
29
29
if ! ok {
30
30
return ""
@@ -35,7 +35,7 @@ func (img *ContainerImage) GetParameterHelmImageTag(annotations map[string]strin
35
35
// GetParameterHelmImageSpec gets the value for image-spec option for the image
36
36
// from a set of annotations
37
37
func (img * ContainerImage ) GetParameterHelmImageSpec (annotations map [string ]string ) string {
38
- key := fmt .Sprintf (common .HelmParamImageSpecAnnotation , img .NormalizedSymbolicName ())
38
+ key := fmt .Sprintf (common .HelmParamImageSpecAnnotation , img .normalizedSymbolicName ())
39
39
val , ok := annotations [key ]
40
40
if ! ok {
41
41
return ""
@@ -46,7 +46,7 @@ func (img *ContainerImage) GetParameterHelmImageSpec(annotations map[string]stri
46
46
// GetParameterKustomizeImageName gets the value for image-spec option for the
47
47
// image from a set of annotations
48
48
func (img * ContainerImage ) GetParameterKustomizeImageName (annotations map [string ]string ) string {
49
- key := fmt .Sprintf (common .KustomizeApplicationNameAnnotation , img .NormalizedSymbolicName ())
49
+ key := fmt .Sprintf (common .KustomizeApplicationNameAnnotation , img .normalizedSymbolicName ())
50
50
val , ok := annotations [key ]
51
51
if ! ok {
52
52
return ""
@@ -58,7 +58,7 @@ func (img *ContainerImage) GetParameterKustomizeImageName(annotations map[string
58
58
// image from a set of annotations
59
59
func (img * ContainerImage ) HasForceUpdateOptionAnnotation (annotations map [string ]string ) bool {
60
60
forceUpdateAnnotations := []string {
61
- fmt .Sprintf (common .ForceUpdateOptionAnnotation , img .NormalizedSymbolicName ()),
61
+ fmt .Sprintf (common .ForceUpdateOptionAnnotation , img .normalizedSymbolicName ()),
62
62
common .ApplicationWideForceUpdateOptionAnnotation ,
63
63
}
64
64
var forceUpdateVal = ""
@@ -75,7 +75,7 @@ func (img *ContainerImage) HasForceUpdateOptionAnnotation(annotations map[string
75
75
// image from a set of annotations
76
76
func (img * ContainerImage ) GetParameterUpdateStrategy (annotations map [string ]string ) UpdateStrategy {
77
77
updateStrategyAnnotations := []string {
78
- fmt .Sprintf (common .UpdateStrategyAnnotation , img .NormalizedSymbolicName ()),
78
+ fmt .Sprintf (common .UpdateStrategyAnnotation , img .normalizedSymbolicName ()),
79
79
common .ApplicationWideUpdateStrategyAnnotation ,
80
80
}
81
81
var updateStrategyVal = ""
@@ -123,7 +123,7 @@ func (img *ContainerImage) ParseUpdateStrategy(val string) UpdateStrategy {
123
123
// default, to prevent accidental matches.
124
124
func (img * ContainerImage ) GetParameterMatch (annotations map [string ]string ) (MatchFuncFn , interface {}) {
125
125
allowTagsAnnotations := []string {
126
- fmt .Sprintf (common .AllowTagsOptionAnnotation , img .NormalizedSymbolicName ()),
126
+ fmt .Sprintf (common .AllowTagsOptionAnnotation , img .normalizedSymbolicName ()),
127
127
common .ApplicationWideAllowTagsOptionAnnotation ,
128
128
}
129
129
var allowTagsVal = ""
@@ -137,7 +137,7 @@ func (img *ContainerImage) GetParameterMatch(annotations map[string]string) (Mat
137
137
if allowTagsVal == "" {
138
138
// The old match-tag annotation is deprecated and will be subject to removal
139
139
// in a future version.
140
- key := fmt .Sprintf (common .OldMatchOptionAnnotation , img .NormalizedSymbolicName ())
140
+ key := fmt .Sprintf (common .OldMatchOptionAnnotation , img .normalizedSymbolicName ())
141
141
val , ok := annotations [key ]
142
142
if ok {
143
143
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{})
182
182
// GetParameterPullSecret retrieves an image's pull secret credentials
183
183
func (img * ContainerImage ) GetParameterPullSecret (annotations map [string ]string ) * CredentialSource {
184
184
pullSecretAnnotations := []string {
185
- fmt .Sprintf (common .PullSecretAnnotation , img .NormalizedSymbolicName ()),
185
+ fmt .Sprintf (common .PullSecretAnnotation , img .normalizedSymbolicName ()),
186
186
common .ApplicationWidePullSecretAnnotation ,
187
187
}
188
188
var pullSecretVal = ""
@@ -208,7 +208,7 @@ func (img *ContainerImage) GetParameterPullSecret(annotations map[string]string)
208
208
// GetParameterIgnoreTags retrieves a list of tags to ignore from a comma-separated string
209
209
func (img * ContainerImage ) GetParameterIgnoreTags (annotations map [string ]string ) []string {
210
210
ignoreTagsAnnotations := []string {
211
- fmt .Sprintf (common .IgnoreTagsOptionAnnotation , img .NormalizedSymbolicName ()),
211
+ fmt .Sprintf (common .IgnoreTagsOptionAnnotation , img .normalizedSymbolicName ()),
212
212
common .ApplicationWideIgnoreTagsOptionAnnotation ,
213
213
}
214
214
var ignoreTagsVal = ""
@@ -242,7 +242,7 @@ func (img *ContainerImage) GetParameterIgnoreTags(annotations map[string]string)
242
242
func (img * ContainerImage ) GetPlatformOptions (annotations map [string ]string , unrestricted bool ) * options.ManifestOptions {
243
243
logCtx := img .LogContext ()
244
244
var opts * options.ManifestOptions = options .NewManifestOptions ()
245
- key := fmt .Sprintf (common .PlatformsAnnotation , img .NormalizedSymbolicName ())
245
+ key := fmt .Sprintf (common .PlatformsAnnotation , img .normalizedSymbolicName ())
246
246
val , ok := annotations [key ]
247
247
if ! ok {
248
248
if ! unrestricted {
@@ -291,6 +291,6 @@ func ParsePlatform(platformID string) (string, string, string, error) {
291
291
return os , arch , variant , nil
292
292
}
293
293
294
- func (img * ContainerImage ) NormalizedSymbolicName () string {
294
+ func (img * ContainerImage ) normalizedSymbolicName () string {
295
295
return strings .ReplaceAll (img .ImageAlias , "/" , "_" )
296
296
}
0 commit comments