3
0

Merge branch 'jenkins-build-42' into 'master'

Auto-merge for build 42

See merge request puppet/prometheus_cd!41
This commit is contained in:
2025-12-03 14:37:11 +00:00
3 changed files with 117 additions and 10 deletions

View File

@@ -502,6 +502,78 @@
—
<div class='inline'>
<p>reduce parallel WAL replay workers</p>
</div>
</li>
<li>
<span class='name'>ps_write_external</span>
<span class='type'>(<tt>Boolean</tt>)</span>
<em class="default">(defaults to: <tt>false</tt>)</em>
&mdash;
<div class='inline'>
<p>whether to allow remote postgres</p>
</div>
</li>
<li>
<span class='name'>ps_auth_ext_user</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;changeme&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>user for writing to extern instance</p>
</div>
</li>
<li>
<span class='name'>ps_auth_ext_pass</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;changeme&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>password for writing to extern instance</p>
</div>
</li>
<li>
<span class='name'>ps_external_url</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;http://change.local&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>the full url for the remote write point</p>
</div>
</li>
@@ -517,10 +589,6 @@
<pre class="lines">
28
29
30
31
32
33
34
@@ -575,10 +643,22 @@
83
84
85
86</pre>
86
87
88
89
90
91
92
93
94
95
96
97
98</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 28</span>
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 32</span>
class prometheus_cd::params (
@@ -597,11 +677,15 @@ class prometheus_cd::params (
String $ps_fw_prefix = &#39;50&#39;,
String $ps_main_port = &#39;9090&#39;,
# auth
# auth prometheus
String $ps_auth_user = &#39;changeme&#39;,
String $ps_auth_pass = &#39;changeme&#39;,
String $ps_web_pass = &#39;changeme&#39;,
# auth remote
String $ps_auth_ext_user = &#39;changeme&#39;,
String $ps_auth_ext_pass = &#39;changeme&#39;,
# storage
String $ps_retention_time = &#39;15d&#39;,
String $ps_retention_size = &#39;20GB&#39;,
@@ -616,6 +700,10 @@ class prometheus_cd::params (
String $ps_oom_score = &#39;500&#39;,
String $ps_max_procs = &#39;1&#39;,
# remote write external
Boolean $ps_write_external = false,
String $ps_external_url = &#39;http://change.local&#39;,
) {
# defaults
$fqdn = $facts[&#39;networking&#39;][&#39;fqdn&#39;]

View File

@@ -24,6 +24,10 @@
# @param [String] ps_swap_mem allow swap, but limit it
# @param [String] ps_oom_score OOM killer choosing prometheus
# @param [String] ps_max_procs reduce parallel WAL replay workers
# @param [Boolean] ps_write_external whether to allow remote postgres
# @param [String] ps_auth_ext_user user for writing to extern instance
# @param [String] ps_auth_ext_pass password for writing to extern instance
# @param [String] ps_external_url the full url for the remote write point
##############################################################################
class prometheus_cd::params (
@@ -42,11 +46,15 @@ class prometheus_cd::params (
String $ps_fw_prefix = '50',
String $ps_main_port = '9090',
# auth
# auth prometheus
String $ps_auth_user = 'changeme',
String $ps_auth_pass = 'changeme',
String $ps_web_pass = 'changeme',
# auth remote
String $ps_auth_ext_user = 'changeme',
String $ps_auth_ext_pass = 'changeme',
# storage
String $ps_retention_time = '15d',
String $ps_retention_size = '20GB',
@@ -61,6 +69,10 @@ class prometheus_cd::params (
String $ps_oom_score = '500',
String $ps_max_procs = '1',
# remote write external
Boolean $ps_write_external = false,
String $ps_external_url = 'http://change.local',
) {
# defaults
$fqdn = $facts['networking']['fqdn']

View File

@@ -36,3 +36,10 @@ remote_write:
basic_auth:
username: <%= @ps_auth_user %>
password: <%= @ps_auth_pass %>
<% if @ps_write_external == true -%>
remote_write:
- url: "<%= @ps_external_url %>"
basic_auth:
username: <%= @ps_auth_ext_user %>
password: <%= @ps_auth_ext_pass %>
<% end -%>