Skip to content

Commit 242ce08

Browse files
committed
LOG-6661: fix inconsistency for syslog facillity and severity templating
1 parent 0339415 commit 242ce08

File tree

6 files changed

+362
-20
lines changed

6 files changed

+362
-20
lines changed

api/observability/v1/output_types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,6 +1083,7 @@ type Syslog struct {
10831083
// Emergency Alert Critical Error Warning Notice Informational Debug
10841084
//
10851085
// +kubebuilder:validation:Optional
1086+
// +kubebuilder:validation:Pattern:=`^\{(\.[a-zA-Z0-9_]+|\."[^"]+")(\.[a-zA-Z0-9_]+|\."[^"]+")*\}$`
10861087
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Severity",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:text"}
10871088
Severity string `json:"severity,omitempty"`
10881089

@@ -1099,6 +1100,7 @@ type Syslog struct {
10991100
// local0 local1 local2 local3 local4 local5 local6 local7
11001101
//
11011102
// +kubebuilder:validation:Optional
1103+
// +kubebuilder:validation:Pattern:=`^\{(\.[a-zA-Z0-9_]+|\."[^"]+")(\.[a-zA-Z0-9_]+|\."[^"]+")*\}$`
11021104
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Facility",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:text"}
11031105
Facility string `json:"facility,omitempty"`
11041106

config/crd/bases/observability.openshift.io_clusterlogforwarders.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2359,6 +2359,7 @@ spec:
23592359
kernel user mail daemon auth syslog lpr news
23602360
uucp cron authpriv ftp ntp security console solaris-cron
23612361
local0 local1 local2 local3 local4 local5 local6 local7
2362+
pattern: ^\{(\.[a-zA-Z0-9_]+|\."[^"]+")(\.[a-zA-Z0-9_]+|\."[^"]+")*\}$
23622363
type: string
23632364
msgId:
23642365
description: |-
@@ -2437,6 +2438,7 @@ spec:
24372438
The value can be a decimal integer or one of these case-insensitive keywords:
24382439
24392440
Emergency Alert Critical Error Warning Notice Informational Debug
2441+
pattern: ^\{(\.[a-zA-Z0-9_]+|\."[^"]+")(\.[a-zA-Z0-9_]+|\."[^"]+")*\}$
24402442
type: string
24412443
tuning:
24422444
description: Tuning specs tuning for the output

0 commit comments

Comments
 (0)