Skip to content

Commit 63974ec

Browse files
committed
chore(charts): change resources format
1 parent a1aecb1 commit 63974ec

4 files changed

Lines changed: 16 additions & 20 deletions

File tree

charts/passport/templates/_helpers.tpl

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -79,21 +79,6 @@ env:
7979
{{- end }}
8080

8181

82-
{{/* Generate passport deployment limits */}}
83-
{{- define "passport.limits" -}}
84-
{{- if or (.Values.limitsCpu) (.Values.limitsMemory) }}
85-
resources:
86-
limits:
87-
{{- if (.Values.limitsCpu) }}
88-
cpu: {{.Values.limitsCpu}}
89-
{{- end }}
90-
{{- if (.Values.limitsMemory) }}
91-
memory: {{.Values.limitsMemory}}
92-
{{- end }}
93-
{{- end }}
94-
{{- end }}
95-
96-
9782
{{/* Generate passport deployment volumeMounts */}}
9883
{{- define "passport.volumeMounts" }}
9984
volumeMounts:

charts/passport/templates/passport-deployment.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ spec:
6262
ports:
6363
- containerPort: 8000
6464
name: http
65-
{{- include "passport.limits" . | indent 8 }}
65+
{{- with index .Values "resources" }}
66+
resources:
67+
{{- toYaml . | nindent 10 }}
68+
{{- end }}
6669
{{- include "passport.envs" . | indent 8 }}
6770
{{- include "passport.volumeMounts" . | indent 8 }}
6871
{{- include "passport.volumes" . | indent 6 }}

charts/passport/templates/passport-job-upgrade.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ spec:
3939
fi
4040
python /workspace/manage.py create_oauth2_application --path /etc/drycc/passport/init-applications.json
4141
{{- end }}
42-
{{- include "passport.limits" . | indent 8 }}
42+
{{- with index .Values "resources" }}
43+
resources:
44+
{{- toYaml . | nindent 10 }}
45+
{{- end }}
4346
{{- include "passport.envs" . | indent 8 }}
4447
{{- include "passport.volumeMounts" . | indent 8 }}
4548
{{- include "passport.volumes" . | indent 6 }}

charts/passport/values.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ diagnosticMode:
1818
args:
1919
- infinity
2020

21+
resources: {}
22+
# limits:
23+
# cpu: 200m
24+
# memory: 50Mi
25+
# requests:
26+
# cpu: 100m
27+
# memory: 30Mi
28+
2129
nodeAffinityPreset:
2230
key: "drycc.cc/node"
2331
type: "soft"
@@ -36,9 +44,6 @@ podAntiAffinityPreset:
3644

3745
# Set passport deployment replicas
3846
replicas: 1
39-
# limitsCpu: "100m"
40-
# limitsMemory: "50Mi"
41-
4247
## valkeyUrl is will no longer use the built-in valkey component
4348
valkeyUrl: ""
4449
## databaseUrl and databaseReplicaUrl are will no longer use the built-in database component

0 commit comments

Comments
 (0)