Skip to content

Commit

Permalink
[stable/insights-agent] set ttl for install reporter (#1374)
Browse files Browse the repository at this point in the history
* set ttl for install reporter

* bump version

* update docs
  • Loading branch information
rbren authored Dec 5, 2023
1 parent 7fa23cc commit 8eada67
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions stable/insights-agent/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 2.26.0
* Add TTL option for install-reporter to better support Argo deployment

## 2.25.3
* Cloud costs - added nested ifs to workaround a bug on some helm versions

Expand Down
2 changes: 1 addition & 1 deletion stable/insights-agent/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
description: A Helm chart to run the Fairwinds Insights agent
name: insights-agent
version: 2.25.3
version: 2.26.0
appVersion: 9.2.1
kubeVersion: ">= 1.22.0-0"
icon: https://raw.githubusercontent.com/FairwindsOps/charts/master/stable/insights-agent/icon.png
Expand Down
1 change: 1 addition & 0 deletions stable/insights-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ Parameter | Description | Default
`uploader.resources` | CPU/memory requests and limits for the uploader script |
`uploader.sendFailures` | Send logs of failure to Insights when a job fails. | true
`uploader.env` | Set extra environment variables for the uploader script | []
`installReporter.ttl` | Set to -1 to prevent install reporter job from cleaning up after itself | 300
`cronjobs.disableServiceMesh` | Adds annotations to all CronJobs to not inject Linkerd or Istio | true
`cronjobs.backoffLimit` | Backoff limit to use for each report CronJob | 1
`cronjobs.imagePullSecret` | A pull secret for cronjob images
Expand Down
6 changes: 6 additions & 0 deletions stable/insights-agent/templates/install-reporter/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,17 @@ metadata:
polaris.fairwinds.com/memoryLimitsMissing-exempt: "true"
polaris.fairwinds.com/cpuLimitsMissing-exempt: "true"
"helm.sh/hook-delete-policy": hook-succeeded,before-hook-creation
{{- $values := .Values | deepCopy }}
{{- $_ := unset $values "insights" }}
{{- $out := dict "values" $values "version" .Chart.Version }}
insights.fairwinds.com/values-hash: "{{- toPrettyJson $out | sha256sum }}"
{{- with .Values.installReporter.additionalAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if gt (int .Values.installReporter.ttl) 0 }}
ttlSecondsAfterFinished: 300
{{- end }}
backoffLimit: {{ .Values.cronjobs.backoffLimit }}
template:
{{- with .Values.global.customWorkloadAnnotations }}
Expand Down
1 change: 1 addition & 0 deletions stable/insights-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ cronjobExecutor:
memory: 128Mi

installReporter:
ttl: 300
image:
repository: quay.io/fairwinds/insights-uploader
tag: "0.4"
Expand Down

0 comments on commit 8eada67

Please sign in to comment.