Skip to content

Commit

Permalink
fix hardcoded index
Browse files Browse the repository at this point in the history
Signed-off-by: Hui Kang <[email protected]>
  • Loading branch information
Hui Kang committed Jun 10, 2021
1 parent 24e8350 commit 81d600f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rollout/trafficrouting/istio/istio.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ func destinationRuleReplaceExtraMarshal(dRule *DestinationRule) []byte {
}

extra := map[string]interface{}{}
inputbyte, _ := json.Marshal(dRule.Spec.Subsets[1].Extra)
inputbyte, _ := json.Marshal(subset.Extra)
json.Unmarshal(inputbyte, &extra)

subset.Extra = nil
Expand All @@ -266,7 +266,7 @@ func updateDestinationRule(ctx context.Context, client dynamic.ResourceInterface
return false, err
}
dRuleNewBytes := destinationRuleReplaceExtraMarshal(dRuleNew)
log.Infof("dRuleNewBytes: %s", string(dRuleNewBytes))
log.Debugf("dRuleNewBytes: %s", string(dRuleNewBytes))

patch, err := jsonpatch.CreateMergePatch(dRuleBytes, dRuleNewBytes)
if err != nil {
Expand Down

0 comments on commit 81d600f

Please sign in to comment.