1. NodeAffinity:

ARTIFACTORY: How to use NodeAffinity and PodAntiAffinity when deploying Artifactory using Helm Charts

AuthorFullName__c
Ashraf Kherbawy
articleNumber
000005444
ft:sourceType
Salesforce
FirstPublishedDate
2022-10-25T12:53:31Z
lastModifiedDate
2023-01-22T11:06:57Z
VersionNumber
2
Let’s say I have 2 nodes in my cluster, and one of them has a label of disktype=ssd, and I want my Artifactory pods to be assigned under that node. By default, our Artifactory chart uses PodAntiAffinity to separate the pods into different nodes. To assign my artifactory pods to all be in the node that contains the label disktype=ssd, we will want to use the affinity property, which is under artifactory in your values.yaml:
artifactory:
  affinity: {}
To configure it so the pods are assigned under the node which has label of disktype=ssd:
artifactory:
  affinity:
    nodeAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
        nodeSelectorTerms:
        - matchExpressions:
          - key: disktype
            operator: In
            values:
             - ssd

Deployment command (Repeat for the rest of the steps):
Helm upgrade —-install artifactory -n artifactory jfrog/artifactory -f values.yaml