Skip to content

Commit 7a27ea0

Browse files
authored
[installer] Mount custom CA certs into all relevant places (#20469)
* [installer] Add custom CA cert to papi-server * [installer] Add custom CA cert to proxy
1 parent b29e06a commit 7a27ea0

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

install/installer/pkg/components/proxy/deployment.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,18 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
5252
SecretName: ctx.Config.Certificate.Name,
5353
},
5454
},
55-
}}
55+
},
56+
common.CAVolume(),
57+
}
5658

5759
volumeMounts := []corev1.VolumeMount{{
5860
Name: "vhosts",
5961
MountPath: "/etc/caddy/vhosts",
6062
}, {
6163
Name: "config-certificates",
6264
MountPath: "/etc/caddy/certificates",
63-
}}
65+
},
66+
common.CAVolumeMount()}
6467

6568
if pointer.BoolDeref(ctx.Config.ContainerRegistry.InCluster, false) {
6669
volumes = append(volumes, corev1.Volume{

install/installer/pkg/components/public-api-server/deployment.go

+2
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
5050
},
5151
},
5252
databaseSecretVolume,
53+
common.CAVolume(),
5354
}
5455
volumeMounts := []corev1.VolumeMount{
5556
{
@@ -59,6 +60,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
5960
SubPath: configJSONFilename,
6061
},
6162
databaseSecretMount,
63+
common.CAVolumeMount(),
6264
}
6365

6466
_ = ctx.WithExperimental(func(cfg *experimental.Config) error {

install/installer/pkg/components/public-api-server/deployment_test.go

+10
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,16 @@ func TestDeployment_ServerArguments(t *testing.T) {
6464
},
6565
},
6666
},
67+
{
68+
Name: "ca-certificates",
69+
VolumeSource: corev1.VolumeSource{
70+
ConfigMap: &corev1.ConfigMapVolumeSource{
71+
LocalObjectReference: corev1.LocalObjectReference{
72+
Name: "gitpod-ca-bundle",
73+
},
74+
},
75+
},
76+
},
6777
{
6878
Name: "stripe-secret",
6979
VolumeSource: corev1.VolumeSource{

0 commit comments

Comments
 (0)