mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-17 19:17:17 +02:00
integration: use postgres instead of redis for tests (#3390)
* integration: use postgres instead of redis for tests * add missing environment variables for kubernetes * fix certs * use cert in generated files * try new keys * fix certs
This commit is contained in:
parent
dafead3122
commit
9980fd6141
65 changed files with 1070 additions and 601 deletions
43
integration/tpl/backends/postgres.libsonnet
Normal file
43
integration/tpl/backends/postgres.libsonnet
Normal file
|
@ -0,0 +1,43 @@
|
|||
local utils = import '../utils.libsonnet';
|
||||
|
||||
function() {
|
||||
local name = 'postgres',
|
||||
local image = 'postgres:14.3-alpine',
|
||||
local env = {
|
||||
POSTGRES_USER: 'pomerium',
|
||||
POSTGRES_PASSWORD: 'password',
|
||||
POSTGRES_DB: 'test',
|
||||
},
|
||||
|
||||
compose: {
|
||||
services:
|
||||
utils.ComposeService(name, {
|
||||
image: image,
|
||||
environment: env,
|
||||
}) +
|
||||
utils.ComposeService(name + '-ready', {
|
||||
image: 'jwilder/dockerize:0.6.1',
|
||||
command: [
|
||||
'-wait',
|
||||
'tcp://' + name + ':5432',
|
||||
'-timeout',
|
||||
'10m',
|
||||
],
|
||||
}),
|
||||
},
|
||||
kubernetes: [
|
||||
utils.KubernetesDeployment(name, {
|
||||
image: image,
|
||||
ports: [
|
||||
{ name: 'tcp', containerPort: 5432 },
|
||||
],
|
||||
env: [
|
||||
{ name: k, value: env[k] }
|
||||
for k in std.objectFields(env)
|
||||
],
|
||||
}),
|
||||
utils.KubernetesService(name, [
|
||||
{ name: 'tcp', port: 5432, targetPort: 'tcp' },
|
||||
]),
|
||||
],
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue