Skip to content

Commit 1425de8

Browse files
pepovtarokkk
authored andcommitted
preserve unknown fields and fix recursive ParseSection type
1 parent d8c0c6a commit 1425de8

15 files changed

+565
-26
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ OS = $(shell uname | tr A-Z a-z)
66
# Image URL to use all building/pushing image targets
77
IMG ?= controller:latest
88
# Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
9-
CRD_OPTIONS ?= "crd:trivialVersions=true"
9+
CRD_OPTIONS ?= "crd:trivialVersions=true,preserveUnknownFields=false"
1010

1111
KUBEBUILDER_VERSION = 2.2.0
1212
VERSION := $(shell git describe --abbrev=0 --tags)

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

Lines changed: 124 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ spec:
1616
listKind: ClusterFlowList
1717
plural: clusterflows
1818
singular: clusterflow
19+
preserveUnknownFields: false
1920
scope: Namespaced
2021
validation:
2122
openAPIV3Schema:
@@ -337,7 +338,67 @@ spec:
337338
type: string
338339
patterns:
339340
description: 'Only available when using type: multi_format'
340-
items: {}
341+
items:
342+
properties:
343+
estimate_current_event:
344+
description: If true, use Fluent::EventTime.now(current
345+
time) as a timestamp when time_key is specified.
346+
type: boolean
347+
expression:
348+
description: Regexp expression to evaluate
349+
type: string
350+
format:
351+
description: 'Only available when using type: multi_format'
352+
type: string
353+
keep_time_key:
354+
description: If true, keep time field in the record.
355+
type: boolean
356+
local_time:
357+
description: 'Ff true, use local time. Otherwise,
358+
UTC is used. This is exclusive with utc. (default:
359+
true)'
360+
type: boolean
361+
null_empty_string:
362+
description: If true, empty string field is replaced
363+
with nil
364+
type: boolean
365+
null_value_pattern:
366+
description: ' Specify null value pattern.'
367+
type: string
368+
time_format:
369+
description: Process value using specified format.
370+
This is available only when time_type is string
371+
type: string
372+
time_key:
373+
description: Specify time field for event time.
374+
If the event doesn't have this field, current
375+
time is used.
376+
type: string
377+
time_type:
378+
description: 'Parse/format value according to this
379+
type available values: float, unixtime, string
380+
(default: string)'
381+
type: string
382+
timezone:
383+
description: 'Use specified timezone. one can parse/format
384+
the time value in the specified timezone. (default:
385+
nil)'
386+
type: string
387+
type:
388+
description: 'Parse type: apache2, apache_error,
389+
nginx, syslog, csv, tsv, ltsv, json, multiline,
390+
none, logfmt'
391+
type: string
392+
types:
393+
description: 'Types casting the fields to proper
394+
types example: field1:type, field2:type'
395+
type: string
396+
utc:
397+
description: 'If true, use UTC. Otherwise, local
398+
time is used. This is exclusive with localtime
399+
(default: false)'
400+
type: boolean
401+
type: object
341402
type: array
342403
time_format:
343404
description: Process value using specified format. This
@@ -401,7 +462,68 @@ spec:
401462
type: string
402463
patterns:
403464
description: 'Only available when using type: multi_format'
404-
items: {}
465+
items:
466+
properties:
467+
estimate_current_event:
468+
description: If true, use Fluent::EventTime.now(current
469+
time) as a timestamp when time_key is specified.
470+
type: boolean
471+
expression:
472+
description: Regexp expression to evaluate
473+
type: string
474+
format:
475+
description: 'Only available when using type:
476+
multi_format'
477+
type: string
478+
keep_time_key:
479+
description: If true, keep time field in the record.
480+
type: boolean
481+
local_time:
482+
description: 'Ff true, use local time. Otherwise,
483+
UTC is used. This is exclusive with utc. (default:
484+
true)'
485+
type: boolean
486+
null_empty_string:
487+
description: If true, empty string field is replaced
488+
with nil
489+
type: boolean
490+
null_value_pattern:
491+
description: ' Specify null value pattern.'
492+
type: string
493+
time_format:
494+
description: Process value using specified format.
495+
This is available only when time_type is string
496+
type: string
497+
time_key:
498+
description: Specify time field for event time.
499+
If the event doesn't have this field, current
500+
time is used.
501+
type: string
502+
time_type:
503+
description: 'Parse/format value according to
504+
this type available values: float, unixtime,
505+
string (default: string)'
506+
type: string
507+
timezone:
508+
description: 'Use specified timezone. one can
509+
parse/format the time value in the specified
510+
timezone. (default: nil)'
511+
type: string
512+
type:
513+
description: 'Parse type: apache2, apache_error,
514+
nginx, syslog, csv, tsv, ltsv, json, multiline,
515+
none, logfmt'
516+
type: string
517+
types:
518+
description: 'Types casting the fields to proper
519+
types example: field1:type, field2:type'
520+
type: string
521+
utc:
522+
description: 'If true, use UTC. Otherwise, local
523+
time is used. This is exclusive with localtime
524+
(default: false)'
525+
type: boolean
526+
type: object
405527
type: array
406528
time_format:
407529
description: Process value using specified format. This

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ spec:
1616
listKind: ClusterOutputList
1717
plural: clusteroutputs
1818
singular: clusteroutput
19+
preserveUnknownFields: false
1920
scope: Namespaced
2021
validation:
2122
openAPIV3Schema:

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

