Skip to content

Commit 15ed15a

Browse files
make configReloader resources configurable (#78)
* make configReloader resources configurable * helm-docs: automated action --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 84cc5e7 commit 15ed15a

File tree

4 files changed

+27
-10
lines changed

4 files changed

+27
-10
lines changed

charts/appset-secret-plugin/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: A Helm chart for adding a K8s Secret Plugin Generator to Argo CD Ap
66
# to be deployed.
77
type: application
88

9-
version: 1.2.0
9+
version: 1.3.0
1010

1111
# renovate: image=jessebot/argocd-appset-secret-plugin
1212
appVersion: "v0.9.0"

charts/appset-secret-plugin/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# appset-secret-plugin
22

3-
![Version: 1.2.0](https://img.shields.io/badge/Version-1.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.9.0](https://img.shields.io/badge/AppVersion-v0.9.0-informational?style=flat-square)
3+
![Version: 1.3.0](https://img.shields.io/badge/Version-1.3.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.9.0](https://img.shields.io/badge/AppVersion-v0.9.0-informational?style=flat-square)
44

55
A Helm chart for adding a K8s Secret Plugin Generator to Argo CD ApplicationSets
66

@@ -26,6 +26,10 @@ A Helm chart for adding a K8s Secret Plugin Generator to Argo CD ApplicationSets
2626
| configReloader.interval | int | `10` | interval to wait before retrying a check for changes (in seconds) |
2727
| configReloader.label | string | `"argocd-appset-secret-plugin"` | the label to check for on the Secret (secretVars.existingSecret) |
2828
| configReloader.labelValue | string | `"1"` | the label value to check for on the Secret (secretVars.existingSecret) |
29+
| configReloader.resources.limits.cpu | string | `"100m"` | cpu limit for the configreloader |
30+
| configReloader.resources.limits.memory | string | `"200Mi"` | memory limit for the configreloader |
31+
| configReloader.resources.requests.cpu | string | `"50m"` | requested cpu on configReloader startup |
32+
| configReloader.resources.requests.memory | string | `"100Mi"` | requested memory on configReloader startup |
2933
| fullnameOverride | string | `""` | |
3034
| image.pullPolicy | string | `"IfNotPresent"` | image pullPolicy for the main container |
3135
| image.repository | string | `"jessebot/argocd-appset-secret-plugin"` | image repo to use for the docker container |
@@ -39,7 +43,7 @@ A Helm chart for adding a K8s Secret Plugin Generator to Argo CD ApplicationSets
3943
| rbac.create | bool | `true` | create rbac clusterole and clusterolebinding |
4044
| rbac.useExistingClusterRole | string | `""` | use existing clusterole, but still create clusterrolebinding |
4145
| replicaCount | int | `1` | number of replica pods to create |
42-
| resources | object | `{}` | |
46+
| resources | object | `{}` | resources for the appset secret plugin container |
4347
| secretVars.existingSecret | string | `""` | name of an existing secret to use for the secret keys to provide to applicationSets via the plugin generator |
4448
| secretVars.secretKey | string | `"secret_vars.yaml"` | |
4549
| securityContext | object | `{}` | securityContext for the container: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ |

charts/appset-secret-plugin/templates/deployment.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,10 @@ spec:
5252
- name: RESOURCE_NAME
5353
value: "{{ include "argocd-appset-secret-plugin.varSecret" . }}"
5454

55+
{{- with .Values.configReloader.resources }}
5556
resources:
56-
limits:
57-
cpu: 100m
58-
memory: 100Mi
59-
requests:
60-
cpu: 50m
61-
memory: 50Mi
57+
{{- toYaml . | nindent 12 }}
58+
{{- end }}
6259

6360
securityContext:
6461
allowPrivilegeEscalation: false
@@ -99,8 +96,10 @@ spec:
9996
- name: SECRET_VARS_FILE
10097
value: "{{ .Values.configReloader.folder }}/{{ .Values.secretVars.secretKey }}"
10198

99+
{{- with .Values.resources }}
102100
resources:
103-
{{- toYaml .Values.resources | nindent 12 }}
101+
{{- toYaml . | nindent 12 }}
102+
{{- end }}
104103

105104
volumes:
106105
- name: token

charts/appset-secret-plugin/values.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,19 @@ configReloader:
5555
# -- full path on container to put secret file
5656
folder: "/var/run/secret-plugin"
5757

58+
# resourcs for the configReloader container
59+
resources:
60+
requests:
61+
# -- requested cpu on configReloader startup
62+
cpu: 50m
63+
# -- requested memory on configReloader startup
64+
memory: 100Mi
65+
limits:
66+
# -- cpu limit for the configreloader
67+
cpu: 100m
68+
# -- memory limit for the configreloader
69+
memory: 200Mi
70+
5871
serviceAccount:
5972
# -- Specifies whether a service account should be created
6073
create: true
@@ -88,6 +101,7 @@ service:
88101
# -- service target port on the container
89102
targetPort: 4355
90103

104+
# -- resources for the appset secret plugin container
91105
resources: {}
92106
# We usually recommend not to specify default resources and to leave this as a conscious
93107
# choice for the user. This also increases chances charts run on environments with little

0 commit comments

Comments
 (0)