Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(charts,x509-certificate-exporter): monitor specific file extension #354

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions deploy/charts/x509-certificate-exporter/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ spec:
{{- range default $.Values.hostPathsExporter.watchDirectories $dsDef.watchDirectories }}
- --watch-dir=/mnt/watch/dir-{{ . | clean | sha1sum }}/{{ . | clean }}
{{- end }}
{{- range default $.Values.watchSpecificExtensionDirectories $dsDef.watchSpecificExtensionDirectories }}
- --watch-dir=/mnt/watch/dir-{{ .directory | clean | sha1sum }}/{{ .directory | clean }}/*.{{ .extension | clean }}
{{- end }}
{{- range default $.Values.hostPathsExporter.watchFiles $dsDef.watchFiles }}
- --watch-file=/mnt/watch/file-{{ . | clean | sha1sum }}/{{ . | clean }}
{{- end }}
Expand All @@ -117,6 +120,11 @@ spec:
mountPath: /mnt/watch/dir-{{ . | clean | sha1sum }}/{{ . | clean }}
readOnly: true
{{- end }}
{{- range default $.Values.hostPathsExporter.watchSpecificExtensionDirectories $dsDef.watchSpecificExtensionDirectories }}
- name: dir-{{ .directory| clean | sha1sum }}
mountPath: /mnt/watch/dir-{{ .directory | clean | sha1sum }}/{{ .directory | clean | dir }}
readOnly: true
{{- end }}
{{- range default $.Values.hostPathsExporter.watchFiles $dsDef.watchFiles }}
- name: file-{{ . | clean | sha1sum }}
mountPath: /mnt/watch/file-{{ . | clean | sha1sum }}/{{ . | clean | dir }}
Expand Down Expand Up @@ -179,6 +187,14 @@ spec:
type: {{ $hostPathType | quote }}
{{- end }}
{{- end }}
{{- range default $.Values.hostPathsExporter.watchSpecificExtensionDirectories $dsDef.watchSpecificExtensionDirectories }}
- name: dir-{{ .directory | clean | sha1sum }}
hostPath:
path: {{ .directory | clean }}
{{- if $hostPathType }}
type: {{ $hostPathType | quote }}
{{- end }}
{{- end }}
{{- range default $.Values.hostPathsExporter.watchFiles $dsDef.watchFiles }}
- name: file-{{ . | clean | sha1sum }}
hostPath:
Expand Down
2 changes: 2 additions & 0 deletions deploy/charts/x509-certificate-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ hostPathsExporter:
hostPathVolumeType: Directory
# -- [SEE README] List of directory paths of the host to scan for PEM encoded certificate files to be watched and exported as metrics (one level deep)
watchDirectories: []
# -- [SEE README] List of directory paths of the host to scan for specific extension files to be watched and exported as metrics (one level deep)
watchSpecificExtensionDirectories: []
# -- [SEE README] List of file paths of the host for PEM encoded certificates to be watched and exported as metrics (one level deep)
watchFiles: []
# -- [SEE README] List of Kubeconf file paths of the host to scan for embedded certificates to export metrics about
Expand Down