Skip to content

Commit

Permalink
[installer] Mount custom CA certs into all relevant places (#20469)
Browse files Browse the repository at this point in the history
* [installer] Add custom CA cert to papi-server

* [installer] Add custom CA cert to proxy
  • Loading branch information
geropl authored Dec 19, 2024
1 parent b29e06a commit 7a27ea0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
7 changes: 5 additions & 2 deletions install/installer/pkg/components/proxy/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,18 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
SecretName: ctx.Config.Certificate.Name,
},
},
}}
},
common.CAVolume(),
}

volumeMounts := []corev1.VolumeMount{{
Name: "vhosts",
MountPath: "/etc/caddy/vhosts",
}, {
Name: "config-certificates",
MountPath: "/etc/caddy/certificates",
}}
},
common.CAVolumeMount()}

if pointer.BoolDeref(ctx.Config.ContainerRegistry.InCluster, false) {
volumes = append(volumes, corev1.Volume{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
},
},
databaseSecretVolume,
common.CAVolume(),
}
volumeMounts := []corev1.VolumeMount{
{
Expand All @@ -59,6 +60,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
SubPath: configJSONFilename,
},
databaseSecretMount,
common.CAVolumeMount(),
}

_ = ctx.WithExperimental(func(cfg *experimental.Config) error {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ func TestDeployment_ServerArguments(t *testing.T) {
},
},
},
{
Name: "ca-certificates",
VolumeSource: corev1.VolumeSource{
ConfigMap: &corev1.ConfigMapVolumeSource{
LocalObjectReference: corev1.LocalObjectReference{
Name: "gitpod-ca-bundle",
},
},
},
},
{
Name: "stripe-secret",
VolumeSource: corev1.VolumeSource{
Expand Down

0 comments on commit 7a27ea0

Please sign in to comment.