versioned-explicit-ref does not work for all resource types
- Dominant language
- Go
- Stars
- 1.1k
- Forks
- 134
- PR merge metrics
- No merged PRs in 30d
Description
**What steps did you take:**
1. Deploy the below.
2. Change `test: x` to `test: x2`.
3. Deploy again.
```
---
apiVersion: batch/v1
kind: Job
metadata:
name: foo-job
annotations:
kapp.k14s.io/update-strategy: always-replace
kapp.k14s.io/change-group: job-group
kapp.k14s.io/versioned: ""
test: x
spec:
template:
spec:
restartPolicy: Never
containers:
- name: busybox
image: busybox:1.36.1
command:
- /bin/sh
- -ec
- sleep 5
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: simple-app
annotations:
kapp.k14s.io/change-rule: upsert after upserting job-group
kapp.k14s.io/versioned-explicit-ref: |
apiVersion: batch/v1
kind: Job
name: foo-job
spec:
selector:
matchLabels:
simple-app: ""
template:
metadata:
labels:
simple-app: ""
spec:
containers:
- name: simple-app
image: busybox:1.36.1
command:
- /bin/sh
- -ec
- while :; do echo '.'; sleep 5 ; done
```
**What happened:**
The Job was updated, but the Deployment was not.
**What did you expect:**
The Deployment should have been updated after the Job, because of the change-rule and the versioned-explicit-ref.
**Anything else you would like to add:**
From looking at the kapp docs, it seems like the Deployment's versioned-explicit-ref annotation is supposed to contain the versioned name when it's written to Kubernetes. But it doesn't - the Kubernetes dashboard shows the annotation still has the unversioned name.
**Environment:**
- kapp version (use `kapp --version`): 0.63.1
- OS (e.g. from `/etc/os-release`): Windows 10
- Kubernetes version (use `kubectl version`): 1.30.0
---
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.
Contributor guide
Assessment
This issue has not been assessed yet.