@@ -628,8 +628,8 @@ func containerAnnotation(container v1.Container) string {
628628 return string (json )
629629}
630630
631- func resolvedOfferingsAnnotation (appInstance * v1.AppInstance , container v1. Container ) (string , error ) {
632- if resolved , exists := appInstance .Status .ResolvedOfferings .Containers [container . Name ]; exists {
631+ func resolvedOfferingsAnnotation (appInstance * v1.AppInstance , containerName string ) (string , error ) {
632+ if resolved , exists := appInstance .Status .ResolvedOfferings .Containers [containerName ]; exists {
633633 data , err := convert .EncodeToMap (resolved )
634634 if err != nil {
635635 return "" , err
@@ -645,13 +645,13 @@ func resolvedOfferingsAnnotation(appInstance *v1.AppInstance, container v1.Conta
645645 return "" , nil
646646}
647647
648- func podAnnotations (appInstance * v1.AppInstance , container v1.Container ) map [string ]string {
648+ func podAnnotations (appInstance * v1.AppInstance , containerName string , container v1.Container ) map [string ]string {
649649 annotations := map [string ]string {
650650 labels .AcornContainerSpec : containerAnnotation (container ),
651651 }
652652 addPrometheusAnnotations (annotations , container )
653653
654- offerings , err := resolvedOfferingsAnnotation (appInstance , container )
654+ offerings , err := resolvedOfferingsAnnotation (appInstance , containerName )
655655 if err == nil && offerings != "" {
656656 annotations [labels .AcornContainerResolvedOfferings ] = offerings
657657 }
@@ -814,7 +814,7 @@ func toFunctionDeployment(req router.Request, appInstance *v1.AppInstance, tag n
814814 Template : corev1.PodTemplateSpec {
815815 ObjectMeta : metav1.ObjectMeta {
816816 Labels : podLabels ,
817- Annotations : typed .Concat (deploymentAnnotations , podAnnotations (appInstance , container ), secretAnnotations ),
817+ Annotations : typed .Concat (deploymentAnnotations , podAnnotations (appInstance , name , container ), secretAnnotations ),
818818 },
819819 Spec : corev1.PodSpec {
820820 Affinity : appInstance .Status .Scheduling [name ].Affinity ,
@@ -906,7 +906,7 @@ func toDeployment(req router.Request, appInstance *v1.AppInstance, tag name.Refe
906906 Template : corev1.PodTemplateSpec {
907907 ObjectMeta : metav1.ObjectMeta {
908908 Labels : podLabels ,
909- Annotations : typed .Concat (deploymentAnnotations , podAnnotations (appInstance , container ), secretAnnotations ),
909+ Annotations : typed .Concat (deploymentAnnotations , podAnnotations (appInstance , name , container ), secretAnnotations ),
910910 },
911911 Spec : corev1.PodSpec {
912912 Affinity : appInstance .Status .Scheduling [name ].Affinity ,
0 commit comments