QubitProducts / bamboo

HAProxy auto configuration and auto service discovery for Mesos Marathon
Apache License 2.0
793 stars 214 forks source link

[WIP] Arbitrary config values #180

Closed lclarkmichalek closed 8 years ago

lclarkmichalek commented 8 years ago

This allows users to specify whatever they want in their bamboo service values by changing the service definition to have a Config map[string]string. This means that I can, in addition to having an ACL, set things like RequiresWebsockets or HealthCheckInterval, and in the template act on them by testing $service.Conf.RequiresWebsockets or $service.Conf.HealthCheckInterval.

This is fully backwards compatible, with $service.Conf.Acl and $service.Acl being kept in sync. The existing mappings do not change unless updated, allowing easy downgrades, should this cause problems. Any applications using the API directly will also still work (see MakeV2ServiceRepr for details on how creation is backwards compatible and V2ServiceRepr.Service for the inverse).

The UI has not been updated. I'd like to support this, but I have no love for angular, and would rather not spend too long fighting with it when I'm sure someone else can do it much more efficiently.

The majority of this diff comes from me moving away from passing around a raw ZK connection, and instead encapsulating it behind a service.Storage interface. There's also quite a few lines changed around handling multiple representations concurrently, and a ton of tests for these two main changes.

Ongoing:

Pending:

lclarkmichalek commented 8 years ago

@activars

lclarkmichalek commented 8 years ago

Bug

When creating an application, if you do not add a / at the beginning of the app ID, one is not automatically added

lclarkmichalek commented 8 years ago

Resolved missing / bug.