Skip to content

Commit bd68beb

Browse files
sjenningdeads2k
andauthored
OCPBUGS-55226: switch termination message policy to TerminationMessageFallbackToLogsOnError for debugability (#6122)
* switch termination message policy to TerminationMessageFallbackToLogsOnError for debugability * add test to ensure all containers have TerminationMessagePolicyFallbackToLogsOnError * add more terminationMessagePolicy TerminationMessageFallbackToLogsOnError and limit check to HCP namespace * update testdata --------- Co-authored-by: David Eads <[email protected]>
1 parent 1e59e52 commit bd68beb

File tree

89 files changed

+247
-10
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+247
-10
lines changed

cmd/install/assets/hypershift_operator.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ func (o ExternalDNSDeployment) Build() *appsv1.Deployment {
267267
ReadOnlyRootFilesystem: &readOnlyRootFilesystem,
268268
Privileged: &privileged,
269269
},
270+
TerminationMessagePolicy: corev1.TerminationMessageFallbackToLogsOnError,
270271
VolumeMounts: []corev1.VolumeMount{
271272
{
272273
Name: "credentials",
@@ -691,7 +692,8 @@ func (o HyperShiftOperatorDeployment) Build() *appsv1.Deployment {
691692
ReadOnlyRootFilesystem: &readOnlyRootFilesystem,
692693
Privileged: &privileged,
693694
},
694-
VolumeMounts: initVolumeMounts,
695+
TerminationMessagePolicy: corev1.TerminationMessageFallbackToLogsOnError,
696+
VolumeMounts: initVolumeMounts,
695697
},
696698
},
697699
Containers: []corev1.Container{
@@ -763,7 +765,8 @@ func (o HyperShiftOperatorDeployment) Build() *appsv1.Deployment {
763765
corev1.ResourceCPU: resource.MustParse("10m"),
764766
},
765767
},
766-
VolumeMounts: volumeMounts,
768+
TerminationMessagePolicy: corev1.TerminationMessageFallbackToLogsOnError,
769+
VolumeMounts: volumeMounts,
767770
},
768771
},
769772
Volumes: volumes,

control-plane-operator/controllers/hostedcontrolplane/testdata/catalog-operator/zz_fixture_TestControlPlaneComponents.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ spec:
139139
requests:
140140
cpu: 10m
141141
memory: 30Mi
142+
terminationMessagePolicy: FallbackToLogsOnError
142143
volumeMounts:
143144
- mountPath: /etc/kubernetes/secrets/kubeconfig
144145
name: kubeconfig
@@ -158,6 +159,7 @@ spec:
158159
imagePullPolicy: IfNotPresent
159160
name: availability-prober
160161
resources: {}
162+
terminationMessagePolicy: FallbackToLogsOnError
161163
volumeMounts:
162164
- mountPath: /var/kubeconfig
163165
name: kubeconfig

control-plane-operator/controllers/hostedcontrolplane/testdata/catalog-operator/zz_fixture_TestControlPlaneComponents_TechPreviewNoUpgrade.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ spec:
139139
requests:
140140
cpu: 10m
141141
memory: 30Mi
142+
terminationMessagePolicy: FallbackToLogsOnError
142143
volumeMounts:
143144
- mountPath: /etc/kubernetes/secrets/kubeconfig
144145
name: kubeconfig
@@ -158,6 +159,7 @@ spec:
158159
imagePullPolicy: IfNotPresent
159160
name: availability-prober
160161
resources: {}
162+
terminationMessagePolicy: FallbackToLogsOnError
161163
volumeMounts:
162164
- mountPath: /var/kubeconfig
163165
name: kubeconfig

control-plane-operator/controllers/hostedcontrolplane/testdata/certified-operators-catalog/zz_fixture_TestControlPlaneComponents.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ spec:
112112
successThreshold: 1
113113
timeoutSeconds: 1
114114
terminationMessagePath: /dev/termination-log
115+
terminationMessagePolicy: FallbackToLogsOnError
115116
volumeMounts:
116117
- mountPath: /extracted-catalog
117118
name: catalog-content

control-plane-operator/controllers/hostedcontrolplane/testdata/certified-operators-catalog/zz_fixture_TestControlPlaneComponents_TechPreviewNoUpgrade.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ spec:
112112
successThreshold: 1
113113
timeoutSeconds: 1
114114
terminationMessagePath: /dev/termination-log
115+
terminationMessagePolicy: FallbackToLogsOnError
115116
volumeMounts:
116117
- mountPath: /extracted-catalog
117118
name: catalog-content

