diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 259bb47c..7003226a 100755 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -145,6 +145,10 @@ jobs: env: VERSION: ${{ steps.version.outputs.version }} NOMAD_VERSION: ${{ steps.version.outputs.version }} + + VAULT_ADDR: ${{ vars.VAULT_ADDR }} + VAULT_TOKEN: ${{ secrets.VAULT_TOKEN }} + with: script: | const fs = require('fs'); diff --git a/services/grid-bot/.component.yaml b/services/grid-bot/.component.yaml index c4ca82f5..9f3232e4 100755 --- a/services/grid-bot/.component.yaml +++ b/services/grid-bot/.component.yaml @@ -21,13 +21,11 @@ deployment: namespace: grid-bot job: grid-bot-${{ env.NOMAD_SHORT_ENVIRONMENT }} - - vault_policies: - - vault_secret_grid_settings_read_write - + # Passed to the meta section in Nomad meta: ENVIRONMENT: ${{ env.NOMAD_ENVIRONMENT }} + VERSION: ${{ env.NOMAD_VERSION }} containers: # Maps to the groups section in Nomad - image: mfdlabs/grid-bot @@ -78,8 +76,10 @@ deployment: volumes: - '/var/run/docker.sock:/var/run/docker.sock' - '/tmp/.X11-unix:/tmp/.X11-unix' - - '/opt/grid/scripts:/opt/grid/scripts' - - '/_/_logs/grid-bot/${{ env.NOMAD_ENVIRONMENT }}:/tmp/mfdlabs/logs' + + - '/_/_data/grid-bot/scripts:/_/_data/grid-bot/scripts' + - '/_/_data/grid-bot/logs:/tmp/mfdlabs/logs' + - '/_/_data/grid-bot/rcc-logs:/_/_data/grid-bot/rcc-logs' config_maps: - destination: secrets/file.env env: true @@ -87,5 +87,5 @@ deployment: data: | DISPLAY=:1 DEFAULT_LOG_LEVEL=Information - VAULT_ADDR="http://vault.service.consul:8200" - VAULT_TOKEN="{{ with secret "grid-bot-settings/grid-bot-vault" }}{{ .Data.data.vault_token }}{{ end }}" + VAULT_ADDR="${{ env.VAULT_ADDR }}" + VAULT_TOKEN="${{ env.VAULT_TOKEN }}" diff --git a/services/grid-bot/lib/utility/Implementation/ClientSettingsFactory.cs b/services/grid-bot/lib/utility/Implementation/ClientSettingsFactory.cs index da558315..5897e256 100644 --- a/services/grid-bot/lib/utility/Implementation/ClientSettingsFactory.cs +++ b/services/grid-bot/lib/utility/Implementation/ClientSettingsFactory.cs @@ -36,7 +36,7 @@ public class ClientSettingsFactory : IClientSettingsFactory private readonly ILogger _logger; private readonly LazyWithRetry _settingsCacheRefreshAhead; - private static readonly Type[] _supportedTypes = [typeof(string), typeof(bool), typeof(int)]; + private static readonly Type[] _supportedTypes = [typeof(string), typeof(bool), typeof(int), typeof(long)]; private readonly string _mount; private readonly string _path;