podAffinity is ignored in YAML definition

XMLWordPrintable

    • Type: New Feature
    • Resolution: Duplicate
    • Priority: Minor
    • Component/s: 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

       

            Assignee:
            Carlos Sanchez
            Reporter:
            Bruno Meneguello
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: