Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Labels to app #599

Closed
jwerak opened this issue Sep 13, 2014 · 7 comments · Fixed by #1051
Closed

Custom Labels to app #599

jwerak opened this issue Sep 13, 2014 · 7 comments · Fixed by #1051
Milestone

Comments

@jwerak
Copy link

jwerak commented Sep 13, 2014

Would it make sense to specify label/tag to app you are running.

For example I would like to have apps with label environment:test/devel/rc/... in one cluster.
Would be nice to implement multiple key:value labels.

@ConnorDoyle
Copy link
Contributor

Nice one! It could also be useful to add labels to running tasks.

@rthomas
Copy link

rthomas commented Sep 18, 2014

+1

I'd like the ability to add key / value string pairs to an app - this would be particularly useful for services that consume the marathon api, such as Bamboo where we could set values such as mapped hostname etc, rather than trying to derive them from the app name.

@rthomas
Copy link

rthomas commented Sep 18, 2014

So... I'm having a crack at implementing this, but I am no scala developer by any stretch of the imagination. The implementation of this poses a bit of an issue with the limitation of scala, if we add this to the AppDefinition case class - this will be the 23rd field on there, meaning it will fail to compile...

marathon/state/AppDefinition.scala:24: Implementation restriction: case classes cannot have more than 22 parameters.

I will seek some advice from one of our resident scala gurus for patterns to work around this.

@drexin
Copy link
Contributor

drexin commented Sep 18, 2014

We will move to 2.11 soon, which does not have this limitation.

On 18.09.2014, at 05:55, Ryan Thomas notifications@github.com wrote:

So... I'm having a crack at implementing this, but I am no scala developer by any stretch of the imagination. The implementation of this poses a bit of an issue with the limitation of scala, if we add this to the AppDefinition case class - this will be the 23rd field on there, meaning it will fail to compile...

marathon/state/AppDefinition.scala:24: Implementation restriction: case classes cannot have more than 22 parameters.
I will seek some advice from one of our resident scala gurus for patterns to work around this.


Reply to this email directly or view it on GitHub.

@rasputnik
Copy link
Contributor

👍

would be very useful to have a way to 'tag' apps with metadata - in my case I'd like to be able to specify what protocol a given TCP port is using (HTTP/TCP) so frontend load balancers like haproxy can leverage it.

@andrewortman
Copy link

👍

Also having the same requirement with tagging applications with metadata for our dynamic load balancers. Our workaround right now is by injecting environment variables into the app. The app ignores them, but the load balancer parses them out of the environment variable list provided by the marathon's /app API

Example:
LOAD_BALANCER_PROTOCOL="TCP"

Being able to provide a key/value list or even JSON (that might be a bit too much to ask though) would be preferable. Bonus points if we could query the API for apps that match a specific key/value

@ConnorDoyle
Copy link
Contributor

Task labels landed recently in Mesos, see: https://issues.apache.org/jira/browse/MESOS-2120

ConnorDoyle added a commit that referenced this issue Jan 20, 2015
- Added protobuf serialization tests.
- Added JSON tests for AppDefinition, AppUpdate.
- Fixes #599.
@drexin drexin modified the milestones: 0.9.0, 0.8.1 Feb 26, 2015
@mesosphere mesosphere locked and limited conversation to collaborators Mar 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants