Skip to content

versioned-explicit-ref does not work for all resource types #984

@rdicroce

Description

@rdicroce

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue describes a defect or unexpected behaviorcarvel acceptedThis issue should be considered for future work and that the triage process has been completedpriority/important-soonMust be staffed and worked on currently or soon.

    Type

    No type

    Projects

    Status

    To Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions