Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
16 changes: 8 additions & 8 deletions services/grid-bot/.component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -78,14 +76,16 @@ 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
on_change: restart
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 }}"
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class ClientSettingsFactory : IClientSettingsFactory
private readonly ILogger _logger;
private readonly LazyWithRetry<CachedValues> _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;
Expand Down