Skip to content

Commit a9ef6e1

Browse files
committed
feat(tenants): introduce aggregationpolicies api to replace logrouting in fluentbit spec
Signed-off-by: Peter Wilcsinszky <[email protected]>
1 parent 3db293a commit a9ef6e1

27 files changed

+807
-286
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
2+
---
3+
apiVersion: apiextensions.k8s.io/v1
4+
kind: CustomResourceDefinition
5+
metadata:
6+
annotations:
7+
controller-gen.kubebuilder.io/version: v0.6.0
8+
creationTimestamp: null
9+
name: aggregationpolicies.logging.banzaicloud.io
10+
spec:
11+
group: logging.banzaicloud.io
12+
names:
13+
categories:
14+
- logging-all
15+
kind: AggregationPolicy
16+
listKind: AggregationPolicyList
17+
plural: aggregationpolicies
18+
shortNames:
19+
- agp
20+
singular: aggregationpolicy
21+
scope: Cluster
22+
versions:
23+
- additionalPrinterColumns:
24+
- description: Number of problems
25+
jsonPath: .status.problemsCount
26+
name: Problems
27+
type: integer
28+
name: v1beta1
29+
schema:
30+
openAPIV3Schema:
31+
properties:
32+
apiVersion:
33+
type: string
34+
kind:
35+
type: string
36+
metadata:
37+
type: object
38+
spec:
39+
properties:
40+
agent:
41+
type: string
42+
loggingRef:
43+
type: string
44+
watchNamespaceTargets:
45+
properties:
46+
matchExpressions:
47+
items:
48+
properties:
49+
key:
50+
type: string
51+
operator:
52+
type: string
53+
values:
54+
items:
55+
type: string
56+
type: array
57+
required:
58+
- key
59+
- operator
60+
type: object
61+
type: array
62+
matchLabels:
63+
additionalProperties:
64+
type: string
65+
type: object
66+
type: object
67+
required:
68+
- loggingRef
69+
- watchNamespaceTargets
70+
type: object
71+
status:
72+
properties:
73+
problems:
74+
items:
75+
type: string
76+
type: array
77+
tenants:
78+
items:
79+
properties:
80+
name:
81+
type: string
82+
namespaces:
83+
items:
84+
type: string
85+
type: array
86+
required:
87+
- name
88+
type: object
89+
type: array
90+
type: object
91+
type: object
92+
served: true
93+
storage: true
94+
subresources:
95+
status: {}
96+
status:
97+
acceptedNames:
98+
kind: ""
99+
plural: ""
100+
conditions: []
101+
storedVersions: []

charts/logging-operator/crds/logging.banzaicloud.io_fluentbitagents.yaml

-28
Original file line numberDiff line numberDiff line change
@@ -1343,34 +1343,6 @@ spec:
13431343
type: object
13441344
logLevel:
13451345
type: string
1346-
logRouting:
1347-
properties:
1348-
targets:
1349-
items:
1350-
properties:
1351-
matchExpressions:
1352-
items:
1353-
properties:
1354-
key:
1355-
type: string
1356-
operator:
1357-
type: string
1358-
values:
1359-
items:
1360-
type: string
1361-
type: array
1362-
required:
1363-
- key
1364-
- operator
1365-
type: object
1366-
type: array
1367-
matchLabels:
1368-
additionalProperties:
1369-
type: string
1370-
type: object
1371-
type: object
1372-
type: array
1373-
type: object
13741346
loggingRef:
13751347
type: string
13761348
metrics:

charts/logging-operator/crds/logging.banzaicloud.io_loggings.yaml

-28
Original file line numberDiff line numberDiff line change
@@ -2332,34 +2332,6 @@ spec:
23322332
type: object
23332333
logLevel:
23342334
type: string
2335-
logRouting:
2336-
properties:
2337-
targets:
2338-
items:
2339-
properties:
2340-
matchExpressions:
2341-
items:
2342-
properties:
2343-
key:
2344-
type: string
2345-
operator:
2346-
type: string
2347-
values:
2348-
items:
2349-
type: string
2350-
type: array
2351-
required:
2352-
- key
2353-
- operator
2354-
type: object
2355-
type: array
2356-
matchLabels:
2357-
additionalProperties:
2358-
type: string
2359-
type: object
2360-
type: object
2361-
type: array
2362-
type: object
23632335
loggingRef:
23642336
type: string
23652337
metrics:

charts/logging-operator/templates/clusterrole.yaml