control-plane-operator/controllers/hostedcontrolplane/testdata/cloud-controller-manager-aws/zz_fixture_TestControlPlaneComponents.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ spec:
9090
requests:
9191
cpu: 75m
9292
memory: 60Mi
93+
terminationMessagePolicy: FallbackToLogsOnError
9394
volumeMounts:
9495
- mountPath: /etc/cloud
9596
name: cloud-config
@@ -117,6 +118,7 @@ spec:
117118
requests:
118119
cpu: 10m
119120
memory: 30Mi
121+
terminationMessagePolicy: FallbackToLogsOnError
120122
volumeMounts:
121123
- mountPath: /etc/kubernetes
122124
name: kubeconfig

control-plane-operator/controllers/hostedcontrolplane/testdata/cloud-controller-manager-aws/zz_fixture_TestControlPlaneComponents_TechPreviewNoUpgrade.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ spec:
9090
requests:
9191
cpu: 75m
9292
memory: 60Mi
93+
terminationMessagePolicy: FallbackToLogsOnError
9394
volumeMounts:
9495
- mountPath: /etc/cloud
9596
name: cloud-config
@@ -117,6 +118,7 @@ spec:
117118
requests:
118119
cpu: 10m
119120
memory: 30Mi
121+
terminationMessagePolicy: FallbackToLogsOnError
120122
volumeMounts:
121123
- mountPath: /etc/kubernetes
122124
name: kubeconfig

control-plane-operator/controllers/hostedcontrolplane/testdata/cloud-controller-manager-azure/zz_fixture_TestControlPlaneComponents.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ spec:
8484
requests:
8585
cpu: 75m
8686
memory: 60Mi
87+
terminationMessagePolicy: FallbackToLogsOnError
8788
volumeMounts:
8889
- mountPath: /etc/cloud
8990
name: cloud-config

control-plane-operator/controllers/hostedcontrolplane/testdata/cloud-controller-manager-azure/zz_fixture_TestControlPlaneComponents_TechPreviewNoUpgrade.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ spec:
8484
requests:
8585
cpu: 75m
8686
memory: 60Mi
87+
terminationMessagePolicy: FallbackToLogsOnError
8788
volumeMounts:
8889
- mountPath: /etc/cloud
8990
name: cloud-config

control-plane-operator/controllers/hostedcontrolplane/testdata/cloud-controller-manager-kubevirt/zz_fixture_TestControlPlaneComponents.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ spec:
9595
requests:
9696
cpu: 75m
9797
memory: 60Mi
98+
terminationMessagePolicy: FallbackToLogsOnError
9899
volumeMounts:
99100
- mountPath: /etc/cloud
100101
name: cloud-config

control-plane-operator/controllers/hostedcontrolplane/testdata/cloud-controller-manager-kubevirt/zz_fixture_TestControlPlaneComponents_TechPreviewNoUpgrade.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ spec:
9595
requests:
9696
cpu: 75m
9797
memory: 60Mi
98+
terminationMessagePolicy: FallbackToLogsOnError
9899
volumeMounts:
99100
- mountPath: /etc/cloud
100101
name: cloud-config

control-plane-operator/controllers/hostedcontrolplane/testdata/cloud-controller-manager-openstack/zz_fixture_TestControlPlaneComponents.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ spec:
8989
requests:
9090
cpu: 200m
9191
memory: 50Mi
92+
terminationMessagePolicy: FallbackToLogsOnError
9293
volumeMounts:
9394
- mountPath: /etc/kubernetes/kubeconfig
9495
name: kubeconfig

control-plane-operator/controllers/hostedcontrolplane/testdata/cloud-controller-manager-openstack/zz_fixture_TestControlPlaneComponents_TechPreviewNoUpgrade.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ spec:
8989
requests:
9090
cpu: 200m
9191
memory: 50Mi
92+
terminationMessagePolicy: FallbackToLogsOnError
9293
volumeMounts:
9394
- mountPath: /etc/kubernetes/kubeconfig
9495
name: kubeconfig

control-plane-operator/controllers/hostedcontrolplane/testdata/cloud-controller-manager-powervs/zz_fixture_TestControlPlaneComponents.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ spec:
102102
requests:
103103
cpu: 75m
104104
memory: 60Mi
105+
terminationMessagePolicy: FallbackToLogsOnError
105106
volumeMounts:
106107
- mountPath: /etc/kubernetes
107108
name: service-network-admin-kubeconfig

control-plane-operator/controllers/hostedcontrolplane/testdata/cloud-controller-manager-powervs/zz_fixture_TestControlPlaneComponents_TechPreviewNoUpgrade.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ spec:
102102
requests:
103103
cpu: 75m
104104
memory: 60Mi
105+
terminationMessagePolicy: FallbackToLogsOnError
105106
volumeMounts:
106107
- mountPath: /etc/kubernetes
107108
name: service-network-admin-kubeconfig

