Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annotations dropped from jobset spec #729

Open
mattcary opened this issue Dec 10, 2024 · 5 comments
Open

Annotations dropped from jobset spec #729

mattcary opened this issue Dec 10, 2024 · 5 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@mattcary
Copy link

Annotations for pods seem to be dropped. This is a regression from ~v0.5 as far as I can tell.

What happened:
Applied the following yaml:

apiVersion: jobset.x-k8s.io/v1alpha2
kind: JobSet
metadata:
  name: test-annotations
  annotations:
    alpha.jobset.sigs.k8s.io/exclusive-topology: cloud.google.com/gke-nodepool
    jobset-level-annotation: "true"
spec:
  failurePolicy:
    maxRestarts: 0
  replicatedJobs:
  - name: main
    replicas: 1
    template:
      spec:
        parallelism: 1 # Should be smaller than the number of VMs
        completions: 1 # Same as the above.
        backoffLimit: 0   # When any pod fails, the job is failed
        template:
          metadata:
            annotations:
              template-level-annotation: "true"
          spec:
            containers:
            - name: benchmark
              image: busybox
              command: [ "sleep" ]
              args: [ "infinity" ]

The resulting pod annotations look like

Annotations:      alpha.jobset.sigs.k8s.io/exclusive-topology: cloud.google.com/gke-nodepool
                  batch.kubernetes.io/job-completion-index: 0
                  jobset.sigs.k8s.io/global-replicas: 1
                  jobset.sigs.k8s.io/job-global-index: 0
                  jobset.sigs.k8s.io/job-index: 0
                  jobset.sigs.k8s.io/job-key: 1cb0206240de13510151d6a13a8d1ea3747acf47
                  jobset.sigs.k8s.io/jobset-name: test-annotations
                  jobset.sigs.k8s.io/replicatedjob-name: main
                  jobset.sigs.k8s.io/replicatedjob-replicas: 1
                  jobset.sigs.k8s.io/restart-attempt: 0

What you expected to happen:

Expected jobset-level-annotation: "true" or template-level-annotation: "true" to appear on the pod.

How to reproduce it (as minimally and precisely as possible):

kubectl apply --server-side -f https://github.com/kubernetes-sigs/jobset/releases/download/v0.7.1/manifests.yaml, kubectl apply the yaml above, then kubectl describe pod to see the annotations.

Environment:

  • Kubernetes version (use kubectl version):

Client Version: v1.31.2
Kustomize Version: v5.4.2
Server Version: v1.31.2-gke.1518000

- JobSet version (use `git describe --tags --dirty --always`): v0.7.1 (see installation used above)
- Cloud provider or hardware configuration: GKE
@mattcary mattcary added the kind/bug Categorizes issue or PR as related to a bug. label Dec 10, 2024
This was referenced Dec 10, 2024
@ahg-g
Copy link
Contributor

ahg-g commented Dec 10, 2024

@tenzen-y problematic PR is: #696 ; are you able to submit a fix?

The other issue is that v0.7.1 was incorrectly released, it included the above PR when it should not, I created a new v0.7.2 release to fix the patched v0.7 release.

@ahg-g
Copy link
Contributor

ahg-g commented Dec 12, 2024

/assign @imreddy13

@k8s-ci-robot
Copy link
Contributor

@ahg-g: GitHub didn't allow me to assign the following users: imreddy13.

Note that only kubernetes-sigs members with read permissions, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign @imreddy13

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@imreddy13
Copy link

/assign @imreddy13

@tenzen-y
Copy link
Member

/assign @imreddy13

Thank you for taking this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

5 participants