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

Artifactory StatefulSet podAntiAffinity incorrectly matches nginx pods #1590

Open
jlyheden opened this issue Mar 4, 2022 · 1 comment
Open
Labels
bug Something isn't working triaged

Comments

@jlyheden
Copy link

jlyheden commented Mar 4, 2022

Is this a request for help?:

No


Is this a BUG REPORT or FEATURE REQUEST? (choose one):

BUG REPORT

Version of Helm and Kubernetes:

Helm 3.7.1
Kubernetes EKS 1.20.11

Which chart:

jfrog-platform (having artifactory and xray enabled, everything else disabled)

What happened:

When setting the artifactory.artifactory.podAntiAffinity parameter, the chart uses a label selector that also matches the nginx pods, preventing Artifactory pods to schedule on the same nodes as the nginx pods. On our three node / three availability zone setup it meant that some Artifactory replicas could not schedule at all.

What you expected to happen:

Artifactory pods are spread across AWS availability zones (our defined topologyKey) and scheduled successfully. Pods from Artifactory StatefulSet can coexist on the same nodes as the nginx pods.

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

  1. Create a 2 node cluster with enough capacity to run the jfrog platform stack
  2. Deploy jfrog-platform chart with these values
artifactory:
  artifactory:
    podAntiAffinity:
      topologyKey: "kubernetes.io/hostname"  # we use "topology.kubernetes.io/zone" but hostname can be used without aws
      type: "hard"
    replicaCount: 2
  nginx:
    replicaCount: 2
  1. Some of the pods fail to schedule

Anything else we need to know:

The Artifactory chart allows overriding the whole affinity block which makes it possible to circumvent the issue, by adding the component label in the label selector

artifactory:
  artifactory:
    affinity:
      podAntiAffinity:
        requiredDuringSchedulingIgnoredDuringExecution:
        - labelSelector:
            matchLabels:
              app: artifactory
              release: jfrog-platform
              component: artifactory
          topologyKey: topology.kubernetes.io/zone

But the issue is that this will stop working if Jfrog decides to rename the pod labels. It would be preferred if the chart could be fixed instead.

@chukka chukka added bug Something isn't working triaged labels May 24, 2022
@ghadjigeorghiou
Copy link

ghadjigeorghiou commented Jun 4, 2024

We are facing the same issue. Are there any updates or an ETA on when it will be fixed? We are using the 10.18.0 version of the charts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triaged
Projects
None yet
Development

No branches or pull requests

3 participants