Skip to content

Commit

Permalink
fix: forget to declare volume in deployment
Browse files Browse the repository at this point in the history
Signed-off-by: joshua <i@joshua.su>
  • Loading branch information
sujoshua committed Aug 24, 2024
1 parent 51a719e commit 0ed54f4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions internal/controller/job_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,15 @@ func (r *JobReconciler) desiredDeployment(job *v1beta1.Job, manager string, fron
},
}
if frontCM != nil {
app.Spec.Template.Spec.Volumes = append(app.Spec.Template.Spec.Volumes, corev1.Volume{
Name: frontCM.Name,
VolumeSource: corev1.VolumeSource{
ConfigMap: &corev1.ConfigMapVolumeSource{
LocalObjectReference: corev1.LocalObjectReference{Name: frontCM.Name},
},
},
})

frontContainer.VolumeMounts = append(frontContainer.VolumeMounts, corev1.VolumeMount{
Name: frontCM.Name,
SubPath: "frontConfig",
Expand Down

0 comments on commit 0ed54f4

Please sign in to comment.