diff --git a/stable/fairwinds-insights/CHANGELOG.md b/stable/fairwinds-insights/CHANGELOG.md index 77b8c27b1..529d793e6 100644 --- a/stable/fairwinds-insights/CHANGELOG.md +++ b/stable/fairwinds-insights/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 0.20.0 +* Add `slackChannelsLocalRefresherCronjob` to `stable/fairwinds-insights`. + ## 0.19.8 * Update application version to 14.1. [See the release notes for more details](https://insights.docs.fairwinds.com/release-notes) diff --git a/stable/fairwinds-insights/Chart.yaml b/stable/fairwinds-insights/Chart.yaml index 160dcc7d6..28b52368a 100644 --- a/stable/fairwinds-insights/Chart.yaml +++ b/stable/fairwinds-insights/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: "14.1" description: A Helm chart to run the Fairwinds Insights server name: fairwinds-insights -version: 0.19.8 +version: 0.20.0 kubeVersion: ">= 1.22.0-0" maintainers: - name: rbren diff --git a/stable/fairwinds-insights/README.md b/stable/fairwinds-insights/README.md index 3ea047dfa..69d9a510f 100644 --- a/stable/fairwinds-insights/README.md +++ b/stable/fairwinds-insights/README.md @@ -254,3 +254,7 @@ See [insights.docs.fairwinds.com](https://insights.docs.fairwinds.com/technical- | repoScanJob.resources.requests.memory | string | `"128Mi"` | | | repoScanJob.nodeSelector | object | `{}` | | | repoScanJob.tolerations | list | `[]` | | +| slackChannelsLocalRefresherCronjob.enabled | bool | `true` | | +| slackChannelsLocalRefresherCronjob.resources | object | `{"limits":{"cpu":"250m","memory":"512Mi"},"requests":{"cpu":"150m","memory":"256Mi"}}` | Resources for the slack channels local refresher cron-job. | +| slackChannelsLocalRefresherCronjob.schedules | list | `[{"cron":"0/15 * * * *","name":"default-schedule"}]` | CRON schedules for the slack channels local refresher cron-job. | +| slackChannelsLocalRefresherCronjob.securityContext.runAsUser | int | `10324` | | diff --git a/stable/fairwinds-insights/templates/slack-channels-local-refresher.yaml b/stable/fairwinds-insights/templates/slack-channels-local-refresher.yaml new file mode 100644 index 000000000..6d222f598 --- /dev/null +++ b/stable/fairwinds-insights/templates/slack-channels-local-refresher.yaml @@ -0,0 +1,41 @@ +{{- if and .Values.slackChannelsLocalRefresherCronjob .Values.slackChannelsLocalRefresherCronjob.enabled }} +{{ range .Values.slackChannelsLocalRefresherCronjob.schedules }} +--- +apiVersion: batch/v1 +kind: CronJob +metadata: + name: {{ include "fairwinds-insights.fullname" $ }}-cronjob-{{ .name }} + labels: + {{- include "fairwinds-insights.labels" $ | nindent 4 }} + app.kubernetes.io/component: slack-channels-local-refresher-{{ .name }} +spec: + schedule: "{{ .cron }}" + concurrencyPolicy: Forbid + jobTemplate: + spec: + template: + spec: + restartPolicy: OnFailure + {{- with $.Values.image.pullSecret }} + imagePullSecrets: + - name: {{ . }} + {{- end }} + containers: + - name: fairwinds-insights + image: "{{ $.Values.cronjobImage.repository }}:{{ include "fairwinds-insights.cronjobImageTag" $ }}" + command: ["slack_channels_local_refresher"] + {{- include "env" $ | indent 14 }} + imagePullPolicy: Always + resources: + {{- toYaml $.Values.slackChannelsLocalRefresherCronjob.resources | nindent 16 }} + securityContext: + readOnlyRootFilesystem: true + allowPrivilegeEscalation: false + privileged: false + runAsNonRoot: true + runAsUser: {{ $.Values.slackChannelsLocalRefresherCronjob.securityContext.runAsUser }} + capabilities: + drop: + - ALL +{{ end }} +{{- end }} \ No newline at end of file diff --git a/stable/fairwinds-insights/values.yaml b/stable/fairwinds-insights/values.yaml index dba579f5a..f372bb5e9 100644 --- a/stable/fairwinds-insights/values.yaml +++ b/stable/fairwinds-insights/values.yaml @@ -706,3 +706,20 @@ repoScanJob: memory: 128Mi nodeSelector: {} tolerations: [] + +slackChannelsLocalRefresherCronjob: + enabled: true + # -- Resources for the slack channels local refresher cron-job. + resources: + limits: + cpu: 250m + memory: 512Mi + requests: + cpu: 150m + memory: 256Mi + # -- CRON schedules for the slack channels local refresher cron-job. + schedules: + - name: default-schedule + cron: "0/15 * * * *" + securityContext: + runAsUser: 10324