pomerium/integration/tpl/backends/verify.libsonnet
Caleb Doxsey 9980fd6141
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
2022-06-03 15:15:08 -06:00

58 lines
1.3 KiB
Jsonnet

local utils = import '../utils.libsonnet';
function(mode) {
local name = 'verify',
local image = 'pomerium/verify:${VERIFY_TAG:-latest}',
compose: {
services:
utils.ComposeService(name, {
image: image,
depends_on: {
[name + '-init']: {
condition: 'service_completed_successfully',
},
},
environment: {
SSL_CERT_FILE: '/verify_config/ca.pem',
},
volumes: [
'verify_config:/verify_config',
],
}) +
utils.ComposeService(name + '-init', {
image: 'busybox:latest',
command: [
'sh',
'-c',
"echo '" + (importstr '../files/ca.pem') + "' > /verify_config/ca.pem",
],
volumes: [
'verify_config:/verify_config',
],
}) +
utils.ComposeService(name + '-ready', {
image: 'jwilder/dockerize:0.6.1',
command: [
'-wait',
'http://' + name + ':8000/',
'-timeout',
'10m',
],
}),
volumes: {
verify_config: {},
},
},
kubernetes: [
utils.KubernetesService(name, [
{ name: 'http', port: 80, targetPort: 'http' },
]),
utils.KubernetesDeployment(name, {
image: image,
ports: [
{ name: 'http', containerPort: 8000 },
],
}),
],
}