@@ -6,6 +6,7 @@ package controllers
66
77import (
88 _ "embed"
9+ "maps"
910 "strconv"
1011
1112 monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
@@ -124,7 +125,6 @@ func createImageBuildLogForwarderSidecar(r *SFController, annotations map[string
124125 sidecar , storageEmptyDir := logging .CreateFluentBitSideCarContainer ("diskimage-builder" , builderFluentBitLabels , volumeMounts , r .isOpenShift )
125126 annotations ["dib-fluent-bit.conf" ] = utils .Checksum ([]byte (fbForwarderConfig ["fluent-bit.conf" ]))
126127 annotations ["dib-fluent-bit-parser" ] = utils .Checksum ([]byte (fbForwarderConfig ["parsers.conf" ]))
127- annotations ["dib-fluent-bit-image" ] = sidecar .Image
128128 return []apiv1.Volume {volume , storageEmptyDir }, sidecar
129129
130130}
@@ -518,7 +518,6 @@ func (r *SFController) DeployNodepoolBuilder(statsdExporterVolume apiv1.Volume,
518518 "ssh_config" : utils .Checksum ([]byte (builderSSHConfig )),
519519 "buildlogs_httpd_config" : utils .Checksum ([]byte (httpdBuildLogsDirConfig )),
520520 "statsd_mapping" : utils .Checksum ([]byte (nodepoolStatsdMappingConfig )),
521- "image" : base .NodepoolBuilderImage (),
522521 "nodepool-providers-secrets" : getSecretsVersion (providersSecrets , providerSecretsExists ),
523522 "serial" : "18" ,
524523 "corporate-ca-certs-version" : getCMVersion (corporateCM , corporateCMExists ),
@@ -585,6 +584,7 @@ func (r *SFController) DeployNodepoolBuilder(statsdExporterVolume apiv1.Volume,
585584 nb .Spec .Template .Spec .Volumes = append (nb .Spec .Template .Spec .Volumes , fbVolumes ... )
586585 }
587586
587+ maps .Copy (annotations , ImagesAnnotationsFromSpec (nb .Spec .Template .Spec .Containers ))
588588 nb .Spec .Template .ObjectMeta .Annotations = annotations
589589
590590 // Append statsd exporter sidecar
@@ -715,7 +715,6 @@ func (r *SFController) DeployNodepoolLauncher(statsdExporterVolume apiv1.Volume,
715715 "statsd_mapping" : utils .Checksum ([]byte (nodepoolStatsdMappingConfig )),
716716 "serial" : "12" ,
717717 // When the Secret ResourceVersion field change (when edited) we force a nodepool-launcher restart
718- "image" : base .NodepoolLauncherImage (),
719718 "nodepool-providers-secrets" : getSecretsVersion (providersSecrets , providerSecretsExists ),
720719 "corporate-ca-certs-version" : getCMVersion (corporateCM , corporateCMExists ),
721720 }
@@ -778,6 +777,7 @@ func (r *SFController) DeployNodepoolLauncher(statsdExporterVolume apiv1.Volume,
778777 nl .Spec .Template .Spec .Containers = []apiv1.Container {
779778 container ,
780779 monitoring .MkStatsdExporterSideCarContainer (shortIdent , "statsd-config" , relayAddress , r .isOpenShift )}
780+ maps .Copy (annotations , ImagesAnnotationsFromSpec (nl .Spec .Template .Spec .Containers ))
781781 nl .Spec .Template .ObjectMeta .Annotations = annotations
782782 nl .Spec .Template .Spec .Containers [0 ].ReadinessProbe = base .MkReadinessHTTPProbe ("/ready" , launcherPort )
783783 nl .Spec .Template .Spec .Containers [0 ].LivenessProbe = base .MkLiveHTTPProbe ("/ready" , launcherPort )
0 commit comments