@@ -628,8 +628,8 @@ func containerAnnotation(container v1.Container) string {
628
628
return string (json )
629
629
}
630
630
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 {
633
633
data , err := convert .EncodeToMap (resolved )
634
634
if err != nil {
635
635
return "" , err
@@ -645,13 +645,13 @@ func resolvedOfferingsAnnotation(appInstance *v1.AppInstance, container v1.Conta
645
645
return "" , nil
646
646
}
647
647
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 {
649
649
annotations := map [string ]string {
650
650
labels .AcornContainerSpec : containerAnnotation (container ),
651
651
}
652
652
addPrometheusAnnotations (annotations , container )
653
653
654
- offerings , err := resolvedOfferingsAnnotation (appInstance , container )
654
+ offerings , err := resolvedOfferingsAnnotation (appInstance , containerName )
655
655
if err == nil && offerings != "" {
656
656
annotations [labels .AcornContainerResolvedOfferings ] = offerings
657
657
}
@@ -814,7 +814,7 @@ func toFunctionDeployment(req router.Request, appInstance *v1.AppInstance, tag n
814
814
Template : corev1.PodTemplateSpec {
815
815
ObjectMeta : metav1.ObjectMeta {
816
816
Labels : podLabels ,
817
- Annotations : typed .Concat (deploymentAnnotations , podAnnotations (appInstance , container ), secretAnnotations ),
817
+ Annotations : typed .Concat (deploymentAnnotations , podAnnotations (appInstance , name , container ), secretAnnotations ),
818
818
},
819
819
Spec : corev1.PodSpec {
820
820
Affinity : appInstance .Status .Scheduling [name ].Affinity ,
@@ -906,7 +906,7 @@ func toDeployment(req router.Request, appInstance *v1.AppInstance, tag name.Refe
906
906
Template : corev1.PodTemplateSpec {
907
907
ObjectMeta : metav1.ObjectMeta {
908
908
Labels : podLabels ,
909
- Annotations : typed .Concat (deploymentAnnotations , podAnnotations (appInstance , container ), secretAnnotations ),
909
+ Annotations : typed .Concat (deploymentAnnotations , podAnnotations (appInstance , name , container ), secretAnnotations ),
910
910
},
911
911
Spec : corev1.PodSpec {
912
912
Affinity : appInstance .Status .Scheduling [name ].Affinity ,
0 commit comments