Skip to content

Commit c28b28d

Browse files
Added possibility to add env variables to ado agent cleaner chart
1 parent 6ba9ad5 commit c28b28d

3 files changed

Lines changed: 19 additions & 2 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: v2
22
description: Helper to clean up stale AKS Azure DevOps agents
33
name: charts-ado-agent-cleaner
4-
version: 1.0.1
4+
version: 1.1.0
55
appVersion: "1.0"

charts/ado-agent-cleaner/templates/cronjob.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,8 @@ spec:
2828
env:
2929
- name: AZP_URL
3030
value: "{{ .Values.devopsOrgUrl }}"
31+
{{- with .Values.extraEnv }}
32+
{{- toYaml . | nindent 14 }}
33+
{{- end }}
3134
resources:
3235
{{ toYaml .Values.resources | nindent 14 }}

charts/ado-agent-cleaner/values.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@ podName: agent-cleaner
77
# Container Image Name for the Agent Cleaner
88
imageName: aksagentcleaner:1.0.0
99

10+
# Additional environment variables to add to the Agent Cleaner container.
11+
# By default nothing is added. Provide a list of standard Kubernetes env entries, e.g.:
12+
# extraEnv:
13+
# - name: MY_VAR
14+
# value: "my-value"
15+
# - name: MY_SECRET
16+
# valueFrom:
17+
# secretKeyRef:
18+
# name: my-secret
19+
# key: my-key
20+
extraEnv: []
21+
1022
# Settings specific for the CronJob
1123
cronSettings:
1224
schedule: "*/30 * * * *"
@@ -23,4 +35,6 @@ resources:
2335
memory: 128Mi
2436
requests:
2537
cpu: 50m
26-
memory: 64Mi
38+
memory: 64Mi
39+
40+

0 commit comments

Comments
 (0)