Skip to content

Commit

Permalink
fix nil check
Browse files Browse the repository at this point in the history
Signed-off-by: Megrez Lu <[email protected]>
  • Loading branch information
lujiajing1126 committed Nov 29, 2024
1 parent cb609fa commit 8880544
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controller/rollout/rollout_progressing.go
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ func newTrafficRoutingContext(c *RolloutContext) *trafficrouting.TrafficRoutingC
revisionLabelKey = c.Workload.RevisionLabelKey
}
var selectorPatch map[string]string
if c.Rollout.Spec.Strategy.GetRollingStyle() == v1beta1.CanaryRollingStyle {
if !c.Rollout.Spec.Strategy.DisableGenerateCanaryService() && c.Rollout.Spec.Strategy.Canary.PatchPodTemplateMetadata != nil {
selectorPatch = c.Rollout.Spec.Strategy.Canary.PatchPodTemplateMetadata.Labels
}
return &trafficrouting.TrafficRoutingContext{
Expand Down

0 comments on commit 8880544

Please sign in to comment.