Puppet Class: complyadm::component::gatekeeper

Defined in:
manifests/component/gatekeeper.pp

Summary

installs and configures the main backend component

Overview

Parameters:

  • config (Complyadm::Config::Comply_gatekeeper)

    subset of Complyadm::Config specific to gatekeeper



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'manifests/component/gatekeeper.pp', line 4

class complyadm::component::gatekeeper (
  Complyadm::Config::Comply_gatekeeper $config,
) {
  $container = $config['container']

  $conf_file = '/etc/puppetlabs/comply/oauth2_proxy.cfg'
  file { $conf_file:
    ensure  => 'file',
    content => epp('complyadm/gatekeeper/oauth2_proxy.cfg.epp', {
        'auth_port'     => 8443,
        'client_secret' => $config['client_secret'],
        'cookie_secret' => $config['cookie_secret'],
        'host_fqdn'     => $config['hostname'],
        'https_port'    => 3001,
        'scarpy'        => $config['scarpy'],
        'graphql'       => $config['graphql'],
        'ui'            => $config['ui'],
    }),
    owner   => 'root',
    group   => 'root',
    seltype => 'container_file_t',
    notify  => Complyadm::Runtime::Run[$container['name']],
  }

  complyadm::runtime::run { $container['name']:
    runtime                  => $container['runtime'],
    install_runtime          => $container['install_runtime'],
    image                    => $container['image'],
    net                      => $container['net'],
    extra_parameters         => $container['extra_parameters'],
    ports                    => $container['ports'],
    pull_on_start            => false,
    volumes                  => [
      "${conf_file}:/run/secrets/oauth2_proxy.cfg",
    ],
    require                  => File[$conf_file],
    cmd                      => $container['cmd'],
    after                    => $container['after'],
    extra_systemd_parameters => {
      'Service' => { 'RestartSec' => 30 },
    },
  }
}