Using --diff-changes when a failed version of a resource is already present in the cluster results in panic
praveenrewar opened this issue · comments
What steps did you take:
job-fail.yaml
apiVersion: batch/v1
kind: Job
metadata:
name: my-job
annotations:
kapp.k14s.io/versioned: ""
spec:
template:
metadata:
name: my-job
spec:
restartPolicy: Never
containers:
- name: my-job
image: alpine:3.15.0
command: [ "sh", "-c", "exit 1" ]
backoffLimit: 0
$ kapp deploy -a test-diff -f job-fail.yaml
...
Changes
Namespace Name Kind Conds. Age Op Op st. Wait to Rs Ri
default my-job-ver-1 Job - - create - reconcile - -
...
kapp: Error: waiting on reconcile job/my-job-ver-1 (batch/v1) namespace: default:
Finished unsuccessfully (Failed with reason BackoffLimitExceeded: Job has reached the specified backoff limit)
$ kapp deploy -a test-diff -f job-fail.yaml -c
@@ noop job/my-job-ver-1 (batch/v1) namespace: default @@
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1fe8e95]
What happened:
When deploying an app which already consists of a failed job, kapp panics when using the -c
option.
What did you expect:
kapp shouldn’t panic and show an empty since there's no change made to the resource.
Anything else you would like to add:
Environment:
- kapp version (use
kapp --version
): v0.46.0 - OS (e.g. from
/etc/os-release
): - Kubernetes version (use
kubectl version
)
Vote on this request
This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.
👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"
We are also happy to receive and review Pull Requests if you want to help working on this issue.
Fix available as part of kapp v0.47.0