Skip to content

Commit

Permalink
feat: add nodeAffinity, tolerations, and resources to k8s deployment (#…
Browse files Browse the repository at this point in the history
…804)

Signed-off-by: Milos Backonja <[email protected]>
  • Loading branch information
milosbackonja authored Dec 5, 2023
1 parent f1b4904 commit 22407a3
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
3 changes: 3 additions & 0 deletions infrastructure/charts/agent/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -221,3 +221,6 @@ spec:
- key: "init.sh"
path: "init.sh"
{{- end }}
affinity:
{{- toYaml .Values.affinity | nindent 8 }}
tolerations: {{- toYaml .Values.tolerations | nindent 8 }}
6 changes: 6 additions & 0 deletions infrastructure/charts/agent/templates/postgresql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 24 additions & 0 deletions infrastructure/charts/agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"

0 comments on commit 22407a3

Please sign in to comment.