@@ -1019,6 +1019,7 @@ func (p *NginxProvisioner) buildNginxPodTemplateSpec(
10191019 },
10201020 }
10211021
1022+ var containerResources corev1.ResourceRequirements
10221023 if nProxyCfg != nil && nProxyCfg .Kubernetes != nil {
10231024 var podSpec * ngfAPIv1alpha2.PodSpec
10241025 var containerSpec * ngfAPIv1alpha2.ContainerSpec
@@ -1042,7 +1043,8 @@ func (p *NginxProvisioner) buildNginxPodTemplateSpec(
10421043 if containerSpec != nil {
10431044 container := spec .Spec .Containers [0 ]
10441045 if containerSpec .Resources != nil {
1045- container .Resources = * containerSpec .Resources
1046+ containerResources = * containerSpec .Resources
1047+ container .Resources = containerResources
10461048 }
10471049 container .Lifecycle = containerSpec .Lifecycle
10481050 container .VolumeMounts = append (container .VolumeMounts , containerSpec .VolumeMounts ... )
@@ -1174,6 +1176,7 @@ func (p *NginxProvisioner) buildNginxPodTemplateSpec(
11741176 Image : p .cfg .GatewayPodConfig .Image ,
11751177 ImagePullPolicy : pullPolicy ,
11761178 Command : command ,
1179+ Resources : containerResources ,
11771180 SecurityContext : & corev1.SecurityContext {
11781181 AllowPrivilegeEscalation : helpers .GetPointer (false ),
11791182 Capabilities : & corev1.Capabilities {
0 commit comments