Skip to content

Commit

Permalink
[stable/fairwinds-insights] Fix cronjobs (#1370)
Browse files Browse the repository at this point in the history
* Fix cronjobs

* Update Chart.yaml

* Update CHANGELOG.md

* Delete stable/fairwinds-insights/templates/trial-end-downgrade-cronjob.yaml

* Update values.yaml

* helm-docs

* change trial-end docs
  • Loading branch information
rbren authored Nov 14, 2023
1 parent 0310353 commit 4958fda
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 48 deletions.
3 changes: 3 additions & 0 deletions stable/fairwinds-insights/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 1.0.1
* Fix for multiple CronJobs

## 1.0.0
* Refactor logic for creating and modifying CronJobs

Expand Down
2 changes: 1 addition & 1 deletion stable/fairwinds-insights/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: "14.7"
description: A Helm chart to run the Fairwinds Insights server
name: fairwinds-insights
version: 1.0.0
version: 1.0.1
kubeVersion: ">= 1.22.0-0"
maintainers:
- name: rbren
Expand Down
1 change: 1 addition & 0 deletions stable/fairwinds-insights/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ See [insights.docs.fairwinds.com](https://insights.docs.fairwinds.com/technical-
| cronjobs.resources-recommendations | object | `{"command":"resources_recommendations","resources":{"limits":{"cpu":1,"memory":"3Gi"},"requests":{"cpu":1,"memory":"3Gi"}},"schedule":"0 2 * * *"}` | Options for the resources recommendations job |
| cronjobs.saml | object | `{"command":"refresh_saml_metadata","schedule":"0 * * * *"}` | Options for the SAML sync job |
| cronjobs.slack-channels | object | `{"command":"slack_channels_local_refresher","schedule":"0/15 * * * *"}` | Options for the slack channels job. |
| cronjobs.trial-end | object | `{"command":"trial_end_downgrade","schedule":""}` | Options for the trial-end job. |
| selfHostedSecret | string | `nil` | |
| additionalEnvironmentVariables | object | `{}` | Additional Environment Variables to set on the Fairwinds Insights pods. |
| rbac.serviceAccount.annotations | object | `{}` | Annotations to add to the service account |
Expand Down
6 changes: 3 additions & 3 deletions stable/fairwinds-insights/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ If release name contains chart name it will be used as a full name.
*/}}
{{- define "fairwinds-insights.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 27 | trimSuffix "-" -}}
{{- .Values.fullnameOverride | trunc 20 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 27 | trimSuffix "-" -}}
{{- .Release.Name | trunc 20 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s" .Release.Name | trunc 27 | trimSuffix "-" -}}
{{- printf "%s" .Release.Name | trunc 20 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
Expand Down
3 changes: 2 additions & 1 deletion stable/fairwinds-insights/templates/cronjobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: {{ include "fairwinds-insights.fullname" $ }}-cronjob-{{ $name }}
name: {{ include "fairwinds-insights.fullname" $ }}-cj-{{ $name }}
labels:
{{- include "fairwinds-insights.labels" $ | nindent 4 }}
app.kubernetes.io/component: cronjob-{{ $name }}
Expand Down Expand Up @@ -45,5 +45,6 @@ spec:
secretName: github-secrets
optional: true
{{- end }}
---
{{ end }}
{{ end }}

This file was deleted.

5 changes: 5 additions & 0 deletions stable/fairwinds-insights/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,11 @@ cronjobs:
command: slack_channels_local_refresher
schedule: "0/15 * * * *"

# -- Options for the trial-end job.
trial-end:
command: trial_end_downgrade
schedule: ""

selfHostedSecret:

# -- Additional Environment Variables to set on the Fairwinds Insights pods.
Expand Down

0 comments on commit 4958fda

Please sign in to comment.