Skip to content

Commit

Permalink
add support for argocd, make extraManifests independant from UI
Browse files Browse the repository at this point in the history
Signed-off-by: Etienne Divet <etienne.divet@gmail.com>
  • Loading branch information
enneitex committed Dec 24, 2024
1 parent 8c6317b commit 589a6f5
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion charts/policy-reporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,6 @@ Open `http://localhost:8082/` in your browser.
| ui.serviceAccount.automount | bool | `true` | Enable ServiceAccount automount |
| ui.serviceAccount.annotations | object | `{}` | Annotations for the ServiceAccount |
| ui.serviceAccount.name | string | `""` | The ServiceAccount name |
| ui.extraManifests | list | `[]` | list of extra manifests |
| ui.sidecarContainers | object | `{}` | Add sidecar containers to the UI deployment sidecarContainers: oauth-proxy: image: quay.io/oauth2-proxy/oauth2-proxy:v7.6.0 args: - --upstream=http://127.0.0.1:8080 - --http-address=0.0.0.0:8081 - ... ports: - containerPort: 8081 name: oauth-proxy protocol: TCP resources: {} |
| ui.podAnnotations | object | `{}` | Additional annotations to add to each pod |
| ui.podLabels | object | `{}` | Additional labels to add to each pod |
Expand Down Expand Up @@ -590,6 +589,7 @@ Open `http://localhost:8082/` in your browser.
| monitoring.policyReportOverview.failingTimeline.height | int | `10` | |
| monitoring.policyReportOverview.failingPolicyRuleTable.height | int | `10` | |
| monitoring.policyReportOverview.failingClusterPolicyRuleTable.height | int | `10` | |
| extraManifests | list | `[]` | list of extra manifests |

## Source Code

Expand Down
8 changes: 6 additions & 2 deletions charts/policy-reporter/templates/cluster-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ data:
{{- $username := .Values.basicAuth.username }}
{{- $password := .Values.basicAuth.password }}
host: {{ printf "http://%s:%d" (include "policyreporter.fullname" .) (.Values.service.port | int) | b64enc }}
username: {{ $username | b64enc }}
password: {{ $password | b64enc }}
{{- if .Values.basicAuth.username }}
username: {{ .Values.basicAuth.username | b64enc }}
{{- end }}
{{- if .Values.basicAuth.password }}
password: {{ .Values.basicAuth.password | b64enc }}
{{- end }}
{{- if .Values.plugin.kyverno.enabled }}
{{- $host := printf "http://%s:%d" (include "kyverno-plugin.fullname" .) (.Values.plugin.kyverno.service.port | int) }}
plugin.kyverno: {{ (printf "{\"host\":\"%s\", \"name\":\"kyverno\", \"username\":\"%s\", \"password\":\"%s\"}" $host $username $password) | b64enc }}
Expand Down
4 changes: 4 additions & 0 deletions charts/policy-reporter/templates/extra-manifests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{ range .Values.extraManifests }}
---
{{ tpl . $ }}
{{ end }}
6 changes: 0 additions & 6 deletions charts/policy-reporter/templates/ui/extra-manifests.yaml

This file was deleted.

5 changes: 3 additions & 2 deletions charts/policy-reporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -986,8 +986,6 @@ ui:
# -- The ServiceAccount name
name: ""

# -- list of extra manifests
extraManifests: []

# -- Add sidecar containers to the UI deployment
# sidecarContainers:
Expand Down Expand Up @@ -1659,3 +1657,6 @@ monitoring:
height: 10
failingClusterPolicyRuleTable:
height: 10

# -- list of extra manifests
extraManifests: []

Check failure on line 1662 in charts/policy-reporter/values.yaml

View workflow job for this annotation

GitHub Actions / lint

1662:19 [new-line-at-end-of-file] no new line character at the end of file

0 comments on commit 589a6f5

Please sign in to comment.