From 8a39d01b39e3ab53f1c748812f60d73da8c60580 Mon Sep 17 00:00:00 2001 From: fabriciojs Date: Wed, 28 Feb 2024 21:23:37 -0300 Subject: [PATCH] fix typo + upgrade guide fixes --- docs/25-Upgrade-Guide/0-Upgrading-Kool.md | 6 ++++++ services/cloud/deploy_validator.go | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/25-Upgrade-Guide/0-Upgrading-Kool.md b/docs/25-Upgrade-Guide/0-Upgrading-Kool.md index 6e7657b..52f9c1f 100644 --- a/docs/25-Upgrade-Guide/0-Upgrading-Kool.md +++ b/docs/25-Upgrade-Guide/0-Upgrading-Kool.md @@ -19,6 +19,12 @@ Version 3.x introduces two significant changes: - The YAML syntax for `services..build` in the `kool.cloud.yml` configuration file must now align with the official [Docker Compose reference for the `service..build`](https://docs.docker.com/compose/compose-file/compose-file-v3/#build) entry. - Image building now occurs in your local environment—specifically, on the host where you execute `kool cloud deploy`. Therefore, ensure that the environment from which you run this command has a properly configured Docker-image build engine (that means Kool to be able to run `docker build` command). +### Deployment network configuration: `services..public` and `services..expose` + +The old `services..port` should now be `services..expose` - which aligns the format to Docker Compose native configuration. + +The `services..public` entry is now preferred to be a *boolean* value - simply set to `true` to indicate that the service should be made publicly available upon deployment. + ### Github Action `kool-dev/action` There's a new version of our official installation GH action `kool-dev/action@v3` - that will always install the latest v3 series release. diff --git a/services/cloud/deploy_validator.go b/services/cloud/deploy_validator.go index 7c0c042..2db7138 100644 --- a/services/cloud/deploy_validator.go +++ b/services/cloud/deploy_validator.go @@ -125,11 +125,11 @@ func ValidateConfig(deployConfig *DeployConfig) (err error) { } } - // validates only one service can be public, and it must define a port + // validates only one service can be public, and it must define a port to be exposed if config.Public != nil { - // being public, it must define the `port` entry as well + // being public, it must define the `expose` entry as well if config.Expose == nil { - err = fmt.Errorf("service (%s) is public, but it does not define the `export` entry", service) + err = fmt.Errorf("service (%s) is public, but it does not define the `expose` entry", service) return } }