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

Support a Configurable syslog Maximum Message Size for HAProxy #1037

Merged
merged 5 commits into from
Oct 21, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,14 @@ spec:
- local6
- local7
type: string
maxLength:
default: 1024
description: "maxLength is the maximum length of the
syslog message \n If this field is empty, the maxLength
is set to \"1024\"."
format: int32
maximum: 4096
type: integer
port:
description: port is the UDP port number of the syslog
endpoint that receives log messages.
Expand Down
10 changes: 10 additions & 0 deletions operator/v1/types_ingress.go
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,16 @@ type SyslogLoggingDestinationParameters struct {
// +kubebuilder:validation:Enum=kern;user;mail;daemon;auth;syslog;lpr;news;uucp;cron;auth2;ftp;ntp;audit;alert;cron2;local0;local1;local2;local3;local4;local5;local6;local7
// +optional
Facility string `json:"facility,omitempty"`

// maxLength is the maximum length of the syslog message
//
// If this field is empty, the maxLength is set to "1024".
//
// +kubebuilder:validation:Optional
// +kubebuilder:validation:Maximum=4096
// +kubebuilder:default=1024
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we set a reasonable minimum value, or is it reasonable to specify 0?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the RFC-5424, 480 can be set as a reasonable minimum length. WDYT ?

// +optional
MaxLength uint32 `json:"maxLength"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would add omitempty to avoid accidently transferring 0.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed

}

// ContainerLoggingDestinationParameters describes parameters for the Container
Expand Down
9 changes: 5 additions & 4 deletions operator/v1/zz_generated.swagger_doc_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.