control-plane-operator/controllers/hostedcontrolplane/testdata/cloud-credential-operator/zz_fixture_TestControlPlaneComponents.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ spec:
9999
imagePullPolicy: IfNotPresent
100100
name: availability-prober
101101
resources: {}
102+
terminationMessagePolicy: FallbackToLogsOnError
102103
volumeMounts:
103104
- mountPath: /var/kubeconfig
104105
name: service-account-kubeconfig

control-plane-operator/controllers/hostedcontrolplane/testdata/cloud-credential-operator/zz_fixture_TestControlPlaneComponents_TechPreviewNoUpgrade.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ spec:
9999
imagePullPolicy: IfNotPresent
100100
name: availability-prober
101101
resources: {}
102+
terminationMessagePolicy: FallbackToLogsOnError
102103
volumeMounts:
103104
- mountPath: /var/kubeconfig
104105
name: service-account-kubeconfig

control-plane-operator/controllers/hostedcontrolplane/testdata/cluster-autoscaler/zz_fixture_TestControlPlaneComponents.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ spec:
120120
requests:
121121
cpu: 10m
122122
memory: 60Mi
123+
terminationMessagePolicy: FallbackToLogsOnError
123124
volumeMounts:
124125
- mountPath: /mnt/kubeconfig
125126
name: kubeconfig
@@ -133,6 +134,7 @@ spec:
133134
imagePullPolicy: IfNotPresent
134135
name: availability-prober
135136
resources: {}
137+
terminationMessagePolicy: FallbackToLogsOnError
136138
priorityClassName: hypershift-control-plane
137139
restartPolicy: Always
138140
schedulerName: default-scheduler

control-plane-operator/controllers/hostedcontrolplane/testdata/cluster-autoscaler/zz_fixture_TestControlPlaneComponents_TechPreviewNoUpgrade.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ spec:
120120
requests:
121121
cpu: 10m
122122
memory: 60Mi
123+
terminationMessagePolicy: FallbackToLogsOnError
123124
volumeMounts:
124125
- mountPath: /mnt/kubeconfig
125126
name: kubeconfig
@@ -133,6 +134,7 @@ spec:
133134
imagePullPolicy: IfNotPresent
134135
name: availability-prober
135136
resources: {}
137+
terminationMessagePolicy: FallbackToLogsOnError
136138
priorityClassName: hypershift-control-plane
137139
restartPolicy: Always
138140
schedulerName: default-scheduler

control-plane-operator/controllers/hostedcontrolplane/testdata/cluster-image-registry-operator/zz_fixture_TestControlPlaneComponents.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ spec:
121121
requests:
122122
cpu: 10m
123123
memory: 50Mi
124+
terminationMessagePolicy: FallbackToLogsOnError
124125
volumeMounts:
125126
- mountPath: /etc/certificate/ca
126127
name: ca-bundle
@@ -146,6 +147,7 @@ spec:
146147
requests:
147148
cpu: 10m
148149
memory: 30Mi
150+
terminationMessagePolicy: FallbackToLogsOnError
149151
volumeMounts:
150152
- mountPath: /etc/kubernetes
151153
name: kubeconfig
@@ -167,6 +169,7 @@ spec:
167169
requests:
168170
cpu: 10m
169171
memory: 30Mi
172+
terminationMessagePolicy: FallbackToLogsOnError
170173
volumeMounts:
171174
- mountPath: /etc/kubernetes
172175
name: kubeconfig

control-plane-operator/controllers/hostedcontrolplane/testdata/cluster-image-registry-operator/zz_fixture_TestControlPlaneComponents_TechPreviewNoUpgrade.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ spec:
121121
requests:
122122
cpu: 10m
123123
memory: 50Mi
124+
terminationMessagePolicy: FallbackToLogsOnError
124125
volumeMounts:
125126
- mountPath: /etc/certificate/ca
126127
name: ca-bundle
@@ -146,6 +147,7 @@ spec:
146147
requests:
147148
cpu: 10m
148149
memory: 30Mi
150+
terminationMessagePolicy: FallbackToLogsOnError
149151
volumeMounts:
150152
- mountPath: /etc/kubernetes
151153
name: kubeconfig
@@ -167,6 +169,7 @@ spec:
167169
requests:
168170
cpu: 10m
169171
memory: 30Mi
172+
terminationMessagePolicy: FallbackToLogsOnError
170173
volumeMounts:
171174
- mountPath: /etc/kubernetes
172175
name: kubeconfig

control-plane-operator/controllers/hostedcontrolplane/testdata/cluster-network-operator/zz_fixture_TestControlPlaneComponents.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ spec:
210210
requests:
211211
cpu: 10m
212212
memory: 30Mi
213+
terminationMessagePolicy: FallbackToLogsOnError
213214
volumeMounts:
214215
- mountPath: /etc/kubernetes/secrets/kubeconfig
215216
name: hosted-etc-kube
@@ -234,6 +235,7 @@ spec:
234235
imagePullPolicy: IfNotPresent
235236
name: availability-prober
236237
resources: {}
238+
terminationMessagePolicy: FallbackToLogsOnError
237239
volumeMounts:
238240
- mountPath: /var/kubeconfig
239241
name: hosted-etc-kube

