fix nil check
Signed-off-by: Megrez Lu <lujiajing1126@gmail.com>
This commit is contained in:
parent
cb609fa210
commit
8880544881
|
|
@ -601,7 +601,7 @@ func newTrafficRoutingContext(c *RolloutContext) *trafficrouting.TrafficRoutingC
|
||||||
revisionLabelKey = c.Workload.RevisionLabelKey
|
revisionLabelKey = c.Workload.RevisionLabelKey
|
||||||
}
|
}
|
||||||
var selectorPatch map[string]string
|
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
|
selectorPatch = c.Rollout.Spec.Strategy.Canary.PatchPodTemplateMetadata.Labels
|
||||||
}
|
}
|
||||||
return &trafficrouting.TrafficRoutingContext{
|
return &trafficrouting.TrafficRoutingContext{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue