Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
becitsthere authored Nov 29, 2023
2 parents 47ee55e + 8c4cc00 commit 92bbb31
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/monitor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Parameter | Description | Default | Notes
`exporter.enabled` | If true, create Prometheus exporter | `false` |
`exporter.image.repository` | exporter image name | `neuvector/prometheus-exporter` |
`exporter.image.tag` | exporter image tag | `latest` |
`exporter.ctrlSercretName` | existing secret that have CTRL_USERNAME and CTRL_PASSWORD fields to login to the controller. | `nil` | if parameter exists then `exporter.CTRL_USERNAME` & `exporter.CTRL_PASSWORD` will be skipped
`exporter.ctrlSecretName` | existing secret that have CTRL_USERNAME and CTRL_PASSWORD fields to login to the controller. | `nil` | if parameter exists then `exporter.CTRL_USERNAME` & `exporter.CTRL_PASSWORD` will be skipped
`exporter.CTRL_USERNAME` | Username to login to the controller. Suggest to replace the default admin user to a read-only user | `admin` |
`exporter.CTRL_PASSWORD` | Password to login to the controller. | `admin` |
`exporter.enforcerStats.enabled` | If true, enable the Enforcers stats | `false` | For the performance reason, by default the exporter does NOT pull CPU/memory usage from enforcers.
Expand Down
4 changes: 4 additions & 0 deletions charts/monitor/templates/dashboard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ metadata:
{{- if .Values.exporter.grafanaDashboard.labels }}
{{- toYaml .Values.exporter.grafanaDashboard.labels | nindent 4}}
{{- end }}
{{- if .Values.exporter.grafanaDashboard.annotations }}
annotations:
{{- toYaml .Values.exporter.grafanaDashboard.annotations | nindent 4}}
{{- end }}
data:
nv_dashboard.json: |
{{ .Files.Get "dashboards/nv_dashboard.json" | indent 4 }}
Expand Down
4 changes: 2 additions & 2 deletions charts/monitor/templates/exporter-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ spec:
{{- end }}
envFrom:
- secretRef:
{{- if .Values.exporter.ctrlSercretName }}
name: {{ .Values.exporter.ctrlSercretName }}
{{- if .Values.exporter.ctrlSecretName }}
name: {{ .Values.exporter.ctrlSecretName }}
{{ else }}
name: neuvector-prometheus-exporter-pod-secret
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion charts/monitor/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and (.Values.exporter.enabled) (not .Values.exporter.ctrlSercretName) -}}
{{- if and (.Values.exporter.enabled) (not .Values.exporter.ctrlSecretName) -}}
apiVersion: v1
kind: Secret
metadata:
Expand Down
3 changes: 3 additions & 0 deletions charts/monitor/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ exporter:
ctrlSercretName: ''
enforcerStats:
enabled: false
ctrlSecretName: ''
apiSvc: neuvector-svc-controller-api:10443

svc:
Expand All @@ -32,6 +33,8 @@ exporter:
enabled: false
namespace: "" # Release namespace, if empty
labels: {}
# annotations: {}
# k8s-sidecar-target-directory: /tmp/dashboards/neuvector

serviceMonitor:
enabled: false
Expand Down

0 comments on commit 92bbb31

Please sign in to comment.