Skip to content

Commit ff64c9e

Browse files
SGmuwaMikhail Pavlovich Sidorenkoapplejag
authored
Add support resources in values.yaml (#164)
* Add support resources in values.yaml * resources: Fix spacing, add support yaml (kubectl) version * Apply suggestions from code review * Bump version in Chart.yaml * Use nindent * Downgrade aiohttp, v3.13.0 broke it --------- Co-authored-by: Mikhail Pavlovich Sidorenko <[email protected]> Co-authored-by: kalle (jag) <[email protected]> Co-authored-by: Kalle Fagerberg <[email protected]>
1 parent 3cb509e commit ff64c9e

File tree

5 files changed

+20
-3
lines changed

5 files changed

+20
-3
lines changed

charts/cluster-secret/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: cluster-secret
33
description: ClusterSecret Operator
44
kubeVersion: '>= 1.25.0-0'
55
type: application
6-
version: 0.6.0
6+
version: 0.7.0
77
icon: https://clustersecret.com/assets/csninjasmall.png
88
sources:
99
- https://github.com/zakkg3/ClusterSecret

charts/cluster-secret/templates/deployment.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ spec:
5151
path: /healthz
5252
port: 8080
5353
periodSeconds: 120
54-
resources: {}
54+
{{- with .Values.resources }}
55+
resources:
56+
{{- toYaml . | nindent 10 }}
57+
{{- end }}
5558
serviceAccountName: {{ include "cluster-secret.fullname" . }}-account
5659
{{- with .Values.nodeSelector }}
5760
nodeSelector:

charts/cluster-secret/values.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ affinity: {}
2424
# Additional Pod annotations
2525
podAnnotations: {}
2626

27+
resources:
28+
limits:
29+
memory: 134Mi
30+
requests:
31+
cpu: 40m
32+
memory: 134Mi
33+
2734
# Create dynamic manifests via values.
2835
#
2936
# For example:

src/requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
kopf===1.37.2
22
kubernetes===19.15.0
33
setuptools>=65.5.1 # not directly required, pinned by Snyk to avoid a vulnerability
4-
pydantic==2.3.0
4+
pydantic==2.3.0
5+
aiohttp==3.12.15

yaml/02_deployment.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ spec:
3030
value: "v0.0.14"
3131
- name: REPLACE_EXISTING
3232
value: "false"
33+
resources:
34+
limits:
35+
memory: 134Mi
36+
requests:
37+
cpu: 40m
38+
memory: 134Mi
3339
# imagePullPolicy: Always
3440
# Uncomment next lines for debug:
3541
# command:

0 commit comments

Comments
 (0)