fix a bug caused by previous merged PR
Signed-off-by: yunbo <yunbo10124scut@gmail.com>
This commit is contained in:
parent
4811ca7dd5
commit
68859205f7
|
|
@ -626,7 +626,8 @@ func newTrafficRoutingContext(c *RolloutContext) *trafficrouting.TrafficRoutingC
|
|||
revisionLabelKey = c.Workload.RevisionLabelKey
|
||||
}
|
||||
var selectorPatch map[string]string
|
||||
if !c.Rollout.Spec.Strategy.DisableGenerateCanaryService() && c.Rollout.Spec.Strategy.Canary.PatchPodTemplateMetadata != nil {
|
||||
if !c.Rollout.Spec.Strategy.DisableGenerateCanaryService() && c.Rollout.Spec.Strategy.Canary != nil &&
|
||||
c.Rollout.Spec.Strategy.Canary.PatchPodTemplateMetadata != nil {
|
||||
selectorPatch = c.Rollout.Spec.Strategy.Canary.PatchPodTemplateMetadata.Labels
|
||||
}
|
||||
return &trafficrouting.TrafficRoutingContext{
|
||||
|
|
|
|||
Loading…
Reference in New Issue