Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[installer] Mount custom CA certs into all relevant places #20469

Merged
merged 2 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading