Skip to content
This repository has been archived by the owner on Aug 12, 2024. It is now read-only.

Commit

Permalink
use FallbackToLogsOnError termination message policy
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Lanford <[email protected]>
  • Loading branch information
joelanford committed May 1, 2024
1 parent e656dc9 commit 79f77e3
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 3 deletions.
6 changes: 4 additions & 2 deletions internal/source/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand All @@ -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").
Expand Down
1 change: 1 addition & 0 deletions manifests/base/apis/webhooks/resources/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ spec:
requests:
cpu: 1m
memory: 15Mi
terminationMessagePolicy: FallbackToLogsOnError
volumes:
- name: cert
secret:
Expand Down
2 changes: 2 additions & 0 deletions manifests/base/core/resources/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ spec:
requests:
cpu: 1m
memory: 15Mi
terminationMessagePolicy: FallbackToLogsOnError
- name: manager
securityContext:
allowPrivilegeEscalation: false
Expand All @@ -68,6 +69,7 @@ spec:
requests:
cpu: 10m
memory: 160Mi
terminationMessagePolicy: FallbackToLogsOnError
volumes:
- name: bundle-cache
emptyDir: {}
1 change: 1 addition & 0 deletions manifests/base/crdvalidator/05_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ spec:
requests:
cpu: 1m
memory: 15Mi
terminationMessagePolicy: FallbackToLogsOnError
volumes:
- name: tls
secret:
Expand Down
4 changes: 3 additions & 1 deletion manifests/base/provisioners/helm/resources/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ spec:
requests:
cpu: 1m
memory: 15Mi
terminationMessagePolicy: FallbackToLogsOnError
- name: manager
securityContext:
allowPrivilegeEscalation: false
Expand All @@ -67,6 +68,7 @@ spec:
requests:
cpu: 10m
memory: 160Mi
terminationMessagePolicy: FallbackToLogsOnError
volumes:
- name: bundle-cache
emptyDir: {}
emptyDir: {}
1 change: 1 addition & 0 deletions test/tools/git/git.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ spec:
- containerPort: 22
protocol: TCP
name: https
terminationMessagePolicy: FallbackToLogsOnError
volumeMounts:
- name: ssh-cert
mountPath: "/git-server/keys"
Expand Down
2 changes: 2 additions & 0 deletions test/tools/imageregistry/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions test/tools/imageregistry/nerdctl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ spec:
image: ghcr.io/containerd/nerdctl
imagePullPolicy: Always
name: nerdctl
terminationMessagePolicy: FallbackToLogsOnError
volumeMounts:
- mountPath: /run/containerd
name: run-containerd
Expand Down
2 changes: 2 additions & 0 deletions test/tools/imageregistry/registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ spec:
- "sh"
- "-c"
- "htpasswd -Bbn myuser mypasswd >> /auth/htpasswd"
terminationMessagePolicy: FallbackToLogsOnError
volumeMounts:
- name: auth-vol
mountPath: "/auth"
Expand All @@ -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: {}
Expand Down
1 change: 1 addition & 0 deletions test/tools/remotedebug/patch/install_dlv_init.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down

0 comments on commit 79f77e3

Please sign in to comment.