Skip to content

Commit 9449e2c

Browse files
committed
Merge branch 'main' into switch-to-419-rc
2 parents 45e8b85 + e4aa341 commit 9449e2c

File tree

35 files changed

+861
-174
lines changed

35 files changed

+861
-174
lines changed

assets/components/openshift-router/deployment.yaml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,26 @@ spec:
104104
{{- end }}
105105
{{- if .AccessLoggingEnabled }}
106106
- name: ROUTER_SYSLOG_ADDRESS
107+
{{- if .AccessLoggingSyslogAddress }}
108+
value: '{{ .AccessLoggingSyslogAddress }}'
109+
{{- else }}
107110
value: /var/lib/rsyslog/rsyslog.sock
111+
{{- /* AccessLoggingSyslogAddress*/}}
112+
{{- end }}
108113
- name: ROUTER_LOG_LEVEL
109114
value: info
115+
{{- if .AccessLoggingMaxLength}}
116+
- name: ROUTER_LOG_MAX_LENGTH
117+
value: '{{ .AccessLoggingMaxLength }}'
118+
{{- /* AccessLoggingMaxLength */}}
119+
{{- end }}
120+
{{- if .AccessLoggingSyslogFacility }}
121+
- name: ROUTER_LOG_FACILITY
122+
value: {{ .AccessLoggingSyslogFacility }}
123+
{{- end }}
110124
{{- if .HttpLogFormat }}
111125
- name: ROUTER_SYSLOG_FORMAT
112-
value: '{{ .HttpLogFormat }}'
126+
value: '"{{ .HttpLogFormat }}"'
113127
{{- /* HttpLogFormat */}}
114128
{{- end }}
115129
{{- if .HttpCaptureHeadersRequest }}
@@ -184,7 +198,7 @@ spec:
184198
name: error-code-pages
185199
readOnly: true
186200
{{- end }}
187-
{{- if .AccessLoggingEnabled }}
201+
{{- if and .AccessLoggingEnabled (not .AccessLoggingSyslogAddress) }}
188202
- mountPath: /var/lib/rsyslog
189203
name: rsyslog-socket
190204
readOnly: false
@@ -202,7 +216,7 @@ spec:
202216
protocol: TCP
203217
args:
204218
- -v=4
205-
{{- if .AccessLoggingEnabled }}
219+
{{- if and .AccessLoggingEnabled (not .AccessLoggingSyslogAddress) }}
206220
- name: access-logs
207221
imagePullPolicy: IfNotPresent
208222
terminationMessagePolicy: FallbackToLogsOnError
@@ -261,7 +275,7 @@ spec:
261275
configMap:
262276
name: {{ .HttpErrorCodePages }}
263277
{{- end }}
264-
{{- if .AccessLoggingEnabled }}
278+
{{- if and .AccessLoggingEnabled (not .AccessLoggingSyslogAddress) }}
265279
- name: rsyslog-socket
266280
emptyDir: {}
267281
- name: rsyslog-config

cmd/generate-config/config/config-openapi-spec.json

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,100 @@
173173
"description": "accessLogging describes how the client requests should be logged.",
174174
"type": "object",
175175
"required": [
176+
"destination",
176177
"status"
177178
],
178179
"properties": {
180+
"destination": {
181+
"description": "destination is where access logs go.",
182+
"type": "object",
183+
"required": [
184+
"type"
185+
],
186+
"properties": {
187+
"container": {
188+
"description": "container holds parameters for the Container logging destination.\nPresent only if type is Container.",
189+
"type": "object",
190+
"properties": {
191+
"maxLength": {
192+
"description": "maxLength is the maximum length of the log message.\n\nValid values are integers in the range 480 to 8192, inclusive.\n\nWhen omitted, the default value is 1024.",
193+
"type": "integer",
194+
"format": "int32",
195+
"default": 1024,
196+
"maximum": 8192,
197+
"minimum": 480
198+
}
199+
}
200+
},
201+
"syslog": {
202+
"description": "syslog holds parameters for a syslog endpoint. Present only if\ntype is Syslog.",
203+
"type": "object",
204+
"required": [
205+
"address",
206+
"port"
207+
],
208+
"properties": {
209+
"address": {
210+
"description": "address is the IP address of the syslog endpoint that receives log\nmessages.",
211+
"type": "string"
212+
},
213+
"facility": {
214+
"description": "facility specifies the syslog facility of log messages.\n\nIf this field is empty, the facility is \"local1\".",
215+
"type": "string",
216+
"enum": [
217+
"kern",
218+
"user",
219+
"mail",
220+
"daemon",
221+
"auth",
222+
"syslog",
223+
"lpr",
224+
"news",
225+
"uucp",
226+
"cron",
227+
"auth2",
228+
"ftp",
229+
"ntp",
230+
"audit",
231+
"alert",
232+
"cron2",
233+
"local0",
234+
"local1",
235+
"local2",
236+
"local3",
237+
"local4",
238+
"local5",
239+
"local6",
240+
"local7"
241+
]
242+
},
243+
"maxLength": {
244+
"description": "maxLength is the maximum length of the log message.\n\nValid values are integers in the range 480 to 4096, inclusive.\n\nWhen omitted, the default value is 1024.",
245+
"type": "integer",
246+
"format": "int32",
247+
"default": 1024,
248+
"maximum": 4096,
249+
"minimum": 480
250+
},
251+
"port": {
252+
"description": "port is the UDP port number of the syslog endpoint that receives log\nmessages.",
253+
"type": "integer",
254+
"format": "int32",
255+
"maximum": 65535,
256+
"minimum": 1
257+
}
258+
}
259+
},
260+
"type": {
261+
"description": "type is the type of destination for logs. It must be one of the\nfollowing:\n\n* Container\n\nThe ingress operator configures the sidecar container named \"logs\" on\nthe ingress controller pod and configures the ingress controller to\nwrite logs to the sidecar. The logs are then available as container\nlogs. The expectation is that the administrator configures a custom\nlogging solution that reads logs from this sidecar. Note that using\ncontainer logs means that logs may be dropped if the rate of logs\nexceeds the container runtime's or the custom logging solution's\ncapacity.\n\n* Syslog\n\nLogs are sent to a syslog endpoint. The administrator must specify\nan endpoint that can receive syslog messages. The expectation is\nthat the administrator has configured a custom syslog instance.",
262+
"type": "string",
263+
"enum": [
264+
"Container",
265+
"Syslog"
266+
]
267+
}
268+
}
269+
},
179270
"httpCaptureCookies": {
180271
"description": "httpCaptureCookies specifies HTTP cookies that should be captured in\naccess logs. If this field is empty, no cookies are captured.",
181272
"type": "array",

docs/user/howto_config.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,15 @@ etcd:
3030
memoryLimitMB: 0
3131
ingress:
3232
accessLogging:
33+
destination:
34+
container:
35+
maxLength: 0
36+
syslog:
37+
address: ""
38+
facility: ""
39+
maxLength: 0
40+
port: 0
41+
type: ""
3342
httpCaptureCookies:
3443
- matchType: ""
3544
maxLength: 0
@@ -144,6 +153,15 @@ etcd:
144153
memoryLimitMB: 0
145154
ingress:
146155
accessLogging:
156+
destination:
157+
container:
158+
maxLength: 1024
159+
syslog:
160+
address: ""
161+
facility: ""
162+
maxLength: 1024
163+
port: 0
164+
type: ""
147165
httpCaptureCookies:
148166
- matchType: ""
149167
maxLength: 0

etcd/vendor/github.com/openshift/microshift/pkg/config/config.go

Lines changed: 39 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)