Skip to content

Commit

Permalink
Add command "service unapplied-changes"
Browse files Browse the repository at this point in the history
  • Loading branch information
brmzkw committed Oct 24, 2024
1 parent 42e5b83 commit 91a7e65
Show file tree
Hide file tree
Showing 6 changed files with 237 additions and 16 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* Add the `--snapshot` flag to the volume creation command, to create a volume from a snapshot.
- https://github.com/koyeb/koyeb-cli/pull/254/files
- https://github.com/koyeb/koyeb-cli/pull/255/files
* Add command `koyeb service unapplied-changes <service_id>` to view the changes that have been made with `koyeb service update --save-only`.
- https://github.com/koyeb/koyeb-cli/pull/258

## v5.1.0 (2024-09-26)

Expand Down
51 changes: 43 additions & 8 deletions docs/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Koyeb CLI
* [koyeb regional-deployments](#koyeb-regional-deployments) - Regional deployments
* [koyeb secrets](#koyeb-secrets) - Secrets
* [koyeb services](#koyeb-services) - Services
* [koyeb snapshots](#koyeb-snapshots) - Manage snapshots
* [koyeb version](#koyeb-version) - Get version
* [koyeb volumes](#koyeb-volumes) - Manage persistent volumes

Expand Down Expand Up @@ -283,7 +284,7 @@ See examples of koyeb service create --help
--checks-grace-period strings Set healthcheck grace period in seconds.
Use the format <healthcheck>=<seconds>, for example --checks-grace-period 8080=10
--deployment-strategy string Deployment strategy, either "rolling" (default), "canary", "blue-green" or "immediate".
--deployment-strategy STRATEGY Deployment strategy, either "rolling" (default), "blue-green" or "immediate".
--docker string Docker image
--docker-args strings Set arguments to the docker command. To provide multiple arguments, use the --docker-args flag multiple times.
--docker-command string Set the docker CMD explicitly. To provide arguments to the command, use the --docker-args flag.
Expand Down Expand Up @@ -319,7 +320,7 @@ See examples of koyeb service create --help
--privileged Whether the service container should run in privileged mode
--regions strings Add a region where the service is deployed. You can specify this flag multiple times to deploy the service in multiple regions.
To update a service and remove a region, prefix the region name with '!', for example --region '!par'
If the region is not specified on service creation, the service is deployed in fra
If the region is not specified on service creation, the service is deployed in was
--routes strings Update service routes (available for services of type "web" only) using the format PATH[:PORT], for example '/foo:8080'
PORT defaults to 8000
Expand Down Expand Up @@ -575,7 +576,7 @@ koyeb deploy <path> <app>/<service> [flags]
--checks-grace-period strings Set healthcheck grace period in seconds.
Use the format <healthcheck>=<seconds>, for example --checks-grace-period 8080=10
--deployment-strategy string Deployment strategy, either "rolling" (default), "canary", "blue-green" or "immediate".
--deployment-strategy STRATEGY Deployment strategy, either "rolling" (default), "blue-green" or "immediate".
--env strings Update service environment variables using the format KEY=VALUE, for example --env FOO=bar
To use the value of a secret as an environment variable, specify the secret name preceded by @, for example --env FOO=@bar
To delete an environment variable, prefix its name with '!', for example --env '!FOO'
Expand All @@ -591,7 +592,7 @@ koyeb deploy <path> <app>/<service> [flags]
--privileged Whether the service container should run in privileged mode
--regions strings Add a region where the service is deployed. You can specify this flag multiple times to deploy the service in multiple regions.
To update a service and remove a region, prefix the region name with '!', for example --region '!par'
If the region is not specified on service creation, the service is deployed in fra
If the region is not specified on service creation, the service is deployed in was
--routes strings Update service routes (available for services of type "web" only) using the format PATH[:PORT], for example '/foo:8080'
PORT defaults to 8000
Expand Down Expand Up @@ -1318,6 +1319,7 @@ Services
* [koyeb services pause](#koyeb-services-pause) - Pause service
* [koyeb services redeploy](#koyeb-services-redeploy) - Redeploy service
* [koyeb services resume](#koyeb-services-resume) - Resume service
* [koyeb services unapplied-changes](#koyeb-services-unapplied-changes) - Show unapplied changes saved with the --save-only flag, which will be applied in the next deployment
* [koyeb services update](#koyeb-services-update) - Update service

## koyeb services create
Expand Down Expand Up @@ -1375,7 +1377,7 @@ $> koyeb service create myservice --app myapp --docker nginx --port 80:tcp
--checks-grace-period strings Set healthcheck grace period in seconds.
Use the format <healthcheck>=<seconds>, for example --checks-grace-period 8080=10
--deployment-strategy string Deployment strategy, either "rolling" (default), "canary", "blue-green" or "immediate".
--deployment-strategy STRATEGY Deployment strategy, either "rolling" (default), "blue-green" or "immediate".
--docker string Docker image
--docker-args strings Set arguments to the docker command. To provide multiple arguments, use the --docker-args flag multiple times.
--docker-command string Set the docker CMD explicitly. To provide arguments to the command, use the --docker-args flag.
Expand Down Expand Up @@ -1411,7 +1413,7 @@ $> koyeb service create myservice --app myapp --docker nginx --port 80:tcp
--privileged Whether the service container should run in privileged mode
--regions strings Add a region where the service is deployed. You can specify this flag multiple times to deploy the service in multiple regions.
To update a service and remove a region, prefix the region name with '!', for example --region '!par'
If the region is not specified on service creation, the service is deployed in fra
If the region is not specified on service creation, the service is deployed in was
--routes strings Update service routes (available for services of type "web" only) using the format PATH[:PORT], for example '/foo:8080'
PORT defaults to 8000
Expand Down Expand Up @@ -1743,6 +1745,39 @@ koyeb services resume NAME [flags]



* [koyeb services](#koyeb-services) - Services

## koyeb services unapplied-changes

Show unapplied changes saved with the --save-only flag, which will be applied in the next deployment

```
koyeb services unapplied-changes SERVICE_NAME [flags]
```

### Options

```
-a, --app string Service application
-h, --help help for unapplied-changes
```

### Options inherited from parent commands

```
-c, --config string config file (default is $HOME/.koyeb.yaml)
-d, --debug enable the debug output
--debug-full do not hide sensitive information (tokens) in the debug output
--force-ascii only output ascii characters (no unicode emojis)
--full do not truncate output
--organization string organization ID
-o, --output output output format (yaml,json,table)
--token string API token
--url string url of the api (default "https://app.koyeb.com")
```



* [koyeb services](#koyeb-services) - Services

## koyeb services update
Expand Down Expand Up @@ -1795,7 +1830,7 @@ $> koyeb service update myapp/myservice --port 80:tcp --route '!/'
--checks-grace-period strings Set healthcheck grace period in seconds.
Use the format <healthcheck>=<seconds>, for example --checks-grace-period 8080=10
--deployment-strategy string Deployment strategy, either "rolling" (default), "canary", "blue-green" or "immediate".
--deployment-strategy STRATEGY Deployment strategy, either "rolling" (default), "blue-green" or "immediate".
--docker string Docker image
--docker-args strings Set arguments to the docker command. To provide multiple arguments, use the --docker-args flag multiple times.
--docker-command string Set the docker CMD explicitly. To provide arguments to the command, use the --docker-args flag.
Expand Down Expand Up @@ -1833,7 +1868,7 @@ $> koyeb service update myapp/myservice --port 80:tcp --route '!/'
--privileged Whether the service container should run in privileged mode
--regions strings Add a region where the service is deployed. You can specify this flag multiple times to deploy the service in multiple regions.
To update a service and remove a region, prefix the region name with '!', for example --region '!par'
If the region is not specified on service creation, the service is deployed in fra
If the region is not specified on service creation, the service is deployed in was
--routes strings Update service routes (available for services of type "web" only) using the format PATH[:PORT], for example '/foo:8080'
PORT defaults to 8000
Expand Down
12 changes: 10 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module github.com/koyeb/koyeb-cli

go 1.18
go 1.21

toolchain go1.22.3

require (
github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de
Expand All @@ -22,6 +24,7 @@ require (
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.13.0
github.com/stretchr/testify v1.8.0
github.com/yudai/gojsondiff v1.0.0
golang.org/x/term v0.8.0
)

Expand All @@ -38,23 +41,28 @@ require (
github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.14 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.5 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rivo/uniseg v0.4.2 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/sergi/go-diff v1.3.1 // indirect
github.com/spf13/afero v1.9.2 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/subosito/gotenv v1.4.1 // indirect
github.com/tcnksm/go-gitconfig v0.1.2 // indirect
github.com/ulikunitz/xz v0.5.10 // indirect
github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect
github.com/yudai/pp v2.0.1+incompatible // indirect
golang.org/x/crypto v0.0.0-20220926161630-eccd6366d1be // indirect
golang.org/x/net v0.0.0-20220927171203-f486391704dc // indirect
golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.1 // indirect
Expand Down
Loading

0 comments on commit 91a7e65

Please sign in to comment.