Kubernetes File
The KubernetesFile config type is used to scrape configurations contained in your specified resource e.g Pod.
k8s-file-scraper.yamlapiVersion: configs.flanksource.com/v1
kind: ScrapeConfig
metadata:
name: k8s-file-scraper
spec:
kubernetesFile:
- selector:
namespace: demo
kind: Statefulset
name: postgresql
files:
- path:
- /var/lib/postgresql/data/pgdata/postgresql.conf
format: properties
Scraper
Field | Description | Scheme | Required |
---|---|---|---|
logLevel | Specify the level of logging. | string | |
schedule | Specify the interval to scrape in cron format. Defaults to every 60 minutes. | string | |
full | Set to true to extract changes from scraped configurations. Defaults to false . | bool | |
retention | Settings for retaining changes, analysis and scraped items | Retention | |
kubernetesFile | Specifies the list of Kubernetes File configurations to scrape. | []KubernetesFile |
KubernetesFile
Field | Description | Scheme |
---|---|---|
files* | List of files inside the pod to scrape | |
id* | A deterministic or natural id for the resource |
|
selector* | Pods to extract files from | |
type* | e.g. |
|
container | Name of container | |
class |
| |
createFields | Identify the created time for a resource (if different to scrape time). If multiple fields are specified, the first non-empty value will be used |
|
deleteFields | Identify when a config item was deleted. If multiple fields are specified, the first non-empty value will be used |
|
format | Format of config item e.g. |
|
items | Extract multiple config items from this array | |
labels | Labels for each config item. |
|
name | . Defaults to |
|
properties | Custom templatable properties for the scraped config items. | |
tags | Tags for each config item. Max allowed: 5 | |
timestampFormat | Format to parse timestamps in | Go time format |
transform | Transform configs after they've been scraped |
File
Field | Description | Scheme | Required |
---|---|---|---|
path | Set path to file contained in Pod | []string | |
format | Specify format of file | string |