diff --git a/infrastructure/charts/agent/templates/deployment.yaml b/infrastructure/charts/agent/templates/deployment.yaml index 2860639eee..86878a98f4 100644 --- a/infrastructure/charts/agent/templates/deployment.yaml +++ b/infrastructure/charts/agent/templates/deployment.yaml @@ -221,3 +221,6 @@ spec: - key: "init.sh" path: "init.sh" {{- end }} + affinity: + {{- toYaml .Values.affinity | nindent 8 }} + tolerations: {{- toYaml .Values.tolerations | nindent 8 }} diff --git a/infrastructure/charts/agent/templates/postgresql.yaml b/infrastructure/charts/agent/templates/postgresql.yaml index 15b2a77e8b..b28f5a4e35 100644 --- a/infrastructure/charts/agent/templates/postgresql.yaml +++ b/infrastructure/charts/agent/templates/postgresql.yaml @@ -10,6 +10,12 @@ spec: volume: size: "{{ .Values.database.postgres.databaseSize }}" numberOfInstances: {{ .Values.database.postgres.numberOfInstances }} + nodeAffinity: + {{- toYaml .Values.affinity.nodeAffinity | nindent 4 }} + tolerations: + {{- toYaml .Values.tolerations | nindent 4 }} + resources: + {{- toYaml .Values.database.postgres.resources | nindent 4 }} users: pollux-admin: - superuser diff --git a/infrastructure/charts/agent/values.yaml b/infrastructure/charts/agent/values.yaml index b8d462c347..fce12d2ca9 100644 --- a/infrastructure/charts/agent/values.yaml +++ b/infrastructure/charts/agent/values.yaml @@ -52,6 +52,13 @@ database: managingTeam: atala databaseSize: 4Gi numberOfInstances: 2 + resources: + requests: + cpu: 10m + memory: 100Mi + limits: + cpu: 500m + memory: 500Mi vdrManager: host: chart-base-node-service @@ -134,3 +141,20 @@ keycloak: - name: prism-agent-realm-import-volume mountPath: /opt/bitnami/keycloak/data/import readOnly: true + +# It is configured for deployment and postgresql objects of prism-agent +affinity: + nodeAffinity: {} +# requiredDuringSchedulingIgnoredDuringExecution: +# nodeSelectorTerms: +# - matchExpressions: +# - key: "performance" +# operator: In +# values: +# - "true" + +tolerations: {} +# - key: "type" +# operator: "Equal" +# value: "performance" +# effect: "NoSchedule"