Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(kumacp): mesh access log - proto + validation #4998

Merged
merged 27 commits into from
Sep 15, 2022
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
24c8bf3
feat(kumacp): bootstrap new policy
slonka Sep 13, 2022
aae1085
feat(kumacp): modify policy
slonka Sep 13, 2022
a9c4a73
feat(kumacp): update madr formats
slonka Sep 13, 2022
e871718
feat(kumacp): make full mesh access log example pass validator
slonka Sep 13, 2022
10096a0
feat(kumacp): more validations
slonka Sep 13, 2022
a5d9cfb
feat(kumacp): more validations
slonka Sep 13, 2022
af672ba
feat(kumacp): more validations - tcp and reference
slonka Sep 13, 2022
6e738fc
feat(kumacp): more validations - to and mesh gateway route
slonka Sep 13, 2022
b49d532
feat(kumacp): more validations - default must be defined
slonka Sep 13, 2022
6d986d1
feat(kumacp): update madr
slonka Sep 13, 2022
bc3f09a
feat(kumacp): make check pass
slonka Sep 13, 2022
8f47948
feat(kumacp): make check pass
slonka Sep 13, 2022
d10ea43
feat(kumacp): make policies stable
slonka Sep 13, 2022
14f0759
feat(kumacp): make check pass
slonka Sep 13, 2022
d5a86ab
feat(kumacp): update golden files
slonka Sep 13, 2022
dd9b3c4
feat(kumacp): skip registration
slonka Sep 13, 2022
cb8f771
feat(kumacp): skip registration 2
slonka Sep 13, 2022
98f71c0
Apply suggestions from code review
slonka Sep 14, 2022
4d17bd1
feat(kumacp): fix typos in test assertions
slonka Sep 14, 2022
e6f55e6
feat(kumacp): rename mesh access log types
slonka Sep 14, 2022
d16bcb4
feat(kumacp): change skip_registration to false
slonka Sep 14, 2022
0ae60d7
feat(kumacp): update golden files
slonka Sep 14, 2022
39a475d
feat(kumacp): add validations for file and tcp backend
slonka Sep 14, 2022
08c9767
feat(kumacp): add validation for reference
slonka Sep 14, 2022
99b4203
feat(kumacp): remove reference since it's not for this stage, this co…
slonka Sep 14, 2022
ec79f37
feat(kumacp): make check pass
slonka Sep 14, 2022
b20824e
feat(kumacp): update golden files
slonka Sep 14, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 20 additions & 30 deletions docs/madr/decisions/008-mesh-logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ spec:
name: file
type: file
conf:
format:
plain: '{"start_time": "%START_TIME%"}'
path: /tmp/access.log
---
type: MeshAccessLog
Expand All @@ -196,19 +198,19 @@ spec:
targetRef:
kind: MeshService
name: web-backend
tags:
slonka marked this conversation as resolved.
Show resolved Hide resolved
kuma.io/zone: us-east
from:
- targetRef:
kind: MeshService
name: web-frontend
default:
backends:
- type: tcp
conf:
- tcp:
slonka marked this conversation as resolved.
Show resolved Hide resolved
format:
json:
- key: "start_time"
value: "%START_TIME%"
address: 127.0.0.1:5000
- type: reference
conf:
- reference:
kind: MeshAccessLogBackend
name: file-backend
```
Expand Down Expand Up @@ -411,8 +413,7 @@ New definition will look like this:
backends:
- name: logstash
format:
type: string
value: '{"start_time": "%START_TIME%"}'
plain: '{"start_time": "%START_TIME%"}'
```

And the new format type could be specified by a `type` parameter with a value of `json`:
Expand All @@ -421,8 +422,7 @@ And the new format type could be specified by a `type` parameter with a value of
backends:
- name: logstash
format:
type: json
value:
json:
- key: "start_time"
value: "%START_TIME%"
```
Expand Down Expand Up @@ -565,17 +565,15 @@ name: logstash-backend
mesh: default
spec:
name: logstash
type: tcp
conf:
tcp:
address: 127.0.0.1:5000
---
type: MeshAccessLogBackend
name: file-backend
mesh: default
spec:
name: file
type: file
conf:
file:
path: /tmp/access.log
---
type: MeshAccessLog
Expand All @@ -591,8 +589,7 @@ spec:
name: default
default:
backends:
- type: reference
conf:
- reference:
kind: MeshAccessLogBackend
name: logstash-backend
to:
Expand All @@ -601,8 +598,7 @@ spec:
name: default
default:
backends:
- type: reference
conf:
- reference:
kind: MeshAccessLogBackend
name: logstash-backend
---
Expand All @@ -619,8 +615,7 @@ spec:
name: web-backend
default:
backends:
- type: reference
conf:
- reference:
kind: MeshAccessLogBackend
name: file-backend
```
Expand Down Expand Up @@ -652,8 +647,7 @@ spec:
kind: Mesh
default:
backends:
- type: tcp
conf:
- tcp:
address: 127.0.0.1:5000
```

Expand All @@ -670,17 +664,15 @@ name: logstash-backend
mesh: default
spec:
name: logstash-zone-a
type: tcp
conf:
tcp:
address: 127.0.0.1:5000
---
type: MeshAccessLogBackend
name: file-backend
mesh: default
spec:
name: logstash-zone-b
type: tcp
conf:
tcp:
address: 127.0.0.2:5000
---
type: MeshAccessLog
Expand All @@ -697,8 +689,7 @@ spec:
name: default
default:
backends:
- type: reference
conf:
- reference:
kind: MeshAccessLogBackend
name: logstash-zone-a
---
Expand All @@ -716,8 +707,7 @@ spec:
name: default
default:
backends:
- type: reference
conf:
- reference:
kind: MeshAccessLogBackend
name: logstash-zone-b
```
2 changes: 1 addition & 1 deletion mk/generate.mk
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ protoc/plugins:

POLICIES_DIR := pkg/plugins/policies

policies = $(foreach dir,$(shell find pkg/plugins/policies -maxdepth 1 -mindepth 1 -type d | grep -v core | grep -v matchers),$(notdir $(dir)))
policies = $(foreach dir,$(shell find pkg/plugins/policies -maxdepth 1 -mindepth 1 -type d | grep -v core | grep -v matchers | sort),$(notdir $(dir)))
slonka marked this conversation as resolved.
Show resolved Hide resolved
generate_policy_targets = $(addprefix generate/policy/,$(policies))
cleanup_policy_targets = $(addprefix cleanup/policy/,$(policies))

Expand Down
Loading