@@ -92,10 +92,9 @@ func jsonataDeployment(ctx context.Context, withCombinedTrustBundle bool, cw *re
9292
9393 d := appsv1.Deployment {
9494 ObjectMeta : metav1.ObjectMeta {
95- Name : kmeta .ChildName (transform .Name , JsonataResourcesNameSuffix ),
96- Namespace : transform .GetNamespace (),
97- Labels : jsonataLabels (transform ),
98- Annotations : make (map [string ]string , 2 ),
95+ Name : kmeta .ChildName (transform .Name , JsonataResourcesNameSuffix ),
96+ Namespace : transform .GetNamespace (),
97+ Labels : jsonataLabels (transform ),
9998 OwnerReferences : []metav1.OwnerReference {
10099 * kmeta .NewControllerRef (transform ),
101100 },
@@ -114,6 +113,7 @@ func jsonataDeployment(ctx context.Context, withCombinedTrustBundle bool, cw *re
114113 JsonataResourcesLabelKey : JsonataResourcesLabelValue ,
115114 NameLabelKey : transform .GetName (),
116115 },
116+ Annotations : make (map [string ]string ),
117117 },
118118 Spec : corev1.PodSpec {
119119 Containers : []corev1.Container {
@@ -269,11 +269,11 @@ func jsonataDeployment(ctx context.Context, withCombinedTrustBundle bool, cw *re
269269
270270 // hashPayload annotation is used to detect and roll out a new deployment when expressions change.
271271 hash := sha256 .Sum256 ([]byte (hashPayload ))
272- d .Annotations [JsonataExpressionHashKey ] = base64 .StdEncoding .EncodeToString (hash [:])
272+ d .Spec . Template . Annotations [JsonataExpressionHashKey ] = base64 .StdEncoding .EncodeToString (hash [:])
273273
274274 if certificate != nil && certificate .Status .Revision != nil {
275275 // certificate revision annotation is used to detect and roll out a new deployment when certificates change.
276- d .Annotations [JsonataCertificateRevisionKey ] = fmt .Sprintf ("%d" , * certificate .Status .Revision )
276+ d .Spec . Template . Annotations [JsonataCertificateRevisionKey ] = fmt .Sprintf ("%d" , * certificate .Status .Revision )
277277 }
278278
279279 if feature .FromContext (ctx ).IsStrictTransportEncryption () {
0 commit comments