Skip to content

Commit

Permalink
Add resource and fix matchLabel
Browse files Browse the repository at this point in the history
- Add mem and CPU limit/req
- matchLabel are immutable
  • Loading branch information
fridim committed Jun 13, 2023
1 parent f1b6707 commit 284aeeb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
3 changes: 2 additions & 1 deletion deploy/helm-api/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ spec:
selector:
matchLabels:
app.kubernetes.io/name: {{ .Values.appName }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
strategy:
type: {{ .Values.deployment.strategy }}
template:
Expand All @@ -24,6 +23,8 @@ spec:
- name: sandbox-api
image: {{ .Values.deployment.image }}:{{ .Values.image_tag | default .Values.deployment.tag }}
imagePullPolicy: {{ .Values.deployment.pullPolicy }}
resources:
{{- toYaml .Values.resources | nindent 10 }}
livenessProbe:
initialDelaySeconds: 10
tcpSocket:
Expand Down
8 changes: 8 additions & 0 deletions deploy/helm-api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,11 @@ service:

dynamodb_table: accounts-dev
dynamodb_region: us-east-1

resources:
limits:
cpu: 1
memory: 1Gi
requests:
cpu: 50m
memory: 128Mi
5 changes: 5 additions & 0 deletions readme.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ sandbox_api_secrets:
helm install -f secrets.yaml sandbox-api deploy/helm-api/
----

.Upgrade chart
----
helm upgrade -f secrets.yaml sandbox-api deploy/helm-api/
----

To initialize or update the postgresql schema, use the following:

.Run the DB migration
Expand Down

0 comments on commit 284aeeb

Please sign in to comment.