Skip to content

Commit

Permalink
Merge pull request #335 from linkernetworks/phstsai/pod-labels
Browse files Browse the repository at this point in the history
[Bug] Assign pod labels when creating deployment
  • Loading branch information
John-Lin authored Oct 1, 2018
2 parents ae8b146 + bbfd052 commit 9ecd044
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/deployment/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,11 @@ func CreateDeployment(sp *serviceprovider.Container, deploy *entity.Deployment)
},
}

// pass the same labels to pod
for k, v := range deploy.Labels {
p.Spec.Template.ObjectMeta.Labels[k] = v
}

_, err = sp.KubeCtl.CreateDeployment(&p, deploy.Namespace)
return err
}
Expand Down

0 comments on commit 9ecd044

Please sign in to comment.