feat: Implement resource:limit and resource:reserve

Also add the install and post-delete hooks
This commit is contained in:
Jose Diaz-Gonzalez
2019-03-13 17:52:09 -04:00
parent 2e895286cf
commit ab88dbb03d
23 changed files with 1471 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
package main
import (
"fmt"
"github.com/dokku/dokku/plugins/common"
)
// runs the install step for the resource plugin
func main() {
if err := common.PropertySetup("resource"); err != nil {
common.LogFail(fmt.Sprintf("Unable to install the resource plugin: %s", err.Error()))
}
}

View File

@@ -0,0 +1,18 @@
package main
import (
"flag"
"github.com/dokku/dokku/plugins/common"
)
// destroys the resource property for a given app container
func main() {
flag.Parse()
appName := flag.Arg(0)
err := common.PropertyDestroy("resource", appName)
if err != nil {
common.LogFail(err.Error())
}
}