Skip to main content

Kubernetes File

The KubernetesFile config type is used to scrape configurations contained in your specified resource e.g Pod.

k8s-file-scraper.yaml
apiVersion: 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

FieldDescriptionSchemeRequired
logLevelSpecify the level of logging.string
scheduleSpecify the interval to scrape in cron format. Defaults to every 60 minutes.string
fullSet to true to extract changes from scraped configurations. Defaults to false.bool
retentionSettings for retaining changes, analysis and scraped itemsRetention
kubernetesFileSpecifies the list of Kubernetes File configurations to scrape.[]KubernetesFile

KubernetesFile

FieldDescriptionScheme
files*

List of files inside the pod to scrape

[]File

id*

A deterministic or natural id for the resource

string or JSONPath

selector*

Pods to extract files from

ResourceSelector

type*

e.g. File::Host, File::Tomcat, File::Pom

string or JSONPath

container

Name of container

string

class

string or JSONPath

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

[]string or []JSONPath

deleteFields

Identify when a config item was deleted. If multiple fields are specified, the first non-empty value will be used

[]string or []JSONPath

format

Format of config item e.g. xml, properties. Defaults to JSON

string

ignore

Fields to ignore and strip out of the config

[]JSONPath

items

Extract multiple config items from this array

JSONPath

name

. Defaults to id

string or JSONPath

properties

Custom templatable properties for the scraped config items.

[]ConfigProperty

tags

Additional tags

map[string]string

timestampFormat

Format to parse timestamps in createFields and deletedFields. Defaults to RFC3339

Go time format

File

FieldDescriptionSchemeRequired
pathSet path to file contained in Pod[]string
formatSpecify format of filestring