Skip to content
Open
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,9 +15,9 @@ 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: 2.5.0
version: 2.6.0

# This is the version number of the (CLI) application being deployed. This version number should be
# incremented each time you make changes to the application. They should reflect the version the
# application is using. It is recommended to use it with quotes.
appVersion: "v2.32.0"
appVersion: "v2.34.0"
Comment thread
mbevc1 marked this conversation as resolved.
3 changes: 3 additions & 0 deletions charts/k8s-reporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,12 @@ cronSchedule: "*/15 * * * *"
| podAnnotations | object | `{}` | annotations to add to the CronJob object itself. For pod-level annotations (added to each reporter pod), use `podTemplateAnnotations` instead. |
| podLabels | object | `{}` | custom labels to add to pods |
| podTemplateAnnotations | object | `{}` | annotations to add to the reporter pod template (applied to each Job pod that the CronJob creates) |
| reporterConfig.autoEnvironment | bool | `false` | create each Kosli environment (type K8S) if it does not already exist, before reporting the snapshot |
| reporterConfig.dryRun | bool | `false` | 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. |
| reporterConfig.environmentDescription | string | `""` | description applied to every environment auto-created in this run. Only used when `autoEnvironment` is true; existing environments are never modified. Note: a single value is shared by all environments created during the run. |
| reporterConfig.environments | list | `[]` | List of Kosli environments to report to. Each entry has required 'name' and optional namespace selectors. Use one entry to report a single environment; use multiple entries to report to multiple environments with different selectors. Per entry: name (required), namespaces, namespacesRegex, excludeNamespaces, excludeNamespacesRegex (optional). Leave namespace fields unset for an entry to report the entire cluster to that environment. |
| reporterConfig.httpProxy | string | `""` | the http proxy url |
| reporterConfig.includeScaling | string | `nil` (server default) | whether to record scaling (replica count) changes for every environment auto-created in this run. Leave unset to use the Kosli server default; set to `true` to pass `--include-scaling` or `false` to pass `--exclude-scaling`. Only used when `autoEnvironment` is true; existing environments are never modified. |
| reporterConfig.kosliOrg | string | `""` | the name of the Kosli org |
| reporterConfig.securityContext | object | `{"allowPrivilegeEscalation":false,"runAsNonRoot":true,"runAsUser":1000}` | the security context for the reporter cronjob. Set to null or {} to disable security context entirely (not recommended). For OpenShift with SCC, explicitly set runAsUser to null to let OpenShift assign the UID from the allowed range. Simply omitting runAsUser from your values override will not work because Helm deep-merges with these defaults. Example OpenShift override: securityContext: allowPrivilegeEscalation: false runAsNonRoot: true runAsUser: null |
| reporterConfig.securityContext.allowPrivilegeEscalation | bool | `false` | whether to allow privilege escalation |
Expand Down
23 changes: 18 additions & 5 deletions charts/k8s-reporter/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,27 @@ spec:
- k8s
- --config-file
- /config/config.yaml
{{ if .Values.reporterConfig.dryRun }}
{{- if .Values.reporterConfig.autoEnvironment }}
- --auto-environment
{{- if .Values.reporterConfig.environmentDescription }}
- --environment-description
- {{ .Values.reporterConfig.environmentDescription | quote }}
{{- end }}
{{- if kindIs "bool" .Values.reporterConfig.includeScaling }}
{{- if .Values.reporterConfig.includeScaling }}
- --include-scaling
{{- else }}
- --exclude-scaling
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.reporterConfig.dryRun }}
- --dry-run
{{ end }}
{{ if .Values.reporterConfig.httpProxy }}
{{- end }}
{{- if .Values.reporterConfig.httpProxy }}
- --http-proxy
- {{ .Values.reporterConfig.httpProxy }}
{{ end }}

{{- end }}
resources:
{{ toYaml .Values.resources | indent 14 }}
restartPolicy: Never
7 changes: 7 additions & 0 deletions charts/k8s-reporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ reporterConfig:
# namespacesRegex: ["^staging-.*"]
# - name: infra-env
# excludeNamespaces: [prod-ns1, prod-ns2, default]
# -- create each Kosli environment (type K8S) if it does not already exist, before reporting the snapshot
autoEnvironment: false
# -- description applied to every environment auto-created in this run. Only used when `autoEnvironment` is true; existing environments are never modified. Note: a single value is shared by all environments created during the run.
environmentDescription: ""
# -- whether to record scaling (replica count) changes for every environment auto-created in this run. Leave unset to use the Kosli server default; set to `true` to pass `--include-scaling` or `false` to pass `--exclude-scaling`. Only used when `autoEnvironment` is true; existing environments are never modified.
# @default -- `nil` (server default)
includeScaling: null
# -- 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
Loading