Skip to content

Commit fdbc638

Browse files
committed
Change Disabled=>Disable
1 parent 0b042a3 commit fdbc638

File tree

12 files changed

+31
-31
lines changed

12 files changed

+31
-31
lines changed

apis/v1alpha2/nginxproxy_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,10 +360,10 @@ const (
360360

361361
// NginxAccessLog defines the configuration for an NGINX access log.
362362
type NginxAccessLog struct {
363-
// Disabled turns off access logging when set to true.
363+
// Disable turns off access logging when set to true.
364364
//
365365
// +optional
366-
Disabled *bool `json:"disabled,omitempty"`
366+
Disable *bool `json:"disable,omitempty"`
367367

368368
// Format specifies the custom log format string.
369369
// If not specified, NGINX default 'combined' format is used.

apis/v1alpha2/zz_generated.deepcopy.go

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

charts/nginx-gateway-fabric/values.schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@
205205
"accessLog": {
206206
"description": "AccessLog defines the access log settings.",
207207
"properties": {
208-
"disabled": {
209-
"description": "Disabled turns off access logging when set to true.",
208+
"disable": {
209+
"description": "Disable turns off access logging when set to true.",
210210
"required": [],
211211
"type": "boolean"
212212
},

charts/nginx-gateway-fabric/values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,9 +475,9 @@ nginx:
475475
# type: object
476476
# description: AccessLog defines the access log settings.
477477
# properties:
478-
# disabled:
478+
# disable:
479479
# type: boolean
480-
# description: Disabled turns off access logging when set to true.
480+
# description: Disable turns off access logging when set to true.
481481
# format:
482482
# type: string
483483
# description: Format specifies the custom log format string. If not specified, NGINX default 'combined' format is used.

config/crd/bases/gateway.nginx.org_nginxproxies.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8021,8 +8021,8 @@ spec:
80218021
AccessLog defines the access log settings, including format itself and disabling option.
80228022
For now only path /dev/stdout can be used.
80238023
properties:
8024-
disabled:
8025-
description: Disabled turns off access logging when set to
8024+
disable:
8025+
description: Disable turns off access logging when set to
80268026
true.
80278027
type: boolean
80288028
format:

deploy/crds.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8608,8 +8608,8 @@ spec:
86088608
AccessLog defines the access log settings, including format itself and disabling option.
86098609
For now only path /dev/stdout can be used.
86108610
properties:
8611-
disabled:
8612-
description: Disabled turns off access logging when set to
8611+
disable:
8612+
description: Disable turns off access logging when set to
86138613
true.
86148614
type: boolean
86158615
format:

internal/controller/nginx/config/base_http_config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type AccessLog struct {
1414
Format string // User's format string
1515
Path string // Where to write logs (/dev/stdout)
1616
FormatName string // Internal format name (ngf_user_defined_log_format)
17-
Disabled bool // User's disabled flag
17+
Disable bool // User's disable flag
1818
}
1919
type httpConfig struct {
2020
DNSResolver *dataplane.DNSResolverConfig
@@ -56,7 +56,7 @@ func buildAccessLog(accessLogConfig *dataplane.AccessLog) *AccessLog {
5656
if accessLogConfig.Format != "" {
5757
accessLog.Format = accessLogConfig.Format
5858
}
59-
accessLog.Disabled = accessLogConfig.Disabled
59+
accessLog.Disable = accessLogConfig.Disable
6060

6161
return accessLog
6262
}

internal/controller/nginx/config/base_http_config_template.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ server {
5151
{{- /* Define custom log format */ -}}
5252
{{- /* We use a fixed name for user-defined log format to avoid complexity of passing the name around. */ -}}
5353
{{- if .AccessLog }}
54-
{{- if .AccessLog.Disabled }}
54+
{{- if .AccessLog.Disable }}
5555
access_log off;
5656
{{- else }}
5757
{{- if .AccessLog.Format }}

internal/controller/nginx/config/base_http_config_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func TestLoggingSettingsTemplate(t *testing.T) {
4040
},
4141
{
4242
name: "Access log off while format presented",
43-
accessLog: &dataplane.AccessLog{Disabled: true, Format: logFormat},
43+
accessLog: &dataplane.AccessLog{Disable: true, Format: logFormat},
4444
expectedOutputs: []string{
4545
`access_log off;`,
4646
},
@@ -50,7 +50,7 @@ func TestLoggingSettingsTemplate(t *testing.T) {
5050
},
5151
{
5252
name: "Access log off",
53-
accessLog: &dataplane.AccessLog{Disabled: true},
53+
accessLog: &dataplane.AccessLog{Disable: true},
5454
expectedOutputs: []string{
5555
`access_log off;`,
5656
},

internal/controller/state/dataplane/configuration.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1237,8 +1237,8 @@ func buildLogging(gateway *graph.Gateway) Logging {
12371237

12381238
func buildAccessLog(srcLogSettings *ngfAPIv1alpha2.NginxLogging) *AccessLog {
12391239
if srcLogSettings.AccessLog != nil {
1240-
if srcLogSettings.AccessLog.Disabled != nil && *srcLogSettings.AccessLog.Disabled {
1241-
return &AccessLog{Disabled: true}
1240+
if srcLogSettings.AccessLog.Disable != nil && *srcLogSettings.AccessLog.Disable {
1241+
return &AccessLog{Disable: true}
12421242
}
12431243

12441244
if srcLogSettings.AccessLog.Format != nil && *srcLogSettings.AccessLog.Format != "" {

0 commit comments

Comments
 (0)