mirror of
https://github.com/pomerium/pomerium.git
synced 2025-04-29 10:26:29 +02:00
55 lines
1.3 KiB
Jsonnet
55 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, null, [
|
|
{ name: 'http', containerPort: 8000 },
|
|
]),
|
|
],
|
|
}
|