diff --git a/charts/policy-reporter/README.md b/charts/policy-reporter/README.md index 46c26111..a88af0a1 100644 --- a/charts/policy-reporter/README.md +++ b/charts/policy-reporter/README.md @@ -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 | @@ -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 diff --git a/charts/policy-reporter/templates/cluster-secret.yaml b/charts/policy-reporter/templates/cluster-secret.yaml index 50d54e28..237a3a41 100644 --- a/charts/policy-reporter/templates/cluster-secret.yaml +++ b/charts/policy-reporter/templates/cluster-secret.yaml @@ -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 }} diff --git a/charts/policy-reporter/templates/extra-manifests.yaml b/charts/policy-reporter/templates/extra-manifests.yaml new file mode 100644 index 00000000..9059d7d0 --- /dev/null +++ b/charts/policy-reporter/templates/extra-manifests.yaml @@ -0,0 +1,4 @@ +{{ range .Values.extraManifests }} +--- +{{ tpl . $ }} +{{ end }} \ No newline at end of file diff --git a/charts/policy-reporter/templates/ui/extra-manifests.yaml b/charts/policy-reporter/templates/ui/extra-manifests.yaml deleted file mode 100644 index cb1b0b91..00000000 --- a/charts/policy-reporter/templates/ui/extra-manifests.yaml +++ /dev/null @@ -1,6 +0,0 @@ -{{- if .Values.ui.enabled -}} -{{ range .Values.ui.extraManifests }} ---- -{{ tpl . $ }} -{{ end }} -{{- end }} \ No newline at end of file diff --git a/charts/policy-reporter/values.yaml b/charts/policy-reporter/values.yaml index 13e523e6..eaa58cfb 100644 --- a/charts/policy-reporter/values.yaml +++ b/charts/policy-reporter/values.yaml @@ -986,8 +986,6 @@ ui: # -- The ServiceAccount name name: "" - # -- list of extra manifests - extraManifests: [] # -- Add sidecar containers to the UI deployment # sidecarContainers: @@ -1659,3 +1657,6 @@ monitoring: height: 10 failingClusterPolicyRuleTable: height: 10 + +# -- list of extra manifests +extraManifests: []