diff --git a/Chart.yaml b/Chart.yaml index 04596fe..8a0bdda 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: pgdog-control description: PgDog Control type: application -version: 0.2.16 +version: 0.2.17 appVersion: "84c7c56a" diff --git a/templates/deployment.yaml b/templates/deployment.yaml index 7719694..69c97d1 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -55,6 +55,14 @@ spec: matchLabels: {{- include "pgdog-control.selectorLabels" . | nindent 12 }} {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} {{- if .Values.control.rbac.create }} serviceAccountName: {{ include "pgdog-control.control.serviceAccountName" . }} automountServiceAccountToken: true diff --git a/templates/redis-deployment.yaml b/templates/redis-deployment.yaml index c6a0a75..4abfc61 100644 --- a/templates/redis-deployment.yaml +++ b/templates/redis-deployment.yaml @@ -18,6 +18,14 @@ spec: cluster-autoscaler.kubernetes.io/safe-to-evict: "false" spec: automountServiceAccountToken: false + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} {{- with .Values.redis.image.pullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} diff --git a/test/values-full.yaml b/test/values-full.yaml index 3e3d233..5a713e1 100644 --- a/test/values-full.yaml +++ b/test/values-full.yaml @@ -78,3 +78,12 @@ control: redis: url: redis://redis.example.com:6379 save_interval_secs: 30 + +nodeSelector: + node-type: database + +tolerations: + - key: dedicated + operator: Equal + value: database + effect: NoSchedule diff --git a/values.yaml b/values.yaml index 61a5765..ebc3645 100644 --- a/values.yaml +++ b/values.yaml @@ -5,6 +5,12 @@ image: pullPolicy: IfNotPresent pullSecrets: [] +# nodeSelector allows scheduling pods on nodes with specific labels +nodeSelector: {} + +# tolerations allows pods to be scheduled on nodes with matching taints +tolerations: [] + control: port: 8080 aws: