infobloxopen / docker-infoblox

IPAM driver for Docker and Infoblox
Apache License 2.0
23 stars 23 forks source link

Switch to V2 plugin architecture #33

Closed ishantt closed 7 years ago

ishantt commented 7 years ago

This patch includes the changes required to move to the new docker managed plugin architecture.

ishantt commented 7 years ago

Yes this is the way to pass the parameters. These are passed while installing the plugin docker plugin install <plugin-name> PARAM1=VAL1 PARMA2=VAL2 ... These parameters are exposed as environment variables inside the container.

The reason for not reading them inside the driver code is to reduce the complexity. It preserves the same behavior as is currently. The user can pass either conf file or pass parameters like in above example. If some parameter is passed in both cmd line as well as conf file then cmd line takes precedence.

Also there will be a lot of type checking while reading the env directly in the driver code . I could not find any good library which can convert the env varaibles into the struct . I will have to check each variable for its type and convert in into the type as defined in the Config struct. Maybe I will work on this later once I am more comfortable with the golang.

yuewko commented 7 years ago

Also there will be a lot of type checking while reading the env directly in the driver code . I could not find any good library which can convert the env varaibles into the struct .

I came across this doing a quick google: https://github.com/caarlos0/env Maybe take a quick look?

yuewko commented 7 years ago

@johnbelamaric , I understand from @ishantt that all your comments has been addressed. I am approving it in order to proceed with the certification process.