Merge pull request #2454 from kariya-mitsuru/fix-k8s-driver

Fix k8s driver with certs cannot boot
This commit is contained in:
CrazyMax 2024-05-27 12:32:38 +02:00 committed by GitHub
commit f98ef00ec7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -148,13 +148,13 @@ func NewDeployment(opt *DeploymentOpt) (d *appsv1.Deployment, c []*corev1.Config
Data: cfg.files,
}
d.Spec.Template.Spec.Containers[0].VolumeMounts = []corev1.VolumeMount{{
d.Spec.Template.Spec.Containers[0].VolumeMounts = append(d.Spec.Template.Spec.Containers[0].VolumeMounts, corev1.VolumeMount{
Name: cfg.name,
MountPath: path.Join("/etc/buildkit", cfg.path),
}}
})
d.Spec.Template.Spec.Volumes = []corev1.Volume{{
Name: "config",
d.Spec.Template.Spec.Volumes = append(d.Spec.Template.Spec.Volumes, corev1.Volume{
Name: cfg.name,
VolumeSource: corev1.VolumeSource{
ConfigMap: &corev1.ConfigMapVolumeSource{
LocalObjectReference: corev1.LocalObjectReference{
@ -162,7 +162,7 @@ func NewDeployment(opt *DeploymentOpt) (d *appsv1.Deployment, c []*corev1.Config
},
},
},
}}
})
c = append(c, cc)
}