{"action":"created","issue":{"url":"https://api.github.com/repos/openshift/origin/issues/2545","labels_url":"https://api.github.com/repos/openshift/origin/issues/2545/labels{/name}","comments_url":"https://api.github.com/repos/openshift/origin/issues/2545/comments","events_url":"https://api.github.com/repos/openshift/origin/issues/2545/events","html_url":"https://github.com/openshift/origin/pull/2545","id":81650518,"number":2545,"title":"Bug 1213273 - must apply labels to nested objects when processing templates","user":{"login":"fabianofranz","id":158611,"avatar_url":"https://avatars.githubusercontent.com/u/158611?v=3","gravatar_id":"","url":"https://api.github.com/users/fabianofranz","html_url":"https://github.com/fabianofranz","followers_url":"https://api.github.com/users/fabianofranz/followers","following_url":"https://api.github.com/users/fabianofranz/following{/other_user}","gists_url":"https://api.github.com/users/fabianofranz/gists{/gist_id}","starred_url":"https://api.github.com/users/fabianofranz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabianofranz/subscriptions","organizations_url":"https://api.github.com/users/fabianofranz/orgs","repos_url":"https://api.github.com/users/fabianofranz/repos","events_url":"https://api.github.com/users/fabianofranz/events{/privacy}","received_events_url":"https://api.github.com/users/fabianofranz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2015-05-27T22:22:24Z","updated_at":"2015-06-03T18:03:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/openshift/origin/pulls/2545","html_url":"https://github.com/openshift/origin/pull/2545","diff_url":"https://github.com/openshift/origin/pull/2545.diff","patch_url":"https://github.com/openshift/origin/pull/2545.patch"},"body":"re: latest comments in https://bugzilla.redhat.com/show_bug.cgi?id=1213273"},"comment":{"url":"https://api.github.com/repos/openshift/origin/issues/comments/108550098","html_url":"https://github.com/openshift/origin/pull/2545#issuecomment-108550098","issue_url":"https://api.github.com/repos/openshift/origin/issues/2545","id":108550098,"user":{"login":"fabianofranz","id":158611,"avatar_url":"https://avatars.githubusercontent.com/u/158611?v=3","gravatar_id":"","url":"https://api.github.com/users/fabianofranz","html_url":"https://github.com/fabianofranz","followers_url":"https://api.github.com/users/fabianofranz/followers","following_url":"https://api.github.com/users/fabianofranz/following{/other_user}","gists_url":"https://api.github.com/users/fabianofranz/gists{/gist_id}","starred_url":"https://api.github.com/users/fabianofranz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabianofranz/subscriptions","organizations_url":"https://api.github.com/users/fabianofranz/orgs","repos_url":"https://api.github.com/users/fabianofranz/repos","events_url":"https://api.github.com/users/fabianofranz/events{/privacy}","received_events_url":"https://api.github.com/users/fabianofranz/received_events","type":"User","site_admin":false},"created_at":"2015-06-03T18:03:52Z","updated_at":"2015-06-03T18:03:52Z","body":"In `osc new-app`, when specifying the `--label` flag, we apply labels to *structured* objects:\n\nhttps://github.com/openshift/origin/blob/master/pkg/cmd/cli/cmd/newapp.go#L156\n\nAnd that *already* handles nested labels:\n\nhttps://github.com/openshift/origin/blob/master/pkg/util/labels.go#L85\n\nSo I'm saying we should revert my changes in this PR, *and* remove lines 85~91 in labels.go. That would make it behave equally in both structured and unstructured objects, to *not* deal with nested labels.\n \n\n----- Original Message -----\n> \n> \n> ----- Original Message -----\n> > > The question I was asking was whether the problem is that if we really\n> > > want\n> > > labels to be inherited by the pods, then we should be setting the\n> > > selector\n> > > and template labels to nil anyway so they are inherited.  Delete now\n> > > scales\n> > > down resources, so nothing is going to get left behind anyway if you\n> > > delete\n> > > RC.  So if the template author wants labels to be specified by the end\n> > > user,\n> > > the author needs to use template/selector defaulting.  That means we\n> > > don't\n> > > have a reason to apply labels to nested objects.\n> > \n> > Got it, and I agree. So let's make a decision about this. The first part of\n> > the bug (applying labels to bc, dc, etc) is already fixed in master. So I\n> > suggest what's left to do here is to revert this change *and* remove the\n> > nested labels handling already present\n> > [here](https://github.com/openshift/origin/blob/master/pkg/util/labels.go#L85).\n> > That way nested labels are not set neither on unstructured objects nor in\n> > well-defined objects, e.g. used by `new-app`. How does it sound?\n> \n> Why are we applying labels to structured data (vs unstructured)?  Template\n> processing should *never* be dealing with anything but unstructured.  Maybe\n> I'm not understanding what you're referring to.\n> \n> > \n> > \n> > ---\n> > Reply to this email directly or view it on GitHub:\n> > https://github.com/openshift/origin/pull/2545#issuecomment-108535911\n> \n> \n> ---\n> Reply to this email directly or view it on GitHub:\n> https://github.com/openshift/origin/pull/2545#issuecomment-108544514\n"}}