Skip to content

Commit

Permalink
resources config for CronJobs (#374)
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Jogeleit <[email protected]>
  • Loading branch information
fjogeleit authored Nov 30, 2023
1 parent a039531 commit a747418
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 11 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Changelog

# Next
# 2.21.3
* Policy Reporter v2.17.4
* Fix Result Resource mapping
* Policy Reporter v2.17.3
* Fix handling if metric cache fallback
* Helm Chart
* Configure `resources` for email report CronJobs via `emailReports.resources`

# 2.21.2
* Policy Reporter v2.17.2
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GO ?= go
BUILD ?= build
REPO ?= ghcr.io/kyverno/policy-reporter
IMAGE_TAG ?= 2.17.2
IMAGE_TAG ?= 2.17.4
LD_FLAGS=-s -w -linkmode external -extldflags "-static"
PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x

Expand Down
4 changes: 2 additions & 2 deletions charts/policy-reporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ description: |
It creates Prometheus Metrics and can send rule validation events to different targets like Loki, Elasticsearch, Slack or Discord
type: application
version: 2.21.2
appVersion: 2.17.2
version: 2.21.3
appVersion: 2.17.4

icon: https://github.com/kyverno/kyverno/raw/main/img/logo.png
home: https://kyverno.github.io/policy-reporter
Expand Down
2 changes: 1 addition & 1 deletion charts/policy-reporter/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Policy Reporter

![Version: v2.21.2](https://img.shields.io/badge/Version-v2.21.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v2.17.2](https://img.shields.io/badge/AppVersion-v2.17.2-informational?style=flat-square)
![Version: v2.21.3](https://img.shields.io/badge/Version-v2.21.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v2.17.4](https://img.shields.io/badge/AppVersion-v2.17.4-informational?style=flat-square)

## Motivation

Expand Down
2 changes: 2 additions & 0 deletions charts/policy-reporter/templates/cronjob-summary-report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ spec:
key: encryption
optional: true
{{- end }}
resources:
{{- toYaml .Values.emailReports.resources | nindent 16 }}
volumes:
- name: config-file
secret:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ spec:
key: encryption
optional: true
{{- end }}
resources:
{{- toYaml .Values.emailReports.resources | nindent 16 }}
volumes:
- name: config-file
secret:
Expand Down
9 changes: 8 additions & 1 deletion charts/policy-reporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ image:
registry: ghcr.io
repository: kyverno/policy-reporter
pullPolicy: IfNotPresent
tag: 2.17.2
tag: 2.17.4

imagePullSecrets: []

Expand Down Expand Up @@ -283,6 +283,13 @@ emailReports:
# include: ['team-a-*']
# sources:
# include: ['Kyverno']
resources: {}
# limits:
# memory: 100Mi
# cpu: 10m
# requests:
# memory: 75Mi
# cpu: 5m

# Reference a configuration which already exists instead of creating one
existingTargetConfig:
Expand Down
2 changes: 1 addition & 1 deletion manifest/policy-reporter-kyverno-ui-ha/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ spec:
fsGroup: 1234
containers:
- name: policy-reporter
image: "ghcr.io/kyverno/policy-reporter:2.17.2"
image: "ghcr.io/kyverno/policy-reporter:2.17.4"
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: false
Expand Down
2 changes: 1 addition & 1 deletion manifest/policy-reporter-kyverno-ui/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ spec:
fsGroup: 1234
containers:
- name: policy-reporter
image: "ghcr.io/kyverno/policy-reporter:2.17.2"
image: "ghcr.io/kyverno/policy-reporter:2.17.4"
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: false
Expand Down
2 changes: 1 addition & 1 deletion manifest/policy-reporter-ui/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ spec:
fsGroup: 1234
containers:
- name: policy-reporter
image: "ghcr.io/kyverno/policy-reporter:2.17.2"
image: "ghcr.io/kyverno/policy-reporter:2.17.4"
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: false
Expand Down
2 changes: 1 addition & 1 deletion manifest/policy-reporter/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ spec:
automountServiceAccountToken: true
containers:
- name: policy-reporter
image: "ghcr.io/kyverno/policy-reporter:2.17.2"
image: "ghcr.io/kyverno/policy-reporter:2.17.4"
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: false
Expand Down
2 changes: 1 addition & 1 deletion manifest/violations-email-report/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spec:
restartPolicy: Never
containers:
- name: policy-reporter
image: "ghcr.io/kyverno/policy-reporter:2.17.2"
image: "ghcr.io/kyverno/policy-reporter:2.17.4"
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: false
Expand Down

0 comments on commit a747418

Please sign in to comment.