Add a command for searching for kustomize resource files

This commit is contained in:
Haiyan Meng
2020-01-13 15:55:05 -08:00
parent 81d62f90bf
commit 14eb524b9e
2 changed files with 21 additions and 3 deletions

View File

@@ -63,4 +63,20 @@ curl -X GET "${ElasticSearchURL}:9200/kustomize/_search?pretty" -H 'Content-Type
}
}
'
```
Search all the documents whose filePath does not end with any of these following
three filenames: `kustomization.yaml`, `kustomization.yml`, `kustomization`:
```
curl -X GET "${ElasticSearchURL}:9200/kustomize/_search?pretty" -H 'Content-Type: application/json' -d'
{
"query": {
"bool": {
"must_not": [
{ "regexp": { "filePath": ".*/kustomization((.yaml)?|(.yml)?)/*" }}
]
}
}
}
'
```