Skip to content

Commit 8b2db3f

Browse files
authored
Merge branch 'master' into update-secret-usage
2 parents c8bff05 + 212fe63 commit 8b2db3f

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

CHANGES.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## v5.1.0 (unreleased)
22

3-
* Add `--deployment-strategy` which can have the value `rolling`, `canary`, `blue-green` or `immediate` to service.
3+
* Add `--deployment-strategy` which can have the value `rolling`, `blue-green` or `immediate` to service.
44
- https://github.com/koyeb/koyeb-cli/pull/248/files
55

66
## v5.0.0 (2024-08-20)

docs/reference.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ See examples of koyeb service create --help
283283
--checks-grace-period strings Set healthcheck grace period in seconds.
284284
Use the format <healthcheck>=<seconds>, for example --checks-grace-period 8080=10
285285
286-
--deployment-strategy STRATEGY Deployment strategy, either "rolling" (default), "canary", "blue-green" or "immediate".
286+
--deployment-strategy string Deployment strategy, either "rolling" (default), "canary", "blue-green" or "immediate".
287287
--docker string Docker image
288288
--docker-args strings Set arguments to the docker command. To provide multiple arguments, use the --docker-args flag multiple times.
289289
--docker-command string Set the docker CMD explicitly. To provide arguments to the command, use the --docker-args flag.
@@ -576,7 +576,7 @@ koyeb deploy <path> <app>/<service> [flags]
576576
--checks-grace-period strings Set healthcheck grace period in seconds.
577577
Use the format <healthcheck>=<seconds>, for example --checks-grace-period 8080=10
578578
579-
--deployment-strategy STRATEGY Deployment strategy, either "rolling" (default), "canary", "blue-green" or "immediate".
579+
--deployment-strategy string Deployment strategy, either "rolling" (default), "canary", "blue-green" or "immediate".
580580
--env strings Update service environment variables using the format KEY=VALUE, for example --env FOO=bar
581581
To use the value of a secret as an environment variable, use the following syntax:
582582
--env FOO={{secret.bar}}
@@ -1377,7 +1377,7 @@ $> koyeb service create myservice --app myapp --docker nginx --port 80:tcp
13771377
--checks-grace-period strings Set healthcheck grace period in seconds.
13781378
Use the format <healthcheck>=<seconds>, for example --checks-grace-period 8080=10
13791379
1380-
--deployment-strategy STRATEGY Deployment strategy, either "rolling" (default), "canary", "blue-green" or "immediate".
1380+
--deployment-strategy string Deployment strategy, either "rolling" (default), "canary", "blue-green" or "immediate".
13811381
--docker string Docker image
13821382
--docker-args strings Set arguments to the docker command. To provide multiple arguments, use the --docker-args flag multiple times.
13831383
--docker-command string Set the docker CMD explicitly. To provide arguments to the command, use the --docker-args flag.
@@ -1798,7 +1798,7 @@ $> koyeb service update myapp/myservice --port 80:tcp --route '!/'
17981798
--checks-grace-period strings Set healthcheck grace period in seconds.
17991799
Use the format <healthcheck>=<seconds>, for example --checks-grace-period 8080=10
18001800
1801-
--deployment-strategy STRATEGY Deployment strategy, either "rolling" (default), "canary", "blue-green" or "immediate".
1801+
--deployment-strategy string Deployment strategy, either "rolling" (default), "canary", "blue-green" or "immediate".
18021802
--docker string Docker image
18031803
--docker-args strings Set arguments to the docker command. To provide multiple arguments, use the --docker-args flag multiple times.
18041804
--docker-command string Set the docker CMD explicitly. To provide arguments to the command, use the --docker-args flag.

pkg/koyeb/services.go

+3-5
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ func (h *ServiceHandler) addServiceDefinitionFlagsForAllSources(flags *pflag.Fla
308308
[]string{},
309309
"Add a region where the service is deployed. You can specify this flag multiple times to deploy the service in multiple regions.\n"+
310310
"To update a service and remove a region, prefix the region name with '!', for example --region '!par'\n"+
311-
"If the region is not specified on service creation, the service is deployed in fra\n",
311+
"If the region is not specified on service creation, the service is deployed in was\n",
312312
)
313313
flags.StringSlice(
314314
"env",
@@ -320,7 +320,7 @@ func (h *ServiceHandler) addServiceDefinitionFlagsForAllSources(flags *pflag.Fla
320320
flags.String("instance-type", "nano", "Instance type")
321321

322322
var strategy DeploymentStrategy
323-
flags.Var(&strategy, "deployment-strategy", `Deployment strategy, either "rolling" (default), "canary", "blue-green" or "immediate".`)
323+
flags.Var(&strategy, "deployment-strategy", `Deployment strategy, either "rolling" (default), "blue-green" or "immediate".`)
324324

325325
flags.Int64("scale", 1, "Set both min-scale and max-scale")
326326
flags.Int64("min-scale", 1, "Min scale")
@@ -1736,14 +1736,12 @@ func (s *DeploymentStrategy) Set(value string) error {
17361736
switch value {
17371737
case "rolling":
17381738
*s = DeploymentStrategy(koyeb.DEPLOYMENTSTRATEGYTYPE_ROLLING)
1739-
case "canary":
1740-
*s = DeploymentStrategy(koyeb.DEPLOYMENTSTRATEGYTYPE_CANARY)
17411739
case "blue-green":
17421740
*s = DeploymentStrategy(koyeb.DEPLOYMENTSTRATEGYTYPE_BLUE_GREEN)
17431741
case "immediate":
17441742
*s = DeploymentStrategy(koyeb.DEPLOYMENTSTRATEGYTYPE_IMMEDIATE)
17451743
default:
1746-
return fmt.Errorf("invalid deployment strategy: %s. Valid values are: rolling, canary, blue-green, immediate.", value)
1744+
return fmt.Errorf("invalid deployment strategy: %s. Valid values are: rolling, blue-green, immediate.", value)
17471745
}
17481746
return nil
17491747
}

0 commit comments

Comments
 (0)