[Proposal] Add ReadFromEnv for the controller config #49
Open
Description
My actions before raising this issue
- Followed the troubleshooting guide
- Read/searched the docs
- Searched past issues
I would like to propose adding a Read/GetFromEnv
to the connector-sdk here https://github.com/openfaas-incubator/connector-sdk/blob/df5d76475412b74c3516ba912ae4522793780994/types/controller.go#L17 similar to how we did it in the faas-provider https://github.com/openfaas/faas-provider/blob/d6579bdcf7c85f4d01f398d65ea0cab37e9633d0/types/read_config.go#L77 , so that PRs like this openfaas/nats-connector#3 that copy the config from one location to another are not needed. If you update the SDK and the config changes, the propogation of the new config should be automatic. Copying config from one struct to another going to to be bug prone.
This would make configuration consistent in the various connectors and simplify upgrades downstream.
Metadata
Assignees
Labels
No labels