+20
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,26 @@ rules:
234234
- get
235235
- patch
236236
- update
237+
- apiGroups:
238+
- logging.banzaicloud.io
239+
resources:
240+
- aggregationpolicies
241+
verbs:
242+
- create
243+
- delete
244+
- get
245+
- list
246+
- patch
247+
- update
248+
- watch
249+
- apiGroups:
250+
- logging.banzaicloud.io
251+
resources:
252+
- aggregationpolicies/status
253+
verbs:
254+
- get
255+
- patch
256+
- update
237257
- apiGroups:
238258
- logging.banzaicloud.io
239259
resources:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
2+
---
3+
apiVersion: apiextensions.k8s.io/v1
4+
kind: CustomResourceDefinition
5+
metadata:
6+
annotations:
7+
controller-gen.kubebuilder.io/version: v0.6.0
8+
creationTimestamp: null
9+
name: aggregationpolicies.logging.banzaicloud.io
10+
spec:
11+
group: logging.banzaicloud.io
12+
names:
13+
categories:
14+
- logging-all
15+
kind: AggregationPolicy
16+
listKind: AggregationPolicyList
17+
plural: aggregationpolicies
18+
shortNames:
19+
- agp
20+
singular: aggregationpolicy
21+
scope: Cluster
22+
versions:
23+
- additionalPrinterColumns:
24+
- description: Number of problems
25+
jsonPath: .status.problemsCount
26+
name: Problems
27+
type: integer
28+
name: v1beta1
29+
schema:
30+
openAPIV3Schema:
31+
properties:
32+
apiVersion:
33+
type: string
34+
kind:
35+
type: string
36+
metadata:
37+
type: object
38+
spec:
39+
properties:
40+
agent:
41+
type: string
42+
loggingRef:
43+
type: string
44+
watchNamespaceTargets:
45+
properties:
46+
matchExpressions:
47+
items:
48+
properties:
49+
key:
50+
type: string
51+
operator:
52+
type: string
53+
values:
54+
items:
55+
type: string
56+
type: array
57+
required:
58+
- key
59+
- operator
60+
type: object
61+
type: array
62+
matchLabels:
63+
additionalProperties:
64+
type: string
65+
type: object
66+
type: object
67+
required:
68+
- loggingRef
69+
- watchNamespaceTargets
70+
type: object
71+
status:
72+
properties:
73+
problems:
74+
items:
75+
type: string
76+
type: array
77+
tenants:
78+
items:
79+
properties:
80+
name:
81+
type: string
82+
namespaces:
83+
items:
84+
type: string
85+
type: array
86+
required:
87+
- name
88+
type: object
89+
type: array
90+
type: object
91+
type: object
92+
served: true
93+
storage: true
94+
subresources:
95+
status: {}
96+
status:
97+
acceptedNames:
98+
kind: ""
99+
plural: ""
100+
conditions: []
101+
storedVersions: []

config/crd/bases/logging.banzaicloud.io_fluentbitagents.yaml

-28
Original file line numberDiff line numberDiff line change
@@ -1343,34 +1343,6 @@ spec:
13431343
type: object
13441344
logLevel:
13451345
type: string
1346-
logRouting:
1347-
properties:
1348-
targets:
1349-
items:
1350-
properties:
1351-
matchExpressions:
1352-
items:
1353-
properties:
1354-
key:
1355-
type: string
1356-
operator:
1357-
type: string
1358-
values:
1359-
items:
1360-
type: string
1361-
type: array
1362-
required:
1363-
- key
1364-
- operator
1365-
type: object
1366-
type: array
1367-
matchLabels:
1368-
additionalProperties:
1369-
type: string
1370-
type: object
1371-
type: object
1372-
type: array
1373-
type: object
13741346
loggingRef:
13751347
type: string
13761348
metrics:

config/crd/bases/logging.banzaicloud.io_loggings.yaml

-28
Original file line numberDiff line numberDiff line change
@@ -2332,34 +2332,6 @@ spec:
23322332
type: object
23332333
logLevel:
23342334
type: string
2335-
logRouting:
2336-
properties:
2337-
targets:
2338-
items:
2339-
properties:
2340-
matchExpressions:
2341-
items:
2342-
properties:
2343-
key:
2344-
type: string
2345-
operator:
2346-
type: string
2347-
values:
2348-
items:
2349-
type: string
2350-
type: array
2351-
required:
2352-
- key
2353-
- operator
2354-
type: object
2355-
type: array
2356-
matchLabels:
2357-
additionalProperties:
2358-
type: string
2359-
type: object
2360-
type: object
2361-
type: array
2362-
type: object
23632335
loggingRef:
23642336
type: string
23652337
metrics:

config/rbac/role.yaml

+20
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,26 @@ rules:
234234
- get
235235
- patch
236236
- update
237+
- apiGroups:
238+
- logging.banzaicloud.io
239+
resources:
240+
- aggregationpolicies
241+
verbs:
242+
- create
243+
- delete
244+
- get
245+
- list
246+
- patch
247+
- update
248+
- watch
249+
- apiGroups:
250+
- logging.banzaicloud.io
251+
resources:
252+
- aggregationpolicies/status
253+
verbs:
254+
- get
255+
- patch
256+
- update
237257
- apiGroups:
238258
- logging.banzaicloud.io
239259
resources:

0 commit comments

Comments
 (0)