Allow to set deployment config uid during initialization (#1249)
This commit is contained in:
@@ -168,6 +168,11 @@ func specInit(c *cli.Context) error {
|
||||
name = util.KubifyName(basename)
|
||||
}
|
||||
|
||||
deployID := c.String("deployid")
|
||||
if len(deployID) == 0 {
|
||||
deployID = uuid.NewV4().String()
|
||||
}
|
||||
|
||||
// Create spec dir
|
||||
fmt.Printf("Creating fission spec directory '%v'\n", specDir)
|
||||
err := os.MkdirAll(specDir, 0755)
|
||||
@@ -190,7 +195,7 @@ func specInit(c *cli.Context) error {
|
||||
// All resources will be annotated with the UID when they're created. This allows
|
||||
// us to be idempotent, as well as to delete resources when their specs are
|
||||
// removed.
|
||||
UID: uuid.NewV4().String(),
|
||||
UID: deployID,
|
||||
}
|
||||
err = writeDeploymentConfig(specDir, &dc)
|
||||
util.CheckErr(err, "write deployment config")
|
||||
|
||||
Reference in New Issue
Block a user