@@ -23,6 +23,27 @@ func certmanager(ctx *common.RenderContext) ([]runtime.Object, error) {
23
23
issuerName := "gitpod-self-signed-issuer"
24
24
secretCAName := "gitpod-identity-trust-root"
25
25
26
+ gitpodCaBundleSources := []trust.BundleSource {
27
+ {
28
+ UseDefaultCAs : pointer .Bool (true ),
29
+ },
30
+ {
31
+ Secret : & trust.SourceObjectKeySelector {
32
+ Name : secretCAName ,
33
+ KeySelector : trust.KeySelector {Key : "ca.crt" },
34
+ },
35
+ },
36
+ }
37
+
38
+ if ctx .Config .CustomCACert != nil {
39
+ gitpodCaBundleSources = append (gitpodCaBundleSources , trust.BundleSource {
40
+ Secret : & trust.SourceObjectKeySelector {
41
+ Name : ctx .Config .CustomCACert .Name ,
42
+ KeySelector : trust.KeySelector {Key : "ca.crt" },
43
+ },
44
+ })
45
+ }
46
+
26
47
// TODO (gpl): This is a workaround to untangle the refactoring of existing infrastructure from
27
48
// moving forward with this change
28
49
caCertificateNamespace := "cert-manager" // this is the default we want to converge on, eventually
@@ -129,17 +150,7 @@ func certmanager(ctx *common.RenderContext) ([]runtime.Object, error) {
129
150
Name : "gitpod-ca-bundle" ,
130
151
},
131
152
Spec : trust.BundleSpec {
132
- Sources : []trust.BundleSource {
133
- {
134
- UseDefaultCAs : pointer .Bool (true ),
135
- },
136
- {
137
- Secret : & trust.SourceObjectKeySelector {
138
- Name : secretCAName ,
139
- KeySelector : trust.KeySelector {Key : "ca.crt" },
140
- },
141
- },
142
- },
153
+ Sources : gitpodCaBundleSources ,
143
154
Target : trust.BundleTarget {
144
155
ConfigMap : & trust.KeySelector {
145
156
Key : "ca-certificates.crt" ,
0 commit comments