Skip to content

Commit

Permalink
helm chart cleanups
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Jogeleit <frank.jogeleit@web.de>
  • Loading branch information
fjogeleit committed Sep 17, 2024
1 parent cfc4406 commit d61b387
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 136 deletions.
3 changes: 2 additions & 1 deletion charts/policy-reporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Check the [Documentation](https://kyverno.github.io/policy-reporter/guide/02-get
| image.registry | string | `"ghcr.io"` | |
| image.repository | string | `"kyverno/policy-reporter"` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.tag | string | `"4d7a2e2"` | |
| image.tag | string | `"cfc4406"` | |
| imagePullSecrets | list | `[]` | |
| priorityClassName | string | `""` | |
| replicaCount | int | `1` | |
Expand Down Expand Up @@ -373,6 +373,7 @@ Check the [Documentation](https://kyverno.github.io/policy-reporter/guide/02-get
| ui.displayMode | string | `""` | DisplayMode dark/light/colorblind/colorblinddark uses the OS configured prefered color scheme as default |
| ui.customBoards | list | `[]` | Additional customizable dashboards |
| ui.sources | list | `[]` | source specific configurations |
| ui.name | string | `"Default"` | |
| ui.clusters | list | `[]` | Connected Policy Reporter APIs |
| ui.imagePullSecrets | list | `[]` | Image pull secrets for image verification policies, this will define the `--imagePullSecrets` argument |
| ui.serviceAccount.create | bool | `true` | Create ServiceAccount |
Expand Down
4 changes: 2 additions & 2 deletions charts/policy-reporter/configs/ui.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ ui:

{{- $default := false -}}
{{- range .Values.ui.clusters }}
{{- if eq .name "Default" -}}
{{- if eq .name .Values.ui.name -}}
{{- $default = true -}}
{{- end -}}
{{- end }}

clusters:
{{- if not $default }}
- name: Default
- name: {{ .Values.ui.name }}
secretRef: {{ include "ui.fullname" . }}-default-cluster
{{- end }}
{{- with .Values.ui.clusters }}
Expand Down
8 changes: 4 additions & 4 deletions charts/policy-reporter/templates/cluster-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ metadata:
{{- include "policyreporter.labels" . | nindent 4 }}
type: Opaque
data:
{{- $username := .Values.basicAuth.username }}
{{- $password := .Values.basicAuth.password }}
host: {{ printf "http://%s:%d" (include "policyreporter.fullname" .) (.Values.service.port | int) | b64enc }}
{{- if .Values.plugin.kyverno.enabled }}
{{- $host := printf "http://%s:%d/api" (include "kyverno-plugin.fullname" .) (.Values.plugin.kyverno.service.port | int) }}
{{- $username := .Values.basicAuth.username }}
{{- $password := .Values.basicAuth.password }}
plugin.kyverno: {{ (printf "{\"host\":\"%s\", \"name\":\"kyverno\", \"username\":\"%s\", \"password\":\"%s\"}" $host $username $password) | b64enc }}
{{- end }}
{{- if .Values.plugin.trivy.enabled }}
{{- $username := .Values.basicAuth.username }}
{{- $password := .Values.basicAuth.password }}
{{- $host := printf "http://%s:%d/api/vulnr" (include "trivy-plugin.fullname" .) (.Values.plugin.trivy.service.port | int) }}
plugin.trivy: {{ (printf "{\"host\":\"%s\", \"name\":\"Trivy Vulnerability\", \"username\":\"%s\", \"password\":\"%s\"}" $host $username $password) | b64enc }}
username: {{ $username | b64enc }}
password: {{ $password | b64enc }}
{{- end }}
4 changes: 2 additions & 2 deletions charts/policy-reporter/templates/ui/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ spec:
{{- with .Values.ui.envVars }}
{{- . | toYaml | trim | nindent 10 }}
{{- end }}
{{- if .Values.sidecarContainers }}
{{- range $name, $spec := .Values.sidecarContainers }}
{{- if .Values.ui.sidecarContainers }}
{{- range $name, $spec := .Values.ui.sidecarContainers }}
- name: {{ $name }}
{{- if kindIs "string" $spec }}
{{- tpl $spec $ | nindent 10 }}
Expand Down
5 changes: 4 additions & 1 deletion charts/policy-reporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ image:
registry: ghcr.io
repository: kyverno/policy-reporter
pullPolicy: IfNotPresent
tag: 4d7a2e2
tag: cfc4406

imagePullSecrets: []

Expand Down Expand Up @@ -846,6 +846,9 @@ ui:
# - warn
# - error

## -- Default Cluster name
name: Default

# -- Connected Policy Reporter APIs
clusters: []
# - name: default
Expand Down
49 changes: 0 additions & 49 deletions pkg/target/ui/ui.go

This file was deleted.

77 changes: 0 additions & 77 deletions pkg/target/ui/ui_test.go

This file was deleted.

0 comments on commit d61b387

Please sign in to comment.