peridot/obsidian/cmd/v1/obsidian/ci/deploy.jsonnet

50 lines
962 B
Plaintext
Raw Normal View History

2022-10-30 08:18:01 +00:00
local resfdeploy = import 'ci/resfdeploy.jsonnet';
2022-07-07 20:11:50 +00:00
local db = import 'ci/db.jsonnet';
local kubernetes = import 'ci/kubernetes.jsonnet';
2022-10-30 08:18:01 +00:00
resfdeploy.new({
2022-07-07 20:11:50 +00:00
name: 'obsidian',
dbname: 'obsidian',
backend: true,
migrate: true,
legacyDb: true,
command: '/bundle/obsidian',
image: kubernetes.tag('obsidian'),
tag: kubernetes.version,
dsn: {
name: 'OBSIDIAN_DATABASE_URL',
value: db.dsn_legacy('obsidian'),
},
requests: if kubernetes.prod() then {
cpu: '0.2',
memory: '512M',
},
limits: if kubernetes.prod() then {
cpu: '0.3',
memory: '1G',
},
ports: [
{
name: 'http',
containerPort: 26002,
protocol: 'TCP',
expose: true,
},
{
name: 'grpc',
containerPort: 26003,
protocol: 'TCP',
},
],
health: {
port: 26002,
},
env: [
{
name: 'OBSIDIAN_PRODUCTION',
value: if kubernetes.dev() then 'false' else 'true',
},
$.dsn,
],
})