@@ -40,6 +40,50 @@ func (builder *JobBuilder) Update(object client.Object, siblings []runtime.Objec
4040
4141 job .ObjectMeta .Labels = metadata .GetLabels (builder .Instance , metadata .ComponentLabelProfile )
4242
43+ env := []corev1.EnvVar {
44+ {
45+ Name : "ROOT_DIR" ,
46+ Value : osrmDataPath ,
47+ },
48+ {
49+ Name : "PARTITIONED_DATA_DIR" ,
50+ Value : osrmPartitionedData ,
51+ },
52+ {
53+ Name : "CUSTOMIZED_DATA_DIR" ,
54+ Value : osrmCustomizedData ,
55+ },
56+ {
57+ Name : "PBF_URL" ,
58+ Value : builder .Instance .Spec .PBFURL ,
59+ },
60+ {
61+ Name : "PROFILE" ,
62+ Value : builder .profile .GetProfile (),
63+ },
64+ }
65+ 66+ if builder .Instance .Spec .MapBuilder .ExtractOptions != nil {
67+ env = append (env , corev1.EnvVar {
68+ Name : "EXTRACT_OPTIONS" ,
69+ Value : * builder .Instance .Spec .MapBuilder .ExtractOptions ,
70+ })
71+ }
72+ 73+ if builder .Instance .Spec .MapBuilder .PartitionOptions != nil {
74+ env = append (env , corev1.EnvVar {
75+ Name : "PARTITION_OPTIONS" ,
76+ Value : * builder .Instance .Spec .MapBuilder .PartitionOptions ,
77+ })
78+ }
79+ 80+ if builder .Instance .Spec .MapBuilder .CustomizeOptions != nil {
81+ env = append (env , corev1.EnvVar {
82+ Name : "CUSTOMIZE_OPTIONS" ,
83+ Value : * builder .Instance .Spec .MapBuilder .CustomizeOptions ,
84+ })
85+ }
86+ 4387 job .Spec = batchv1.JobSpec {
4488 Selector : job .Spec .Selector ,
4589 Template : corev1.PodTemplateSpec {
@@ -53,28 +97,7 @@ func (builder *JobBuilder) Update(object client.Object, siblings []runtime.Objec
5397 Name : builder .Instance .ChildResourceName (builder .profile .Name , JobSuffix ),
5498 Image : builder .Instance .Spec .MapBuilder .GetImage (),
5599 Resources : * builder .Instance .Spec .MapBuilder .GetResources (),
56- Env : []corev1.EnvVar {
57- {
58- Name : "ROOT_DIR" ,
59- Value : osrmDataPath ,
60- },
61- {
62- Name : "PARTITIONED_DATA_DIR" ,
63- Value : osrmPartitionedData ,
64- },
65- {
66- Name : "CUSTOMIZED_DATA_DIR" ,
67- Value : osrmCustomizedData ,
68- },
69- {
70- Name : "PBF_URL" ,
71- Value : builder .Instance .Spec .PBFURL ,
72- },
73- {
74- Name : "PROFILE" ,
75- Value : builder .profile .GetProfile (),
76- },
77- },
100+ Env : env ,
78101 VolumeMounts : []corev1.VolumeMount {
79102 {
80103 Name : osrmDataVolumeName ,
0 commit comments