188 Commits

Author SHA1 Message Date
Andrew Lavery
f5d737f2c5 Merge pull request #204 from replicatedhq/divolgin/panic
Don't panic when parsing resources, return error
2020-05-27 17:08:02 -04:00
Marc Campbell
661d7fcfc4 Update names 2020-05-27 13:10:46 -07:00
divolgin
47e715a350 Don't panic when parsing resources, return error 2020-05-27 19:56:23 +00:00
Andrew Lavery
b9c3ad2635 better default redactor names 2020-05-27 14:36:40 -04:00
Andrew Lavery
f03916cfd2 include whether a redaction is from a default redactor in reports 2020-05-27 13:46:39 -04:00
Andrew Lavery
553718eada fully spell out default redactor names 2020-05-26 19:33:40 -04:00
Andrew Lavery
171c440f27 improve generated names for custom redactors 2020-05-26 18:13:48 -04:00
Andrew Lavery
869a9eafd3 actually increment withinRedactNum 2020-05-26 18:07:23 -04:00
Andrew Lavery
6c61040f74 default redactor name improvements
for instance, defaultRegex.SECRET_ACCESS_KEY instead of the raw regex
2020-05-26 17:15:30 -04:00
Andrew Lavery
bde882047f Merge pull request #199 from replicatedhq/laverya/redaction-reports
add yaml/json annotations for redaction reports
2020-05-20 15:03:25 -04:00
Andrew Lavery
0d84c62c78 add yaml/json annotations for redaction reports 2020-05-20 14:58:37 -04:00
Andrew Lavery
f5183c62d6 Merge pull request #198 from replicatedhq/laverya/redaction-reports
redaction reports framework
2020-05-20 14:43:29 -04:00
Andrew Lavery
5a2c153026 add tests for redaction reports 2020-05-20 14:36:07 -04:00
Andrew Lavery
fb2f028fb5 add methods to get and clear redactions 2020-05-20 10:28:46 -04:00
Andrew Lavery
d37ace6e51 better naming scheme that does not leak secrets 2020-05-19 17:21:55 -04:00
Andrew Lavery
b6e92e1bdf record yaml redactions 2020-05-14 18:49:30 -04:00
Andrew Lavery
27369acbf4 plumbing for literal/regex/multiline reports 2020-05-14 16:00:58 -04:00
Andrew Lavery
22d397cc7b Merge pull request #190 from MikaelSmith/error-on-connect-fail
Report errors connecting to the database
2020-05-13 19:38:20 -04:00
Marc Campbell
0f31088bd1 Parse postgres version output 2020-05-07 19:41:59 -07:00
Michael Smith
4b9680be8b Report errors connecting to the database
If the postgres collector encounters an error, report it as a failure in
the analyzer. Otherwise the error is completely suppressed.

Fixes #187.
2020-05-07 17:04:10 -07:00
Andrew Lavery
20033b12d5 Merge pull request #188 from replicatedhq/laverya/improve-unexpected-operator-error
include the operator in the 'unexpected operator' error message
2020-05-07 18:39:59 -04:00
Andrew Lavery
f795f909b3 include all the data 2020-05-07 18:15:33 -04:00
Andrew Lavery
b3828b175d include the operator in the 'unexpected operator' error message 2020-05-07 18:04:37 -04:00
Andrew Lavery
fa84d3fbd3 Merge pull request #180 from MikaelSmith/fix-allocatable-sum
Fix sum(memoryAllocatable) and sum(podAllocatable)
2020-05-07 17:42:32 -04:00
Andrew Lavery
15b100e0ee support * when redacting yaml maps 2020-04-27 22:01:04 -04:00
Andrew Lavery
2f092ae4a1 add multiline redactor test 2020-04-27 20:52:01 -04:00
Andrew Lavery
56150c3345 add support for redacting items within yaml documents 2020-04-27 20:46:52 -04:00
Andrew Lavery
8f594e8764 add support for custom multiline redactors, add yaml redactors to spec 2020-04-27 16:50:25 -04:00
Andrew Lavery
09bc81e144 analyzeRegexGroups should not have out of range error upon no match 2020-04-23 15:26:01 -04:00
Andrew Lavery
37f75c1a3f use gobwas/glob, not filepath, file matching 2020-04-23 13:13:46 -04:00
Michael Smith
8f8b8b2c78 Fix sum(memoryAllocatable) and sum(podAllocatable)
Fixes `sum(memoryAllocatable)` and `sum(podAllocatable)`. These
previously tested the wrong resource (cpuAllocatable).

Also refactor comparison functions to unify resolving properties and add
more testing.

Fixes #179.
2020-04-21 11:39:31 -07:00
Michael Smith
1605b56090 Simplify tests by reusing same node data
Remove repetition across test cases that made it hard to read. Tweaks
tests where needed so they can all use the same node data. Also corrects
a test where the description didn't match the test.
2020-04-21 11:08:03 -07:00
Andrew Lavery
8b54c28b4b remove per-collector redactors 2020-04-20 14:59:15 -04:00
Andrew Lavery
d016e3269c add global and per-collector redactors
add redact type, and begin wiring global redactors

use per-collector redactors

add a test of the 'data' collector and redaction

handle literal string replacements

remove redundant types and redact calls

add proper redactor type, foundations of global redactors

accept global redactors from the CLI, include sample redaction spec
2020-04-16 14:03:00 -04:00
Andrew Lavery
7dc93ddade don't redact nil entries, discard them 2020-04-14 17:59:12 -04:00
Andrew Lavery
a7c4f04a63 convert remaining collectors to map[string][]byte format 2020-04-14 17:15:53 -04:00
Andrew Lavery
527fe16bcc reduce marshal/unmarshal passes by returning map[string][]byte
WIP
2020-04-14 16:37:51 -04:00
Andrew Lavery
cbaf96691e collect logs from all containers in a pod if no container is specified 2020-04-08 16:05:44 -04:00
Andrew Lavery
4dfb02e7f7 Merge pull request #167 from replicatedhq/laverya/include-container-in-copy-path-if-provided
include the container name in the file copy path destination if provided
2020-04-06 18:29:45 -04:00
Andrew Lavery
2c495b8a7a include the container name in the file copy path destination if provided 2020-04-06 18:02:37 -04:00
Andrew Lavery
c3646bacd9 don't use a default filename in paths 2020-04-06 18:01:13 -04:00
Andrew Lavery
3844a3dbd3 don't override namespace 2020-04-06 17:44:57 -04:00
Andrew Lavery
544c832d6e support the 'includeValue' flag for secrets 2020-04-06 17:03:19 -04:00
Ashwathi Shiva
d1c45f1456 fixes path handling in windows as well 2020-03-26 00:58:40 -04:00
Marc Campbell
e9ad961c0e Merge pull request #160 from replicatedhq/build-on-actions
Move all to github actions
2020-03-23 10:43:09 -07:00
Marc Campbell
bd71222715 Removing more unused code 2020-03-23 10:01:30 -07:00
divolgin
9dbf282b5b Merge pull request #156 from replicatedhq/divolgin/previous
Include previous logs from pods if available
2020-03-23 09:19:33 -07:00
Marc Campbell
821a132980 add some omitempty 2020-03-23 08:58:02 -07:00
Marc Campbell
8f78827002 Redis 2020-03-20 11:03:49 -07:00
Marc Campbell
77eba55ee8 Abstract, add mysql 2020-03-20 07:19:03 -07:00