Skip to content

Commit

Permalink
apps: ignore name field in template spec
Browse files Browse the repository at this point in the history
  • Loading branch information
mfojtik committed Oct 5, 2017
1 parent 0e6fb69 commit 1ec84c3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/apps/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,12 @@ func HasUpdatedImages(dc *deployapi.DeploymentConfig, rc *v1.ReplicationControll
// comparing replication controller template with deployment config template.
func filterOutTemplateAnnotationsAndLabels(in *v1.PodTemplateSpec) *v1.PodTemplateSpec {
out := *in
// TODO: Some templates and new-app sets the 'name' for the template
// PodTemplateSpec, however we don't copy it when we creating the deployment.
// That results to endless rollouts as the config change sees that as a change
// in DC. Unfortunatelly copying the name into RC will cause mass redeployment
// for all existing deployments with 'name'.
out.Name = ""
out.Annotations = map[string]string{}
out.Labels = map[string]string{}
if in.Annotations != nil {
Expand Down

0 comments on commit 1ec84c3

Please sign in to comment.