Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions charts/k8s-reporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.6.0
version: 1.7.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "2.11.3"
appVersion: "2.11.15"
2 changes: 1 addition & 1 deletion charts/k8s-reporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Kubernetes Reporter Helm Chart

# k8s-reporter

![Version: 1.6.0](https://img.shields.io/badge/Version-1.6.0-informational?style=flat-square)
![Version: 1.7.0](https://img.shields.io/badge/Version-1.7.0-informational?style=flat-square)

A Helm chart for installing the Kosli K8S reporter as a cronjob.
The chart allows you to create a Kubernetes cronjob and all its necessary RBAC to report running images to Kosli at a given cron schedule.
Expand Down
8 changes: 8 additions & 0 deletions charts/k8s-reporter/templates/_validations.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{{/*
Validate that namespacesRegex is not used with namespace-scoped permissions
*/}}
{{- define "k8s-reporter.validateNamespacesRegex" -}}
{{- if and (eq .Values.serviceAccount.permissionScope "namespace") (ne .Values.reporterConfig.namespacesRegex "") -}}
{{- fail "namespacesRegex cannot be used with namespace-scoped permissions (serviceAccount.permissionScope: namespace). namespacesRegex requires cluster-wide permissions." -}}
{{- end -}}
{{- end -}}
5 changes: 5 additions & 0 deletions charts/k8s-reporter/templates/cronjob.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- include "k8s-reporter.validateNamespacesRegex" . -}}
apiVersion: batch/v1
kind: CronJob
metadata:
Expand Down Expand Up @@ -30,7 +31,11 @@ spec:
{{ if .Values.reporterConfig.namespaces }}
- name: KOSLI_NAMESPACES
value: {{ .Values.reporterConfig.namespaces | quote }}
{{ else if .Values.reporterConfig.namespacesRegex }}
- name: KOSLI_NAMESPACES_REGEX
value: {{ .Values.reporterConfig.namespacesRegex | quote }}
{{ end }}

{{- range $key, $value := .Values.env }}
- name: {{ $key }}
value: {{ $value }}
Expand Down
12 changes: 9 additions & 3 deletions charts/k8s-reporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ image:
# -- the kosli reporter image pull policy
pullPolicy: IfNotPresent
# -- the kosli reporter image tag, overrides the image tag whose default is the chart appVersion.
tag: "v2.11.3"
tag: "v2.11.15"

# -- overrides the name used for the created k8s resources. If `fullnameOverride` is provided, it has higher precedence than this one
nameOverride: ""
Expand Down Expand Up @@ -40,10 +40,16 @@ reporterConfig:
kosliOrg: ""
# -- the name of Kosli environment that the k8s cluster/namespace correlates to
kosliEnvironmentName: ""
# -- the namespaces which represent the environment.
# -- the namespaces to scan and report.
# It is a comma separated list of namespace names.
# leave this unset if you want to report what is running in the entire cluster
# leave this and namespacesRegex unset if you want to report what is running in the entire cluster
namespaces: ""
# -- the namespaces Regex patterns to scan and report.
# Does not have effect if namespaces is set.
# Requires cluster-wide permissions.
# It is a comma separated list of namespace regex patterns.
# leave this and namespaces unset if you want to report what is running in the entire cluster
namespacesRegex: ""
# -- whether the dry run mode is enabled or not. In dry run mode, the reporter logs the reports to stdout and does not send them to kosli.
dryRun: false
# -- the http proxy url
Expand Down