diff --git a/internal/source/image.go b/internal/source/image.go index 60bbfb28..80eaa195 100644 --- a/internal/source/image.go +++ b/internal/source/image.go @@ -143,7 +143,8 @@ func (i *Image) getDesiredPodApplyConfig(bundle *rukpakv1alpha2.BundleDeployment WithName("util"). WithMountPath("/util/bin"), ). - WithSecurityContext(containerSecurityContext), + WithSecurityContext(containerSecurityContext). + WithTerminationMessagePolicy(corev1.TerminationMessageFallbackToLogsOnError), ). WithContainers(applyconfigurationcorev1.Container(). WithName(imageBundleUnpackContainerName). @@ -153,7 +154,8 @@ func (i *Image) getDesiredPodApplyConfig(bundle *rukpakv1alpha2.BundleDeployment WithName("util"). WithMountPath("/bin"), ). - WithSecurityContext(containerSecurityContext), + WithSecurityContext(containerSecurityContext). + WithTerminationMessagePolicy(corev1.TerminationMessageFallbackToLogsOnError), ). WithVolumes(applyconfigurationcorev1.Volume(). WithName("util"). diff --git a/manifests/base/apis/webhooks/resources/deployment.yaml b/manifests/base/apis/webhooks/resources/deployment.yaml index ed8a069a..294aedb6 100644 --- a/manifests/base/apis/webhooks/resources/deployment.yaml +++ b/manifests/base/apis/webhooks/resources/deployment.yaml @@ -42,6 +42,7 @@ spec: requests: cpu: 1m memory: 15Mi + terminationMessagePolicy: FallbackToLogsOnError volumes: - name: cert secret: diff --git a/manifests/base/core/resources/deployment.yaml b/manifests/base/core/resources/deployment.yaml index 83853905..146ccdec 100644 --- a/manifests/base/core/resources/deployment.yaml +++ b/manifests/base/core/resources/deployment.yaml @@ -45,6 +45,7 @@ spec: requests: cpu: 1m memory: 15Mi + terminationMessagePolicy: FallbackToLogsOnError - name: manager securityContext: allowPrivilegeEscalation: false @@ -68,6 +69,7 @@ spec: requests: cpu: 10m memory: 160Mi + terminationMessagePolicy: FallbackToLogsOnError volumes: - name: bundle-cache emptyDir: {} diff --git a/manifests/base/crdvalidator/05_deployment.yaml b/manifests/base/crdvalidator/05_deployment.yaml index 8e0f6b5d..52cb8988 100644 --- a/manifests/base/crdvalidator/05_deployment.yaml +++ b/manifests/base/crdvalidator/05_deployment.yaml @@ -25,6 +25,7 @@ spec: requests: cpu: 1m memory: 15Mi + terminationMessagePolicy: FallbackToLogsOnError volumes: - name: tls secret: diff --git a/manifests/base/provisioners/helm/resources/deployment.yaml b/manifests/base/provisioners/helm/resources/deployment.yaml index a9075ed8..fe558997 100644 --- a/manifests/base/provisioners/helm/resources/deployment.yaml +++ b/manifests/base/provisioners/helm/resources/deployment.yaml @@ -45,6 +45,7 @@ spec: requests: cpu: 1m memory: 15Mi + terminationMessagePolicy: FallbackToLogsOnError - name: manager securityContext: allowPrivilegeEscalation: false @@ -67,6 +68,7 @@ spec: requests: cpu: 10m memory: 160Mi + terminationMessagePolicy: FallbackToLogsOnError volumes: - name: bundle-cache - emptyDir: {} \ No newline at end of file + emptyDir: {} diff --git a/test/tools/git/git.yaml b/test/tools/git/git.yaml index f3ae0632..55289f04 100644 --- a/test/tools/git/git.yaml +++ b/test/tools/git/git.yaml @@ -13,6 +13,7 @@ spec: - containerPort: 22 protocol: TCP name: https + terminationMessagePolicy: FallbackToLogsOnError volumeMounts: - name: ssh-cert mountPath: "/git-server/keys" diff --git a/test/tools/imageregistry/daemonset.yaml b/test/tools/imageregistry/daemonset.yaml index 463fabeb..c2651152 100644 --- a/test/tools/imageregistry/daemonset.yaml +++ b/test/tools/imageregistry/daemonset.yaml @@ -41,6 +41,8 @@ spec: key: setup.sh securityContext: privileged: true + terminationMessagePolicy: FallbackToLogsOnError containers: - name: wait image: registry.k8s.io/pause:3.1 + terminationMessagePolicy: FallbackToLogsOnError diff --git a/test/tools/imageregistry/nerdctl.yaml b/test/tools/imageregistry/nerdctl.yaml index c9faecbb..ad07058e 100644 --- a/test/tools/imageregistry/nerdctl.yaml +++ b/test/tools/imageregistry/nerdctl.yaml @@ -10,6 +10,7 @@ spec: image: ghcr.io/containerd/nerdctl imagePullPolicy: Always name: nerdctl + terminationMessagePolicy: FallbackToLogsOnError volumeMounts: - mountPath: /run/containerd name: run-containerd diff --git a/test/tools/imageregistry/registry.yaml b/test/tools/imageregistry/registry.yaml index 9e5e7260..24c718de 100644 --- a/test/tools/imageregistry/registry.yaml +++ b/test/tools/imageregistry/registry.yaml @@ -12,6 +12,7 @@ spec: - "sh" - "-c" - "htpasswd -Bbn myuser mypasswd >> /auth/htpasswd" + terminationMessagePolicy: FallbackToLogsOnError volumeMounts: - name: auth-vol mountPath: "/auth" @@ -38,6 +39,7 @@ spec: value: "/certs/tls.crt" - name: REGISTRY_HTTP_TLS_KEY value: "/certs/tls.key" + terminationMessagePolicy: FallbackToLogsOnError volumes: - name: repo-vol emptyDir: {} diff --git a/test/tools/remotedebug/patch/install_dlv_init.yaml b/test/tools/remotedebug/patch/install_dlv_init.yaml index aeeaa361..bde7af86 100644 --- a/test/tools/remotedebug/patch/install_dlv_init.yaml +++ b/test/tools/remotedebug/patch/install_dlv_init.yaml @@ -24,6 +24,7 @@ spec: - -ldflags - "-s -w -extldflags '-static'" - github.com/go-delve/delve/cmd/dlv@latest + terminationMessagePolicy: FallbackToLogsOnError volumeMounts: - name: gobindir mountPath: /go/bin/