Skip to content

Commit fa63317

Browse files
committed
OCPBUGS-28230: enforce termination message policy on all platform pods
1 parent 62c1ae8 commit fa63317

File tree

5 files changed

+14
-8
lines changed

5 files changed

+14
-8
lines changed

manifests/0000_50_olm_06-psm-operator.deployment.ibm-cloud-managed.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ spec:
5252
memory: 20Mi
5353
cpu: 10m
5454
terminationMessagePath: /dev/termination-log
55-
terminationMessagePolicy: File
55+
terminationMessagePolicy: FallbackToLogsOnError
5656
volumeMounts:
5757
- mountPath: /etc/tls/private
5858
name: package-server-manager-serving-cert

manifests/0000_50_olm_06-psm-operator.deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ spec:
5151
memory: 20Mi
5252
cpu: 10m
5353
terminationMessagePath: /dev/termination-log
54-
terminationMessagePolicy: File
54+
terminationMessagePolicy: FallbackToLogsOnError
5555
volumeMounts:
5656
- mountPath: /etc/tls/private
5757
name: package-server-manager-serving-cert

manifests/0000_50_olm_07-collect-profiles.cronjob.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ spec:
5252
requests:
5353
cpu: 10m
5454
memory: 80Mi
55+
terminationMessagePolicy: FallbackToLogsOnError
5556
volumes:
5657
- name: config-volume
5758
configMap:

staging/operator-lifecycle-manager/pkg/controller/bundle/bundle_unpacker.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ func (c *ConfigMapUnpacker) job(cmRef *corev1.ObjectReference, bundlePath string
157157
Drop: []corev1.Capability{"ALL"},
158158
},
159159
},
160+
TerminationMessagePolicy: corev1.TerminationMessageFallbackToLogsOnError,
160161
},
161162
},
162163
InitContainers: []corev1.Container{
@@ -182,6 +183,7 @@ func (c *ConfigMapUnpacker) job(cmRef *corev1.ObjectReference, bundlePath string
182183
Drop: []corev1.Capability{"ALL"},
183184
},
184185
},
186+
TerminationMessagePolicy: corev1.TerminationMessageFallbackToLogsOnError,
185187
},
186188
{
187189
Name: "pull",
@@ -210,6 +212,7 @@ func (c *ConfigMapUnpacker) job(cmRef *corev1.ObjectReference, bundlePath string
210212
Drop: []corev1.Capability{"ALL"},
211213
},
212214
},
215+
TerminationMessagePolicy: corev1.TerminationMessageFallbackToLogsOnError,
213216
},
214217
},
215218
Volumes: []corev1.Volume{

staging/operator-lifecycle-manager/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)