mirror of
https://github.com/fluxcd/flagger.git
synced 2026-04-15 06:57:34 +00:00
Fix panic when annotation of ingress is empty
When the annotation of ingress is not set, the returned value is nil (not empty map). Trying to assign to this map leads to panic. Signed-off-by: Jiří Pinkava <j-pi@seznam.cz>
This commit is contained in:
@@ -29,6 +29,9 @@ func includeLabelsByPrefix(labels map[string]string, includeLabelPrefixes []stri
|
||||
}
|
||||
|
||||
func filterMetadata(meta map[string]string) map[string]string {
|
||||
if meta == nil {
|
||||
meta = map[string]string{}
|
||||
}
|
||||
// prevent Flux from overriding Flagger managed objects
|
||||
meta[toolkitReconcileKey] = toolkitReconcileValue
|
||||
meta[helmDriftDetectionKey] = toolkitReconcileValue
|
||||
|
||||
Reference in New Issue
Block a user