Merge pull request #696 from openziti/environment_count_fix

Fix for Environment Count Inheritance (#695)
This commit is contained in:
Michael Quigley 2024-07-09 11:48:56 -04:00 committed by GitHub
commit bfa9a43466
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -10,6 +10,8 @@ CHANGE: auto-update the ziti CLI version that is built in to the openziti/zrok c
CHANGE: Docker examples set HOME to enable running CLI commands in the container CHANGE: Docker examples set HOME to enable running CLI commands in the container
FIX: Fix for environment count inheritance when using a resource count class to override global environment count (https://github.com/openziti/zrok/issues/695)
## v0.4.34 ## v0.4.34
FEATURE: Linux service support for all private share modes (contribution from Stefan Adelbert @stefanadelbert) FEATURE: Linux service support for all private share modes (contribution from Stefan Adelbert @stefanadelbert)

View File

@ -68,7 +68,7 @@ func (a *Agent) CanCreateEnvironment(acctId int, trx *sqlx.Tx) (bool, error) {
if err != nil { if err != nil {
return false, err return false, err
} }
if len(envs)+1 > a.cfg.Environments { if len(envs)+1 > ul.resource.GetEnvironments() {
return false, nil return false, nil
} }
} }