@@ -112,6 +112,11 @@ func (bp *KubernetesBuildProcessor) buildModule(b *builder.Build) error {
112
112
return err
113
113
}
114
114
115
+ // We run a script that downloads libs,
116
+ // download and extracts kernelURLs saving its output to KERNELDIR env variable,
117
+ // then finally runs the build script.
118
+ res = fmt .Sprintf ("%s\n export KERNELDIR=$(%s)\n %s" , libsDownloadScript , kernelDownloadScript , res )
119
+
115
120
if c .ModuleFilePath != "" {
116
121
res = fmt .Sprintf ("%s\n %s" , "touch " + moduleLockFile , res )
117
122
res = fmt .Sprintf ("%s\n %s" , res , "rm " + moduleLockFile )
@@ -128,7 +133,7 @@ func (bp *KubernetesBuildProcessor) buildModule(b *builder.Build) error {
128
133
buildCmd := []string {
129
134
"/bin/bash" ,
130
135
"-l" ,
131
- "/driverkit/download-libs.sh && KERNELDIR=$(/driverkit/download-headers.sh) /driverkit/ driverkit.sh" ,
136
+ "/driverkit/driverkit.sh" ,
132
137
}
133
138
134
139
commonMeta := metav1.ObjectMeta {
@@ -176,13 +181,19 @@ func (bp *KubernetesBuildProcessor) buildModule(b *builder.Build) error {
176
181
secuContext := corev1.PodSecurityContext {
177
182
RunAsUser : & bp .runAsUser ,
178
183
}
184
+
185
+ imagePullSecrets := make ([]corev1.LocalObjectReference , 0 )
186
+ if bp .imagePullSecret != "" {
187
+ imagePullSecrets = append (imagePullSecrets , corev1.LocalObjectReference {Name : bp .imagePullSecret })
188
+ }
189
+
179
190
pod := & corev1.Pod {
180
191
ObjectMeta : commonMeta ,
181
192
Spec : corev1.PodSpec {
182
193
ActiveDeadlineSeconds : pointer .Int64Ptr (deadline ),
183
194
RestartPolicy : corev1 .RestartPolicyNever ,
184
195
SecurityContext : & secuContext ,
185
- ImagePullSecrets : []corev1. LocalObjectReference {{ Name : bp . imagePullSecret }} ,
196
+ ImagePullSecrets : imagePullSecrets ,
186
197
Containers : []corev1.Container {
187
198
{
188
199
Name : name ,
0 commit comments