Skip to content

Commit

Permalink
Fix panic
Browse files Browse the repository at this point in the history
  • Loading branch information
barchw committed Dec 13, 2024
1 parent 71a3b88 commit 93bd559
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/v1alpha2/istio_merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,13 +259,13 @@ func (i *Istio) mergeResources(op iopv1alpha1.IstioOperator) (iopv1alpha1.IstioO
}

if i.Spec.Components.Proxy != nil && i.Spec.Components.Proxy.K8S != nil && i.Spec.Components.Proxy.K8S.Resources != nil {
if i.Spec.Components.Proxy.K8S.Resources.Limits != nil {
if i.Spec.Components.Proxy.K8S.Resources.Limits.Cpu != nil {
err = valuesMap.SetPath("global.proxy.resources.limits.cpu", *i.Spec.Components.Proxy.K8S.Resources.Limits.Cpu)
if err != nil {
return iopv1alpha1.IstioOperator{}, err
}
}
if i.Spec.Components.Proxy.K8S.Resources.Limits != nil {
if i.Spec.Components.Proxy.K8S.Resources.Limits.Memory != nil {
err = valuesMap.SetPath("global.proxy.resources.limits.memory", *i.Spec.Components.Proxy.K8S.Resources.Limits.Memory)
if err != nil {
return iopv1alpha1.IstioOperator{}, err
Expand Down

0 comments on commit 93bd559

Please sign in to comment.