Lines changed: 124 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ spec:
1616
listKind: FlowList
1717
plural: flows
1818
singular: flow
19+
preserveUnknownFields: false
1920
scope: Namespaced
2021
validation:
2122
openAPIV3Schema:
@@ -337,7 +338,67 @@ spec:
337338
type: string
338339
patterns:
339340
description: 'Only available when using type: multi_format'
340-
items: {}
341+
items:
342+
properties:
343+
estimate_current_event:
344+
description: If true, use Fluent::EventTime.now(current
345+
time) as a timestamp when time_key is specified.
346+
type: boolean
347+
expression:
348+
description: Regexp expression to evaluate
349+
type: string
350+
format:
351+
description: 'Only available when using type: multi_format'
352+
type: string
353+
keep_time_key:
354+
description: If true, keep time field in the record.
355+
type: boolean
356+
local_time:
357+
description: 'Ff true, use local time. Otherwise,
358+
UTC is used. This is exclusive with utc. (default:
359+
true)'
360+
type: boolean
361+
null_empty_string:
362+
description: If true, empty string field is replaced
363+
with nil
364+
type: boolean
365+
null_value_pattern:
366+
description: ' Specify null value pattern.'
367+
type: string
368+
time_format:
369+
description: Process value using specified format.
370+
This is available only when time_type is string
371+
type: string
372+
time_key:
373+
description: Specify time field for event time.
374+
If the event doesn't have this field, current
375+
time is used.
376+
type: string
377+
time_type:
378+
description: 'Parse/format value according to this
379+
type available values: float, unixtime, string
380+
(default: string)'
381+
type: string
382+
timezone:
383+
description: 'Use specified timezone. one can parse/format
384+
the time value in the specified timezone. (default:
385+
nil)'
386+
type: string
387+
type:
388+
description: 'Parse type: apache2, apache_error,
389+
nginx, syslog, csv, tsv, ltsv, json, multiline,
390+
none, logfmt'
391+
type: string
392+
types:
393+
description: 'Types casting the fields to proper
394+
types example: field1:type, field2:type'
395+
type: string
396+
utc:
397+
description: 'If true, use UTC. Otherwise, local
398+
time is used. This is exclusive with localtime
399+
(default: false)'
400+
type: boolean
401+
type: object
341402
type: array
342403
time_format:
343404
description: Process value using specified format. This
@@ -401,7 +462,68 @@ spec:
401462
type: string
402463
patterns:
403464
description: 'Only available when using type: multi_format'
404-
items: {}
465+
items:
466+
properties:
467+
estimate_current_event:
468+
description: If true, use Fluent::EventTime.now(current
469+
time) as a timestamp when time_key is specified.
470+
type: boolean
471+
expression:
472+
description: Regexp expression to evaluate
473+
type: string
474+
format:
475+
description: 'Only available when using type:
476+
multi_format'
477+
type: string
478+
keep_time_key:
479+
description: If true, keep time field in the record.
480+
type: boolean
481+
local_time:
482+
description: 'Ff true, use local time. Otherwise,
483+
UTC is used. This is exclusive with utc. (default:
484+
true)'
485+
type: boolean
486+
null_empty_string:
487+
description: If true, empty string field is replaced
488+
with nil
489+
type: boolean
490+
null_value_pattern:
491+
description: ' Specify null value pattern.'
492+
type: string
493+
time_format:
494+
description: Process value using specified format.
495+
This is available only when time_type is string
496+
type: string
497+
time_key:
498+
description: Specify time field for event time.
499+
If the event doesn't have this field, current
500+
time is used.
501+
type: string
502+
time_type:
503+
description: 'Parse/format value according to
504+
this type available values: float, unixtime,
505+
string (default: string)'
506+
type: string
507+
timezone:
508+
description: 'Use specified timezone. one can
509+
parse/format the time value in the specified
510+
timezone. (default: nil)'
511+
type: string
512+
type:
513+
description: 'Parse type: apache2, apache_error,
514+
nginx, syslog, csv, tsv, ltsv, json, multiline,
515+
none, logfmt'
516+
type: string
517+
types:
518+
description: 'Types casting the fields to proper
519+
types example: field1:type, field2:type'
520+
type: string
521+
utc:
522+
description: 'If true, use UTC. Otherwise, local
523+
time is used. This is exclusive with localtime
524+
(default: false)'
525+
type: boolean
526+
type: object
405527
type: array
406528
time_format:
407529
description: Process value using specified format. This

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ spec:
1616
listKind: LoggingList
1717
plural: loggings
1818
singular: logging
19+
preserveUnknownFields: false
1920
scope: Cluster
2021
subresources:
2122
status: {}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ spec:
1616
listKind: OutputList
1717
plural: outputs
1818
singular: output
19+
preserveUnknownFields: false
1920
scope: Namespaced
2021
validation:
2122
openAPIV3Schema:

0 commit comments

Comments
 (0)