Skip to content

Commit 75b2aa6

Browse files
committed
OCPBUGS-28230: fallback to logs for termination message
Signed-off-by: Joe Lanford <[email protected]>
1 parent be20100 commit 75b2aa6

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

pkg/controller/bundle/bundle_unpacker.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ func (c *ConfigMapUnpacker) job(cmRef *corev1.ObjectReference, bundlePath string
210210
Drop: []corev1.Capability{"ALL"},
211211
},
212212
},
213+
TerminationMessagePolicy: corev1.TerminationMessageFallbackToLogsOnError,
213214
},
214215
},
215216
Volumes: []corev1.Volume{

pkg/controller/registry/reconciler/reconciler.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -279,11 +279,12 @@ func Pod(source *operatorsv1alpha1.CatalogSource, name, opmImg, utilImage, img s
279279
MountPath: catalogPath,
280280
}
281281
pod.Spec.InitContainers = append(pod.Spec.InitContainers, corev1.Container{
282-
Name: "extract-utilities",
283-
Image: utilImage,
284-
Command: []string{"cp"},
285-
Args: []string{"/bin/copy-content", fmt.Sprintf("%s/copy-content", utilitiesPath)},
286-
VolumeMounts: []corev1.VolumeMount{utilitiesVolumeMount},
282+
Name: "extract-utilities",
283+
Image: utilImage,
284+
Command: []string{"cp"},
285+
Args: []string{"/bin/copy-content", fmt.Sprintf("%s/copy-content", utilitiesPath)},
286+
VolumeMounts: []corev1.VolumeMount{utilitiesVolumeMount},
287+
TerminationMessagePolicy: corev1.TerminationMessageFallbackToLogsOnError,
287288
}, corev1.Container{
288289
Name: "extract-content",
289290
Image: img,
@@ -295,7 +296,8 @@ func Pod(source *operatorsv1alpha1.CatalogSource, name, opmImg, utilImage, img s
295296
"--cache.from=" + grpcPodConfig.ExtractContent.CacheDir,
296297
"--cache.to=" + fmt.Sprintf("%s/cache", catalogPath),
297298
},
298-
VolumeMounts: []corev1.VolumeMount{utilitiesVolumeMount, contentVolumeMount},
299+
VolumeMounts: []corev1.VolumeMount{utilitiesVolumeMount, contentVolumeMount},
300+
TerminationMessagePolicy: corev1.TerminationMessageFallbackToLogsOnError,
299301
})
300302

301303
pod.Spec.Containers[0].Image = opmImg

0 commit comments

Comments
 (0)