Skip to content

Commit

Permalink
Enable FLATPAK_INDEX for pulp registry
Browse files Browse the repository at this point in the history
  • Loading branch information
lfu committed Dec 2, 2024
1 parent 26254db commit de8a749
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
12 changes: 11 additions & 1 deletion manifests/plugin/container.pp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@
],
'request_headers' => $pulpcore::apache::api_default_request_headers + $pulpcore::apache::api_additional_request_headers,
},
{
'provider' => 'location',
'path' => $location_prefix,
'proxy_pass' => [
{
'url' => $pulpcore::apache::api_base_url,
},
],
'request_headers' => $pulpcore::apache::api_default_request_headers + $pulpcore::apache::api_additional_request_headers,
},
],
'proxy_pass' => [
{
Expand All @@ -31,7 +41,7 @@
}

pulpcore::plugin { 'container':
config => 'TOKEN_AUTH_DISABLED=True',
config => "TOKEN_AUTH_DISABLED=True\nFLATPAK_INDEX=True",
https_content => epp('pulpcore/apache-fragment.epp', $context),
}
}
17 changes: 16 additions & 1 deletion spec/classes/plugin_container_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
.that_subscribes_to('Class[Pulpcore::Install]')
.that_notifies(['Class[Pulpcore::Database]', 'Class[Pulpcore::Service]'])
is_expected.to contain_package('pulpcore-plugin(container)')
is_expected.to contain_concat__fragment('plugin-container').with_content("\n# container plugin settings\nTOKEN_AUTH_DISABLED=True")
is_expected.to contain_concat__fragment('plugin-container')
.with_content("\n# container plugin settings\nTOKEN_AUTH_DISABLED=True\nFLATPAK_INDEX=True")
is_expected.to contain_pulpcore__apache__fragment('plugin-container')
is_expected.not_to contain_apache__vhost__fragment('pulpcore-http-plugin-container')
is_expected.to contain_apache__vhost__fragment('pulpcore-https-plugin-container')
Expand All @@ -28,6 +29,13 @@
ProxyPassReverse unix:///run/pulpcore-api.sock|http://pulpcore-api/v2/
</Location>
<Location "/pulpcore_registry">
RequestHeader unset REMOTE-USER
RequestHeader unset REMOTE_USER
ProxyPass unix:///run/pulpcore-api.sock|http://pulpcore-api
ProxyPassReverse unix:///run/pulpcore-api.sock|http://pulpcore-api
</Location>
ProxyPass /pulp/container/ unix:///run/pulpcore-content.sock|http://pulpcore-content/pulp/container/
ProxyPassReverse /pulp/container/ unix:///run/pulpcore-content.sock|http://pulpcore-content/pulp/container/
APACHE_CONFIG
Expand Down Expand Up @@ -57,6 +65,13 @@ class {'pulpcore':
ProxyPassReverse unix:///run/pulpcore-api.sock|http://pulpcore-api/v2/
</Location>
<Location "/pulpcore_registry">
RequestHeader unset REMOTE-USER
RequestHeader unset REMOTE_USER
ProxyPass unix:///run/pulpcore-api.sock|http://pulpcore-api
ProxyPassReverse unix:///run/pulpcore-api.sock|http://pulpcore-api
</Location>
ProxyPass /pulp/container/ unix:///run/pulpcore-content.sock|http://pulpcore-content/pulp/container/
ProxyPassReverse /pulp/container/ unix:///run/pulpcore-content.sock|http://pulpcore-content/pulp/container/
APACHE_CONFIG
Expand Down

0 comments on commit de8a749

Please sign in to comment.