From 28c27e8100a9f9c57c49a86e275bf31431da5368 Mon Sep 17 00:00:00 2001 From: Dmitriy Ivolgin Date: Mon, 23 Dec 2024 16:42:20 -0800 Subject: [PATCH] Docs for Replicated SDK affinity spec (#2906) * Docs for Replicated SDK affinity spec * typo --------- Co-authored-by: Paige Calvert --- docs/vendor/replicated-sdk-customizing.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/docs/vendor/replicated-sdk-customizing.md b/docs/vendor/replicated-sdk-customizing.md index 3b6ab30c80..702e8b4b8e 100644 --- a/docs/vendor/replicated-sdk-customizing.md +++ b/docs/vendor/replicated-sdk-customizing.md @@ -173,7 +173,7 @@ To use a CA stored in a Secret: ## Add Tolerations -The Replicated SDK provides a `replicated.tolerations` value that allows users to add custom tolerations to the deployment. For more information about tolerations, see [Taints and Tolerations](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/). +The Replicated SDK provides a `replicated.tolerations` value that allows users to add custom tolerations to the deployment. For more information about tolerations, see [Taints and Tolerations](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) in the Kubernetes documentation. To add tolerations to the Replicated SDK deployment, include the `replicated.tolerations` array in your Helm chart `values.yaml` file. The `replicated.tolerations` array accepts a list of tolerations in the following format: @@ -187,3 +187,24 @@ replicated: value: "value" effect: "NoSchedule" ``` + +## Add Affinity + +The Replicated SDK provides a `replicated.affinity` value that allows users to add custom affinity to the deployment. For more information about affinity, see [Affinity and anti-affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) in the Kubernetes documentation. + +To add affinity to the Replicated SDK deployment, include the `replicated.affinity` map in your Helm chart `values.yaml` file. The `replicated.affinity` map accepts a standard Kubernets affinity object in the following format: + +```yaml +# Helm chart values.yaml + +replicated: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: production/node-pool + operator: In + values: + - private-node-pool +```