@@ -22,6 +22,7 @@ use tracing::{debug, error, info, trace, warn};
22
22
23
23
use crate :: clients:: { apply_manifest_yaml, kube_client} ;
24
24
use crate :: configparser:: { config, get_config, get_profile_config} ;
25
+ use crate :: utils:: render_strict;
25
26
26
27
// Deploy cluster resources needed for challenges to work.
27
28
//
@@ -69,9 +70,17 @@ pub async fn install_certmanager(profile: &config::ProfileConfig) -> Result<()>
69
70
let client = kube_client ( profile) . await ?;
70
71
71
72
// letsencrypt and letsencrypt-staging
72
- const ISSUERS_YAML : & str =
73
+ const ISSUERS_TEMPLATE : & str =
73
74
include_str ! ( "../asset_files/setup_manifests/letsencrypt.issuers.yaml" ) ;
74
- apply_manifest_yaml ( & client, ISSUERS_YAML ) . await ?;
75
+
76
+ let issuers_yaml = render_strict (
77
+ ISSUERS_TEMPLATE ,
78
+ minijinja:: context! {
79
+ chal_domain => profile. challenges_domain
80
+ } ,
81
+ ) ?;
82
+
83
+ apply_manifest_yaml ( & client, & issuers_yaml) . await ?;
75
84
76
85
Ok ( ( ) )
77
86
}
@@ -83,11 +92,14 @@ pub async fn install_extdns(profile: &config::ProfileConfig) -> Result<()> {
83
92
include_str ! ( "../asset_files/setup_manifests/external-dns.helm.yaml.j2" ) ;
84
93
85
94
// add profile dns: field directly to chart values
86
- let values = minijinja :: render! (
95
+ let values = render_strict (
87
96
VALUES_TEMPLATE ,
88
- provider_credentials => serde_yml:: to_string( & profile. dns) ?,
89
- chal_domain => profile. challenges_domain
90
- ) ;
97
+ minijinja:: context! {
98
+ provider_credentials => serde_yml:: to_string( & profile. dns) ?,
99
+ chal_domain => profile. challenges_domain
100
+ } ,
101
+ ) ?;
102
+
91
103
trace ! ( "deploying templated external-dns values:\n {}" , values) ;
92
104
93
105
install_helm_chart (
0 commit comments