pod_task: use annotations rather than labels for roles

Roles support in Kubernetes-Mesos was done using pod labels. This
commits moves this to pod annotations. Pod label yaml files don't
support '*' characters, furthermore roles are consumed by the scheduler
only and are not meant for querying/filtering.
This commit is contained in:
Sergiusz Urbaniak
2015-12-11 19:18:47 +01:00
parent 3680268c52
commit 1fd3bc087b
5 changed files with 8 additions and 29 deletions

View File

@@ -73,7 +73,7 @@ var _ = Describe("Mesos", func() {
fmt.Sprintf("number of static pods in namespace %s is %d", ns, numpods))
})
It("schedules pods labelled with roles on correct slaves", func() {
It("schedules pods annotated with roles on correct slaves", func() {
// launch a pod to find a node which can launch a pod. We intentionally do
// not just take the node list and choose the first of them. Depending on the
// cluster and the scheduler it might be that a "normal" pod cannot be
@@ -86,7 +86,7 @@ var _ = Describe("Mesos", func() {
},
ObjectMeta: api.ObjectMeta{
Name: podName,
Labels: map[string]string{
Annotations: map[string]string{
"k8s.mesosphere.io/roles": "public",
},
},