Conversation
|
Thanks for this as well. |
|
Thanks for looking into it! |
This allows enabling core-dump-handler only on pods that match a configured selector pod-label. Useful if we need core-dump-handler only for a subset of our workload. The composer checks for the pod label and only prepares the upload only if the pod matches the selector configured. The default (empty selector label) is to have no selectors and enable collection for all. Only the existence of the label is checked for. The selector can be configured via `daemonSet.podSelectorLabel` in `values.yaml`, which translates to the `POD_SELECTOR_LABEL` environment variable in the daemonset.
89010c6 to
abba8f9
Compare
charts/core-dump-handler/README.md
Outdated
| * INTERVAL - The amount of time in milliseconds between each check of the core dump folder for files to upload. | ||
| * SCHEDULE - A CRON formatted string [See cron library](https://github.com/mvniekerk/tokio-cron-scheduler#usage). | ||
| * USE_INOTIFY - Set a listener for the coredump folder can be used in conjunction with SCHEDULE | ||
| * POD_SELECTOR_LABEL - Optional selector label to filter pods that have core dump collection enabled. Default (empty) disables filter. |
There was a problem hiding this comment.
As per conversation this should be COMP_POD_SELECTOR_LABEL
Also add an an example label so it's clear how this works
| hostDirectory: "/var/mnt/core-dump-handler" | ||
| coreDirectory: "/var/mnt/core-dump-handler/cores" | ||
| crioEndpoint: "unix:///run/containerd/containerd.sock" | ||
| podSelectorLabel: "" |
There was a problem hiding this comment.
As per conversation should be in composer not daemonset
| hostDirectory: "/var/mnt/core-dump-handler" | ||
| coreDirectory: "/var/mnt/core-dump-handler/cores" | ||
| crioEndpoint: "unix:///run/containerd/containerd.sock" | ||
| podSelectorLabel: "" |
There was a problem hiding this comment.
As per conversation should be in composer not daemonset
| hostDirectory: "/var/mnt/core-dump-handler" | ||
| coreDirectory: "/var/mnt/core-dump-handler/cores" | ||
| crioEndpoint: "unix:///run/containerd/containerd.sock" | ||
| podSelectorLabel: "" |
There was a problem hiding this comment.
As per conversation should be in composer not daemonset
| hostDirectory: "/var/mnt/core-dump-handler" | ||
| coreDirectory: "/var/mnt/core-dump-handler/cores" | ||
| crioEndpoint: "unix:///run/containerd/containerd.sock" | ||
| podSelectorLabel: "" |
There was a problem hiding this comment.
As per conversation should be in composer not daemonset
| value: {{ .Values.daemonset.deployCrioConfig | quote }} | ||
| - name: CRIO_ENDPOINT | ||
| value: {{ .Values.daemonset.crioEndpoint | quote }} | ||
| - name: POD_SELECTOR_LABEL |
| "type": "string" | ||
| }, | ||
| "podSelectorLabel": { | ||
| "type": "string" |
There was a problem hiding this comment.
Should move to composer definition
charts/core-dump-handler/values.yaml
Outdated
| hostDirectory: "/var/mnt/core-dump-handler" | ||
| coreDirectory: "/var/mnt/core-dump-handler/cores" | ||
| crioEndpoint: "unix:///run/containerd/containerd.sock" | ||
| podSelectorLabel: "" |
There was a problem hiding this comment.
As per conversation should be in composer not daemonset
|
The good news is that this doesn't interfere with the cloud events. The bad news is that the pod selector config mapping isn't quite in the right place. All config that is passed to the composer should be in the composer section Could you add an example of a label value in the Environment config The values section in the docs also needs to be updated along with the environment section. I've gone through the PR to also highlight where I think these changes need to be done. (Edit) Once the mapping is aligned I'm happy to merge and push a release. |
|
I have now added 1186de2 which hopefully addresses these. Thanks for the guidance! |
|
Looks good - I have some dep updates to land then I'll put together a release |
This allows enabling core-dump-handler only on pods that match a configured selector pod-label. Useful if we need core-dump-handler only for a subset of our workload. The composer checks for the pod label and only prepares the upload only if the pod matches the selector configured. The default (empty selector label) is to have no selectors and enable collection for all. Only the existence of the label is checked for.
The selector can be configured via
daemonSet.podSelectorLabelinvalues.yaml, which translates to thePOD_SELECTOR_LABELenvironment variable in the daemonset.