-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[stable/fairwinds-insights] - add Slack channels local refresher cron…
…job (#1334) * add slackChannelsLocalRefresherCronjob * add docs * bump version * adding new line at EOF * Update Chart.yaml
- Loading branch information
1 parent
7e4aac1
commit 4968626
Showing
5 changed files
with
66 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
stable/fairwinds-insights/templates/slack-channels-local-refresher.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters