Skip to content

Commit

Permalink
set resource limit+request and break out various things (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
james-otten authored Oct 26, 2024
1 parent 56353f1 commit d077080
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 35 deletions.
12 changes: 6 additions & 6 deletions infra/los/templates/backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,20 @@ spec:
containerPort: {{ .Values.los_backend.port }}
protocol: TCP
livenessProbe:
{{- toYaml .Values.livenessProbe | nindent 12 }}
{{- toYaml .Values.los_backend.livenessProbe | nindent 12 }}
readinessProbe:
{{- toYaml .Values.readinessProbe | nindent 12 }}
{{- toYaml .Values.los_backend.readinessProbe | nindent 12 }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
{{- toYaml .Values.los_backend.resources | nindent 12 }}
{{- with .Values.los_backend.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
{{- with .Values.los_backend.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
{{- with .Values.los_backend.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
12 changes: 6 additions & 6 deletions infra/los/templates/frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,20 @@ spec:
containerPort: {{ .Values.los.port }}
protocol: TCP
livenessProbe:
{{- toYaml .Values.livenessProbe | nindent 12 }}
{{- toYaml .Values.los.livenessProbe | nindent 12 }}
readinessProbe:
{{- toYaml .Values.readinessProbe | nindent 12 }}
{{- toYaml .Values.los.readinessProbe | nindent 12 }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
{{- toYaml .Values.los.resources | nindent 12 }}
{{- with .Values.los.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
{{- with .Values.los.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
{{- with .Values.los.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
8 changes: 4 additions & 4 deletions infra/los/templates/los_database.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,20 @@ spec:
containerPort: {{ .Values.los_database.port }}
protocol: TCP
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- toYaml .Values.los_database.resources | nindent 12 }}
volumes:
- name: pg-data-vol
persistentVolumeClaim:
claimName: {{ .Values.los_database.pvc_name }}
{{- with .Values.nodeSelector }}
{{- with .Values.los_database.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
{{- with .Values.los_database.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
{{- with .Values.los_database.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
65 changes: 46 additions & 19 deletions infra/los/values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
replicaCount: 1

los_namespace: "los"

los:
Expand All @@ -8,13 +6,49 @@ los:
tag: helm
pullPolicy: Always
port: 3000
resources:
limits:
cpu: 512m
memory: 512Mi
requests:
cpu: 64m
memory: 128Mi
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
nodeSelector: {}
affinity: {}
tolerations: []

los_backend:
image:
repository: andrewdickinson/meshdb-los-tool
tag: latest
pullPolicy: Always
port: 3000
resources:
limits:
cpu: 512m
memory: 512Mi
requests:
cpu: 64m
memory: 128Mi
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
nodeSelector: {}
affinity: {}
tolerations: []

los_database:
image:
Expand All @@ -25,26 +59,19 @@ los_database:
db_name: los
pvc_name: "los-postgis-pvc"
pvc_size: "3Gi"
resources:
limits:
cpu: 512m
memory: 512Mi
requests:
cpu: 64m
memory: 256Mi
nodeSelector: {}
affinity: {}
tolerations: []

nameOverride: ""
fullnameOverride: ""

podAnnotations: {}
podLabels: {}

resources: {}

livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http

nodeSelector: {}

tolerations: []

affinity: {}

0 comments on commit d077080

Please sign in to comment.