-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add an Extras
field on the compose config types.
#1126
Conversation
Should'nt we generalize that on every object (including portsconfig etc.) ? |
@simonferquel in this PR, it's only on object that are allowed to have |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
ping @silvin-lubecki @dnephin PTAL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
cli/compose/loader/loader.go
Outdated
return serviceConfig, nil | ||
} | ||
|
||
func handleExtras(name string, source map[string]interface{}) map[string]interface{} { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: loadExtras
might be more consistent with existing naming
That field is automaticaly populated with any `x-*` field in the yaml. And marshalling the compose config struct put them back into place. This make it possible to get those extra fields without re-inventing the wheel (i.e. reimplementing 80% of the `cli/compose/*` packages. Signed-off-by: Vincent Demeester <vincent@sbr.pm>
That field is automaticaly populated with any
x-*
field in the yaml.And marshalling the compose config struct put them back into place.
This make it possible to get those extra fields without re-inventing
the wheel (i.e. reimplementing 80% of the
cli/compose/*
packages.Will be very useful for experiments in
docker/app
👼Signed-off-by: Vincent Demeester vincent@sbr.pm