-
Notifications
You must be signed in to change notification settings - Fork 93
/
sample-troubleshoot.yaml
54 lines (54 loc) · 1.59 KB
/
sample-troubleshoot.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
apiVersion: troubleshoot.sh/v1beta2
kind: SupportBundle
metadata:
name: my-application-name
spec:
collectors:
- clusterInfo:
collectorName: my-cluster-info
- clusterResources:
collectorName: my-cluster-resources
- http:
name: healthz
get:
url: http://api:3000/healthz
- data:
collectorName: my-password-dump
name: data
data: |
my super secret password is abc123
another redaction will go here
- data:
collectorName: yaml-data.yaml
name: data
data: |
abc:
xyz:
- hello
- world: "these are removed"
bcd:
abc:
xyz:
- these
- remain
---
apiVersion: troubleshoot.sh/v1beta2
kind: Redactor
metadata:
name: my-application-name
spec:
redactors:
- name: replace password # names are not used internally, but are useful for recordkeeping
fileSelector:
file: data/my-password-dump # this targets a single file
removals:
values:
- abc123 # this is a very good password, and I don't want it to be exposed
- name: all files # as no file is specified, this redactor will run against all files
removals:
regex:
- redactor: (another)(?P<mask>.*)(here) # this will replace anything between the strings `another` and `here` with `***HIDDEN***`
- selector: 'S3_ENDPOINT' # remove the value in lines following those that contain the string S3_ENDPOINT
redactor: '("value": ").*(")'
yamlPath:
- "abc.xyz.*" # redact all items in the array at key xyz within key abc in yaml documents