Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify requested k8s resources for CPU & Memory #3002

Merged
merged 3 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,14 @@ spec:
- name: CERT_PROXY_NAMESPACE
value: {{ .Release.Namespace }}
image: {{ include "cert-proxy-server.containerImage" . }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
imagePullPolicy: Always
name: combine-cert-proxy
resources: {}
resources:
requests:
cpu: 2m
memory: 100M
limits:
memory: 150M
restartPolicy: Always
{{- if ne .Values.global.pullSecretName "None" }}
imagePullSecrets:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,15 @@ spec:
key: SERVER_NAME
name: {{ .Values.envNginxProxy }}
image: nginx:1.21
imagePullPolicy: IfNotPresent
imagePullPolicy: Always
ports:
- containerPort: 80
resources: {}
resources:
requests:
cpu: 1m
memory: 10M
limits:
memory: 50M
volumeMounts:
- name: nginx-html
mountPath: /usr/share/nginx/html
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,14 @@ spec:
name: env-backend-secrets
ports:
- containerPort: 5000
resources: {}
resources:
requests:
cpu: 5m
memory: 960Mi
{{- if .Values.global.includeResourceLimits }}
limits:
memory: 4Gi
{{- end }}
volumeMounts:
- mountPath: /home/app/.CombineFiles
name: backend-data
Expand Down
2 changes: 2 additions & 0 deletions deploy/helm/thecombine/charts/backend/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ global:
combineJwtSecretKey: "Override"
combineSmtpUsername: "Override"
combineSmtpPassword: "Override"
# Values for pulling container image from image registry
imagePullPolicy: "Override"
imageTag: "latest"
# Define the image registry to use (may be blank for local images)
imageRegistry: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,14 @@ spec:
name: database
ports:
- containerPort: 27017
resources: {}
resources:
requests:
cpu: 25m
memory: 950Mi
{{- if .Values.global.includeResourceLimits }}
limits:
memory: 2Gi
{{- end }}
volumeMounts:
- mountPath: /data/db
name: database-data
Expand Down
2 changes: 2 additions & 0 deletions deploy/helm/thecombine/charts/database/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ global:
# Update strategy should be "Recreate" or "Rolling Update"
updateStrategy: Recreate
pullSecretName: "None"
# Values for pulling container image from image registry
imagePullPolicy: "Override"
imageTag: "latest"
# Define the image registry to use (may be blank for local images)
imageRegistry: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,14 @@ spec:
ports:
- containerPort: 80
- containerPort: 443
resources: {}
resources:
requests:
cpu: 1m
memory: 15M
{{- if .Values.global.includeResourceLimits }}
limits:
memory: 40M
{{- end }}
volumeMounts:
- mountPath: /usr/share/nginx/fonts
name: font-data
Expand Down
2 changes: 2 additions & 0 deletions deploy/helm/thecombine/charts/frontend/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ global:
pullSecretName: aws-login-credentials
# Update strategy should be "Recreate" or "Rolling Update"
updateStrategy: Recreate
# Values for pulling container image from image registry
imagePullPolicy: "Override"
imageTag: "latest"
# Define the image registry to use (may be blank for local images)
imageRegistry: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ spec:
- deployment/maintenance
- --
- combine-backup-job.sh
resources: {}
resources:
requests:
cpu: 200m
memory: 150M
limits:
memory: 150M
securityContext:
capabilities: {}
terminationMessagePath: /dev/termination-log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,14 @@ spec:
configMapKeyRef:
key: local_font_url
name: env-maintenance
resources: {}
resources:
requests:
cpu: 200m
memory: 1200Mi
{{- if .Values.global.includeResourceLimits }}
limits:
memory: 4Gi
{{- end }}
volumeMounts:
- mountPath: {{ .Values.fontsDir }}
name: font-data
Expand Down
2 changes: 2 additions & 0 deletions deploy/helm/thecombine/charts/maintenance/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ global:
awsSecretAccessKey: "Override"
pullSecretName: "None"
awsS3Access: aws-s3-credentials
# Values for pulling container image from image registry
imagePullPolicy: "Override"
imageTag: "latest"
# Define the image registry to use (may be blank for local images)
imageRegistry: ""
Expand Down
2 changes: 2 additions & 0 deletions deploy/helm/thecombine/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ global:
# Update strategy should be "Recreate" or "Rolling Update"
updateStrategy: Recreate

includeResourceLimits: false

aws-login:
enabled: true

Expand Down
1 change: 1 addition & 0 deletions deploy/scripts/setup_files/profiles/dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ charts:
global:
imageRegistry: ""
imagePullPolicy: Never
includeResourceLimits: false
awsS3Location: dev.thecombine.app

ingressClass: nginx
Expand Down
1 change: 1 addition & 0 deletions deploy/scripts/setup_files/profiles/prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ charts:
fontStorageAccessMode: ReadWriteMany
imagePullPolicy: Always
pullSecretName: None
includeResourceLimits: true
certManager:
enabled: false
cert-proxy-server:
Expand Down
1 change: 1 addition & 0 deletions deploy/scripts/setup_files/profiles/staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ charts:
awsS3Location: prod.thecombine.app
fontStorageAccessMode: ReadWriteMany
imagePullPolicy: Always
includeResourceLimits: true
tlsSecretName: thecombine-app-tls
certManager:
enabled: false
Loading