Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-56757

podAffinity is ignored in YAML definition

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Duplicate
    • Icon: Minor Minor
    • kubernetes-plugin
    • None

      I'm trying to define my pod template as

      spec:
        affinity:
          podAffinity:
            preferredDuringSchedulingIgnoredDuringExecution:
            - labelSelector:
                matchLabels:
                  jenkins: slave
      

      But the podAffinity is ignored. I noticed the source in PodTemplateUtils.java#L252 only merges nodeSelector

       

            csanchez Carlos Sanchez
            bkmeneguello Bruno Meneguello
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: