-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #31642 - Add container gateway support
- Loading branch information
Showing
3 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# = Foreman Proxy Container Gateway plugin | ||
# | ||
# This class installs the Container Gateway plugin | ||
# | ||
# $pulp_endpoint:: Pulp 3 server endpoint | ||
# | ||
# $pulp_client_ssl_cert:: X509 certificate for authenticating with Pulp | ||
# | ||
# $pulp_client_ssl_key:: RSA private key for the Pulp certificate | ||
# | ||
# $sqlite_db_path:: Absolute path for the SQLite DB file to exist at | ||
# | ||
# === Advanced parameters: | ||
# | ||
# $enabled:: enables/disables the pulp plugin | ||
# | ||
# $listen_on:: proxy feature listens on http, https, or both | ||
# | ||
# $version:: plugin package version, it's passed to ensure parameter of package resource | ||
# can be set to specific version number, 'latest', 'present' etc. | ||
# | ||
class foreman_proxy::plugin::container_gateway ( | ||
Optional[String] $version = $foreman_proxy::plugin::container_gateway::params::version, | ||
Boolean $enabled = $foreman_proxy::plugin::container_gateway::params::enabled, | ||
Foreman_proxy::ListenOn $listen_on = $foreman_proxy::plugin::container_gateway::params::listen_on, | ||
Stdlib::HTTPUrl $pulp_endpoint = $foreman_proxy::plugin::container_gateway::params::pulp_endpoint, | ||
Stdlib::Absolutepath $pulp_client_ssl_cert = $foreman_proxy::plugin::container_gateway::params::pulp_ssl_client_cert, | ||
Stdlib::Absolutepath $pulp_client_ssl_key = $foreman_proxy::plugin::container_gateway::params::pulp_ssl_client_key, | ||
Stdlib::Absolutepath $sqlite_db_path = $foreman_proxy::plugin::container_gateway::params::sqlite_db_path, | ||
) inherits foreman_proxy::plugin::container_gateway::params { | ||
foreman_proxy::plugin::module { 'container_gateway': | ||
version => $version, | ||
enabled => $enabled, | ||
feature => 'Container_Gateway', | ||
listen_on => $listen_on, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Default parameters for the Container Gateway smart proxy plugin | ||
# @api private | ||
class foreman_proxy::plugin::container_gateway::params { | ||
$enabled = true | ||
$listen_on = 'https' | ||
$version = undef | ||
$pulp_endpoint = "https://${facts['networking']['fqdn']}" | ||
$pulp_ssl_client_cert = '/etc/foreman-proxy/foreman_ssl_cert.pem' | ||
$pulp_ssl_client_key = '/etc/foreman-proxy/foreman_ssl_key.pem' | ||
$sqlite_db_path = '/var/lib/foreman-proxy/smart_proxy_container_gateway.db' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
# Container Gateway for Katello | ||
:enabled: <%= @module_enabled %> | ||
:pulp_endpoint: <%= scope.lookupvar("foreman_proxy::plugin::container_gateway::pulp_endpoint") %> | ||
:pulp_client_ssl_cert: <%= scope.lookupvar("foreman_proxy::plugin::container_gateway::pulp_ssl_client_cert") %> | ||
:pulp_client_ssl_key: <%= scope.lookupvar("foreman_proxy::plugin::container_gateway::pulp_ssl_client_key") %> | ||
:sqlite_db_path: <%= scope.lookupvar("foreman_proxy::plugin::container_gateway::sqlite_db_path") %> |