Skip to content

Commit 806554e

Browse files
committed
(PUP-10639) Add ca_refresh_interval setting
It defaults to once per day, because if the CA expires, the entire infrastructure is dead until the CA is updated on the agent. And the puppetserver load to stat the `ca_crt.pem` is negligible as compared to the load caused by pluginsync (each agent run causes puppetserver to checksum every file in the environment's modulepath).
1 parent ad7d75b commit 806554e

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

lib/puppet/defaults.rb

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,6 +1212,24 @@ def self.initialize_default_settings!(settings)
12121212
:desc => "The default TTL for new certificates.
12131213
#{AS_DURATION}",
12141214
},
1215+
:ca_refresh_interval => {
1216+
:default => "1d",
1217+
:type => :duration,
1218+
:desc => "How often the Puppet agent refreshes its local CA certs. By
1219+
default the CA certs are refreshed once every 24 hours. If a different
1220+
duration is specified, then the agent will refresh its CA certs whenever
1221+
it next runs and the elapsed time since the certs were last refreshed
1222+
exceeds the duration.
1223+
1224+
In general, the duration should be greater than the `runinterval`.
1225+
Setting it to 0 or an equal or lesser value than `runinterval`,
1226+
will cause the CA certs to be refreshed on every run.
1227+
1228+
If the agent downloads new CA certs, the agent will use it for subsequent
1229+
network requests. If the refresh request fails or if the CA certs are
1230+
unchanged on the server, then the agent run will continue using the
1231+
local CA certs it already has. #{AS_DURATION}",
1232+
},
12151233
:crl_refresh_interval => {
12161234
:default => "1d",
12171235
:type => :duration,
@@ -1222,8 +1240,8 @@ def self.initialize_default_settings!(settings)
12221240
exceeds the duration.
12231241
12241242
In general, the duration should be greater than the `runinterval`.
1225-
Setting it to an equal or lesser value will cause the CRL to be
1226-
refreshed on every run.
1243+
Setting it to 0 or an equal or lesser value than `runinterval`,
1244+
will cause the CRL to be refreshed on every run.
12271245
12281246
If the agent downloads a new CRL, the agent will use it for subsequent
12291247
network requests. If the refresh request fails or if the CRL is

0 commit comments

Comments
 (0)