Skip to content

Commit fc19e56

Browse files
geroplroboquat
authored andcommitted
[slowserver] Fix slowserver
1 parent b9876a1 commit fc19e56

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

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

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -358,19 +358,21 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
358358
}
359359

360360
// admin secret
361-
volumes = append(volumes, corev1.Volume{
362-
Name: "admin-login-key",
363-
VolumeSource: corev1.VolumeSource{
364-
Secret: &corev1.SecretVolumeSource{
365-
SecretName: server.AdminSecretName,
361+
if ctx.Config.AdminLoginSecret != nil {
362+
volumes = append(volumes, corev1.Volume{
363+
Name: "admin-login-key",
364+
VolumeSource: corev1.VolumeSource{
365+
Secret: &corev1.SecretVolumeSource{
366+
SecretName: ctx.Config.AdminLoginSecret.Name,
367+
},
366368
},
367-
},
368-
})
369-
volumeMounts = append(volumeMounts, corev1.VolumeMount{
370-
Name: "admin-login-key",
371-
MountPath: server.AdminSecretMountPath,
372-
ReadOnly: true,
373-
})
369+
})
370+
volumeMounts = append(volumeMounts, corev1.VolumeMount{
371+
Name: "admin-login-key",
372+
MountPath: server.AdminSecretMountPath,
373+
ReadOnly: true,
374+
})
375+
}
374376

375377
return []runtime.Object{
376378
&appsv1.Deployment{

0 commit comments

Comments
 (0)