Skip to content

Commit

Permalink
Merge pull request #355 from mjnagel/monitor-flexibility
Browse files Browse the repository at this point in the history
feat: add support for monitor chart securityContext and labels
  • Loading branch information
becitsthere authored Mar 20, 2024
2 parents 2f54ec9 + 2b1a590 commit ed3bc75
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
11 changes: 11 additions & 0 deletions charts/monitor/templates/exporter-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ spec:
labels:
app: neuvector-prometheus-exporter-pod
release: {{ .Release.Name }}
{{- with .Values.exporter.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
Expand All @@ -32,6 +35,10 @@ spec:
serviceAccountName: basic
serviceAccount: basic
{{- end }}
{{- with .Values.exporter.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: neuvector-prometheus-exporter-pod
{{ if eq .Values.registry "registry.neuvector.com" }}
Expand All @@ -44,6 +51,10 @@ spec:
image: "{{ .Values.registry }}/{{ .Values.exporter.image.repository }}:{{ .Values.exporter.image.tag }}"
{{- end }}
imagePullPolicy: Always
{{- with .Values.exporter.containerSecurityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
env:
- name: CTRL_API_SERVICE
value: {{ .Values.exporter.apiSvc }}
Expand Down
3 changes: 3 additions & 0 deletions charts/monitor/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ exporter:
enabled: false
ctrlSecretName: ''
apiSvc: neuvector-svc-controller-api:10443
podLabels: {}
securityContext: {}
containerSecurityContext: {}

svc:
enabled: true
Expand Down

0 comments on commit ed3bc75

Please sign in to comment.