Kubernetes File
The KubernetesFile config type is used to scrape the contents of files inside Kubernetes Pods.
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 | |
selector* | Pods to extract files from | |
cnrm | CNRM connection details | |
connection | The connection url to use, mutually exclusive with | |
container | Name of container | |
eks | EKS connection details | |
gke | GKE connection details | |
kubeconfig | Source for kubeconfig | |
labels | Labels for each config item. |
|
properties | Custom templatable properties for the scraped config items. | |
tags | Tags for each config item. Max allowed: 5 | |
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 |