Skip to content

Commit

Permalink
preserve unknown fields and fix recursive ParseSection type
Browse files Browse the repository at this point in the history
  • Loading branch information
pepov authored and tarokkk committed Apr 8, 2020
1 parent d8c0c6a commit 1425de8
Show file tree
Hide file tree
Showing 15 changed files with 565 additions and 26 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ OS = $(shell uname | tr A-Z a-z)
# Image URL to use all building/pushing image targets
IMG ?= controller:latest
# Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
CRD_OPTIONS ?= "crd:trivialVersions=true"
CRD_OPTIONS ?= "crd:trivialVersions=true,preserveUnknownFields=false"

KUBEBUILDER_VERSION = 2.2.0
VERSION := $(shell git describe --abbrev=0 --tags)
Expand Down
126 changes: 124 additions & 2 deletions charts/logging-operator/crds/logging.banzaicloud.io_clusterflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ spec:
listKind: ClusterFlowList
plural: clusterflows
singular: clusterflow
preserveUnknownFields: false
scope: Namespaced
validation:
openAPIV3Schema:
Expand Down Expand Up @@ -337,7 +338,67 @@ spec:
type: string
patterns:
description: 'Only available when using type: multi_format'
items: {}
items:
properties:
estimate_current_event:
description: If true, use Fluent::EventTime.now(current
time) as a timestamp when time_key is specified.
type: boolean
expression:
description: Regexp expression to evaluate
type: string
format:
description: 'Only available when using type: multi_format'
type: string
keep_time_key:
description: If true, keep time field in the record.
type: boolean
local_time:
description: 'Ff true, use local time. Otherwise,
UTC is used. This is exclusive with utc. (default:
true)'
type: boolean
null_empty_string:
description: If true, empty string field is replaced
with nil
type: boolean
null_value_pattern:
description: ' Specify null value pattern.'
type: string
time_format:
description: Process value using specified format.
This is available only when time_type is string
type: string
time_key:
description: Specify time field for event time.
If the event doesn't have this field, current
time is used.
type: string
time_type:
description: 'Parse/format value according to this
type available values: float, unixtime, string
(default: string)'
type: string
timezone:
description: 'Use specified timezone. one can parse/format
the time value in the specified timezone. (default:
nil)'
type: string
type:
description: 'Parse type: apache2, apache_error,
nginx, syslog, csv, tsv, ltsv, json, multiline,
none, logfmt'
type: string
types:
description: 'Types casting the fields to proper
types example: field1:type, field2:type'
type: string
utc:
description: 'If true, use UTC. Otherwise, local
time is used. This is exclusive with localtime
(default: false)'
type: boolean
type: object
type: array
time_format:
description: Process value using specified format. This
Expand Down Expand Up @@ -401,7 +462,68 @@ spec:
type: string
patterns:
description: 'Only available when using type: multi_format'
items: {}
items:
properties:
estimate_current_event:
description: If true, use Fluent::EventTime.now(current
time) as a timestamp when time_key is specified.
type: boolean
expression:
description: Regexp expression to evaluate
type: string
format:
description: 'Only available when using type:
multi_format'
type: string
keep_time_key:
description: If true, keep time field in the record.
type: boolean
local_time:
description: 'Ff true, use local time. Otherwise,
UTC is used. This is exclusive with utc. (default:
true)'
type: boolean
null_empty_string:
description: If true, empty string field is replaced
with nil
type: boolean
null_value_pattern:
description: ' Specify null value pattern.'
type: string
time_format:
description: Process value using specified format.
This is available only when time_type is string
type: string
time_key:
description: Specify time field for event time.
If the event doesn't have this field, current
time is used.
type: string
time_type:
description: 'Parse/format value according to
this type available values: float, unixtime,
string (default: string)'
type: string
timezone:
description: 'Use specified timezone. one can
parse/format the time value in the specified
timezone. (default: nil)'
type: string
type:
description: 'Parse type: apache2, apache_error,
nginx, syslog, csv, tsv, ltsv, json, multiline,
none, logfmt'
type: string
types:
description: 'Types casting the fields to proper
types example: field1:type, field2:type'
type: string
utc:
description: 'If true, use UTC. Otherwise, local
time is used. This is exclusive with localtime
(default: false)'
type: boolean
type: object
type: array
time_format:
description: Process value using specified format. This
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ spec:
listKind: ClusterOutputList
plural: clusteroutputs
singular: clusteroutput
preserveUnknownFields: false
scope: Namespaced
validation:
openAPIV3Schema:
Expand Down
126 changes: 124 additions & 2 deletions charts/logging-operator/crds/logging.banzaicloud.io_flows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ spec:
listKind: FlowList
plural: flows
singular: flow
preserveUnknownFields: false
scope: Namespaced
validation:
openAPIV3Schema:
Expand Down Expand Up @@ -337,7 +338,67 @@ spec:
type: string
patterns:
description: 'Only available when using type: multi_format'
items: {}
items:
properties:
estimate_current_event:
description: If true, use Fluent::EventTime.now(current
time) as a timestamp when time_key is specified.
type: boolean
expression:
description: Regexp expression to evaluate
type: string
format:
description: 'Only available when using type: multi_format'
type: string
keep_time_key:
description: If true, keep time field in the record.
type: boolean
local_time:
description: 'Ff true, use local time. Otherwise,
UTC is used. This is exclusive with utc. (default:
true)'
type: boolean
null_empty_string:
description: If true, empty string field is replaced
with nil
type: boolean
null_value_pattern:
description: ' Specify null value pattern.'
type: string
time_format:
description: Process value using specified format.
This is available only when time_type is string
type: string
time_key:
description: Specify time field for event time.
If the event doesn't have this field, current
time is used.
type: string
time_type:
description: 'Parse/format value according to this
type available values: float, unixtime, string
(default: string)'
type: string
timezone:
description: 'Use specified timezone. one can parse/format
the time value in the specified timezone. (default:
nil)'
type: string
type:
description: 'Parse type: apache2, apache_error,
nginx, syslog, csv, tsv, ltsv, json, multiline,
none, logfmt'
type: string
types:
description: 'Types casting the fields to proper
types example: field1:type, field2:type'
type: string
utc:
description: 'If true, use UTC. Otherwise, local
time is used. This is exclusive with localtime
(default: false)'
type: boolean
type: object
type: array
time_format:
description: Process value using specified format. This
Expand Down Expand Up @@ -401,7 +462,68 @@ spec:
type: string
patterns:
description: 'Only available when using type: multi_format'
items: {}
items:
properties:
estimate_current_event:
description: If true, use Fluent::EventTime.now(current
time) as a timestamp when time_key is specified.
type: boolean
expression:
description: Regexp expression to evaluate
type: string
format:
description: 'Only available when using type:
multi_format'
type: string
keep_time_key:
description: If true, keep time field in the record.
type: boolean
local_time:
description: 'Ff true, use local time. Otherwise,
UTC is used. This is exclusive with utc. (default:
true)'
type: boolean
null_empty_string:
description: If true, empty string field is replaced
with nil
type: boolean
null_value_pattern:
description: ' Specify null value pattern.'
type: string
time_format:
description: Process value using specified format.
This is available only when time_type is string
type: string
time_key:
description: Specify time field for event time.
If the event doesn't have this field, current
time is used.
type: string
time_type:
description: 'Parse/format value according to
this type available values: float, unixtime,
string (default: string)'
type: string
timezone:
description: 'Use specified timezone. one can
parse/format the time value in the specified
timezone. (default: nil)'
type: string
type:
description: 'Parse type: apache2, apache_error,
nginx, syslog, csv, tsv, ltsv, json, multiline,
none, logfmt'
type: string
types:
description: 'Types casting the fields to proper
types example: field1:type, field2:type'
type: string
utc:
description: 'If true, use UTC. Otherwise, local
time is used. This is exclusive with localtime
(default: false)'
type: boolean
type: object
type: array
time_format:
description: Process value using specified format. This
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ spec:
listKind: LoggingList
plural: loggings
singular: logging
preserveUnknownFields: false
scope: Cluster
subresources:
status: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ spec:
listKind: OutputList
plural: outputs
singular: output
preserveUnknownFields: false
scope: Namespaced
validation:
openAPIV3Schema:
Expand Down
Loading

0 comments on commit 1425de8

Please sign in to comment.