-
Notifications
You must be signed in to change notification settings - Fork 5
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
Providing resources (simple MySQL implementation) #12
Conversation
…tup() func that will add parameters to config- changed location where config.parseEnv() is being called
resource/resource.go
Outdated
case MysqlResourceName: | ||
my := Mysql{} | ||
my.Setup(c) | ||
} |
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.
Can we print a warning here for unknown resources?
@slot would it make sense to change implementation slightly to allow more than one mysql (or any other) |
There were the following issues with your Pull Request
Guidelines are available at https://github.com/microdevs/missy This message was auto-generated by https://gitcop.com |
There were the following issues with your Pull Request
Guidelines are available at https://github.com/microdevs/missy This message was auto-generated by https://gitcop.com |
There were the following issues with your Pull Request
Guidelines are available at https://github.com/microdevs/missy This message was auto-generated by https://gitcop.com |
There were the following issues with your Pull Request
Guidelines are available at https://github.com/microdevs/missy This message was auto-generated by https://gitcop.com |
There were the following issues with your Pull Request
Guidelines are available at https://github.com/microdevs/missy This message was auto-generated by https://gitcop.com |
@wojciech12 Why closed? |
@levrik We can reopen it when we go back to discussion about implementing standard clients. |
@wojciech12 Can we please just leave it open so we don't forget about it? |
@levrik if we forget about it, it would mean we did not need it in the first place. So I will keep it close. |
@wojciech12 I disagree but okay. |
If a service needs a resource (db, cache, queue etc) which can be provided by a dedicated container running this service the developer can add the resource to
.missy.yml
Example:
The ides is that missy-controller will spin up the needed resources, configure them and place a config in Kubernetes before starting the service. Meaning when the service comes up the dedicated resources are already there and can be used.
Looking at the API for the developer using resources is very simple. @levrik @gizioo @wojciech12 @pbsmacc please critically check this first draft. I used a singleton pattern to hold the current MySQL session but it can be swopped easily during testing.
The code example looks as follows
Let me know what you think. In the meantime I will prepare the missy-controller to prove the resource spin up flow works.