control-plane-operator/controllers/hostedcontrolplane/testdata/cluster-network-operator/zz_fixture_TestControlPlaneComponents_TechPreviewNoUpgrade.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ spec:
210210
requests:
211211
cpu: 10m
212212
memory: 30Mi
213+
terminationMessagePolicy: FallbackToLogsOnError
213214
volumeMounts:
214215
- mountPath: /etc/kubernetes/secrets/kubeconfig
215216
name: hosted-etc-kube
@@ -234,6 +235,7 @@ spec:
234235
imagePullPolicy: IfNotPresent
235236
name: availability-prober
236237
resources: {}
238+
terminationMessagePolicy: FallbackToLogsOnError
237239
volumeMounts:
238240
- mountPath: /var/kubeconfig
239241
name: hosted-etc-kube

control-plane-operator/controllers/hostedcontrolplane/testdata/cluster-policy-controller/zz_fixture_TestControlPlaneComponents.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ spec:
9696
requests:
9797
cpu: 10m
9898
memory: 200Mi
99+
terminationMessagePolicy: FallbackToLogsOnError
99100
volumeMounts:
100101
- mountPath: /etc/kubernetes/client-ca
101102
name: client-ca
@@ -115,6 +116,7 @@ spec:
115116
imagePullPolicy: IfNotPresent
116117
name: availability-prober
117118
resources: {}
119+
terminationMessagePolicy: FallbackToLogsOnError
118120
priorityClassName: hypershift-control-plane
119121
tolerations:
120122
- effect: NoSchedule

control-plane-operator/controllers/hostedcontrolplane/testdata/cluster-policy-controller/zz_fixture_TestControlPlaneComponents_TechPreviewNoUpgrade.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ spec:
9696
requests:
9797
cpu: 10m
9898
memory: 200Mi
99+
terminationMessagePolicy: FallbackToLogsOnError
99100
volumeMounts:
100101
- mountPath: /etc/kubernetes/client-ca
101102
name: client-ca
@@ -115,6 +116,7 @@ spec:
115116
imagePullPolicy: IfNotPresent
116117
name: availability-prober
117118
resources: {}
119+
terminationMessagePolicy: FallbackToLogsOnError
118120
priorityClassName: hypershift-control-plane
119121
tolerations:
120122
- effect: NoSchedule

control-plane-operator/controllers/hostedcontrolplane/testdata/cluster-storage-operator/zz_fixture_TestControlPlaneComponents.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ spec:
187187
imagePullPolicy: IfNotPresent
188188
name: availability-prober
189189
resources: {}
190+
terminationMessagePolicy: FallbackToLogsOnError
190191
volumeMounts:
191192
- mountPath: /var/kubeconfig
192193
name: guest-kubeconfig

control-plane-operator/controllers/hostedcontrolplane/testdata/cluster-storage-operator/zz_fixture_TestControlPlaneComponents_TechPreviewNoUpgrade.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ spec:
187187
imagePullPolicy: IfNotPresent
188188
name: availability-prober
189189
resources: {}
190+
terminationMessagePolicy: FallbackToLogsOnError
190191
volumeMounts:
191192
- mountPath: /var/kubeconfig
192193
name: guest-kubeconfig

control-plane-operator/controllers/hostedcontrolplane/testdata/cluster-version-operator/zz_fixture_TestControlPlaneComponents.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ spec:
103103
requests:
104104
cpu: 20m
105105
memory: 70Mi
106+
terminationMessagePolicy: FallbackToLogsOnError
106107
volumeMounts:
107108
- mountPath: /etc/openshift/kubeconfig
108109
name: kubeconfig
@@ -123,6 +124,7 @@ spec:
123124
imagePullPolicy: IfNotPresent
124125
name: availability-prober
125126
resources: {}
127+
terminationMessagePolicy: FallbackToLogsOnError
126128
volumeMounts:
127129
- mountPath: /var/kubeconfig
128130
name: kubeconfig
@@ -287,6 +289,7 @@ spec:
287289
requests:
288290
cpu: 10m
289291
memory: 20Mi
292+
terminationMessagePolicy: FallbackToLogsOnError
290293
volumeMounts:
291294
- mountPath: /var/payload
292295
name: payload
@@ -324,6 +327,7 @@ spec:
324327
requests:
325328
cpu: 10m
326329
memory: 10Mi
330+
terminationMessagePolicy: FallbackToLogsOnError
327331
volumeMounts:
328332
- mountPath: /etc/kubernetes
329333
name: kubeconfig

0 commit comments

Comments
 (0)