diff --git a/rollout/experiment.go b/rollout/experiment.go index 807d44ddb7..a000fe014e 100644 --- a/rollout/experiment.go +++ b/rollout/experiment.go @@ -230,7 +230,7 @@ func (c *rolloutContext) createExperimentWithCollisionHandling(newEx *v1alpha1.E // we likely reconciled the rollout with a stale cache (quite common). return existingEx, nil } - newEx.Name = fmt.Sprintf("%s.%d", baseName, collisionCount) + newEx.Name = fmt.Sprintf("%s-%d", baseName, collisionCount) collisionCount++ } } diff --git a/rollout/experiment_test.go b/rollout/experiment_test.go index 48c05e4233..6ba0ca43b0 100644 --- a/rollout/experiment_test.go +++ b/rollout/experiment_test.go @@ -165,7 +165,7 @@ func TestCreateExperimentWithCollision(t *testing.T) { f.run(getKey(r2, t)) createdEx := f.getCreatedExperiment(createExIndex) - assert.Equal(t, ex.Name+".1", createdEx.Name) + assert.Equal(t, ex.Name+"-1", createdEx.Name) patch := f.getPatchedRollout(patchIndex) expectedPatch := `{ "status": {