Skip to content

Commit

Permalink
Remove Certguard and File installation as plugin
Browse files Browse the repository at this point in the history
It was now merged into pulpcore
  • Loading branch information
Odilhao committed Mar 28, 2024
1 parent 738ca5a commit df62525
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 123 deletions.
24 changes: 24 additions & 0 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,28 @@
mode => '0640',
require => Exec['Create database symmetric key'],
}

if $use_pulp2_content_route {

Check warning on line 85 in manifests/config.pp

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

top-scope variable being used without an explicit namespace (check: variable_scope)
$context = {
'directories' => [
{
'provider' => 'location',
'path' => '/pulp/isos',
'proxy_pass' => [
{
'url' => $pulpcore::apache::content_url,
'params' => $pulpcore::apache::content_proxy_params,
},
],
'request_headers' => [
'unset X-CLIENT-CERT',
'set X-CLIENT-CERT "%{SSL_CLIENT_CERT}s" env=SSL_CLIENT_CERT',
],
},
],
}
$content = epp('pulpcore/apache-fragment.epp', $context)
} else {
$content = undef
}
}
1 change: 1 addition & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@
Optional[Boolean] $analytics = undef,
Optional[Boolean] $hide_guarded_distributions = undef,
Optional[Integer[1,100]] $import_workers_percent = undef,
Optional[Boolean] $use_pulp2_content_route = false,

Check warning on line 260 in manifests/init.pp

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Optional parameter defaults to something other than undef (check: optional_default)

Check warning on line 260 in manifests/init.pp

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

missing documentation for class parameter pulpcore::use_pulp2_content_route (check: parameter_documentation)
) {
$settings_file = "${config_dir}/settings.py"
$certs_dir = "${config_dir}/certs"
Expand Down
5 changes: 0 additions & 5 deletions manifests/plugin/certguard.pp

This file was deleted.

35 changes: 0 additions & 35 deletions manifests/plugin/file.pp

This file was deleted.

2 changes: 0 additions & 2 deletions spec/acceptance/plugins_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@
<<-PUPPET
include pulpcore
include pulpcore::plugin::ansible
include pulpcore::plugin::certguard
include pulpcore::plugin::container
include pulpcore::plugin::deb
include pulpcore::plugin::file
include pulpcore::plugin::ostree
include pulpcore::plugin::python
include pulpcore::plugin::rpm
Expand Down
24 changes: 0 additions & 24 deletions spec/classes/plugin_certguard_spec.rb

This file was deleted.

57 changes: 0 additions & 57 deletions spec/classes/plugin_file_spec.rb

This file was deleted.

33 changes: 33 additions & 0 deletions spec/classes/pulpcore_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,39 @@
is_expected.to contain_service("pulpcore-worker@#{i}.service")
.with_ensure(true)
.with_enable(true)
end

context 'with pulp2 content route' do
let(:params) { { use_pulp2_content_route: true } }

it 'contains the Apache fragment' do
is_expected.to compile.with_all_deps
is_expected.to contain_pulpcore__apache__fragment('plugin-file')
is_expected.to contain_apache__vhost__fragment('pulpcore-http-plugin-file')
.with_content(
<<CONTENT
<Location "/pulp/isos">
RequestHeader unset X-CLIENT-CERT
RequestHeader set X-CLIENT-CERT "%{SSL_CLIENT_CERT}s" env=SSL_CLIENT_CERT
ProxyPass unix:///run/pulpcore-content.sock|http://pulpcore-content/pulp/content disablereuse=on timeout=600
ProxyPassReverse unix:///run/pulpcore-content.sock|http://pulpcore-content/pulp/content
</Location>
CONTENT
)
is_expected.to contain_apache__vhost__fragment('pulpcore-https-plugin-file')
.with_content(
<<CONTENT
<Location "/pulp/isos">
RequestHeader unset X-CLIENT-CERT
RequestHeader set X-CLIENT-CERT "%{SSL_CLIENT_CERT}s" env=SSL_CLIENT_CERT
ProxyPass unix:///run/pulpcore-content.sock|http://pulpcore-content/pulp/content disablereuse=on timeout=600
ProxyPassReverse unix:///run/pulpcore-content.sock|http://pulpcore-content/pulp/content
</Location>
CONTENT
)
end
end
end
end
Expand Down

0 comments on commit df62525

Please sign in to comment.