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

Remove deprecated preview policy flag #4595

Merged
merged 3 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion charts/nginx-ingress/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,6 @@ The following tables lists the configurable parameters of the NGINX Ingress Cont
|`controller.watchNamespaceLabel` | Configures the Ingress Controller to watch only those namespaces with label foo=bar. By default the Ingress Controller watches all namespaces. Mutually exclusive with `controller.watchNamespace`. | "" |
|`controller.watchSecretNamespace` | Comma separated list of namespaces the Ingress Controller should watch for resources of type Secret. If this arg is not configured, the Ingress Controller watches the same namespaces for all resources. See `controller.watchNamespace` and `controller.watchNamespaceLabel`. Please note that if configuring multiple namespaces using the Helm cli `--set` option, the string needs to wrapped in double quotes and the commas escaped using a backslash - e.g. `--set controller.watchSecretNamespace="default\,nginx-ingress"`. | "" |
|`controller.enableCustomResources` | Enable the custom resources. | true |
|`controller.enablePreviewPolicies` | Enable preview policies. This parameter is deprecated. To enable OIDC Policies please use `controller.enableOIDC` instead. | false |
|`controller.enableOIDC` | Enable OIDC policies. | false |
|`controller.enableTLSPassthrough` | Enable TLS Passthrough on default port 443. Requires `controller.enableCustomResources`. | false |
|`controller.tlsPassThroughPort` | Set the port for the TLS Passthrough. Requires `controller.enableCustomResources` and `controller.enableTLSPassthrough`. | 443 |
Expand Down
1 change: 0 additions & 1 deletion charts/nginx-ingress/templates/controller-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ spec:
{{ if .Values.controller.enableTLSPassthrough }}
- -tls-passthrough-port={{ .Values.controller.tlsPassthroughPort }}
{{ end }}
- -enable-preview-policies={{ .Values.controller.enablePreviewPolicies }}
- -enable-cert-manager={{ .Values.controller.enableCertManager }}
- -enable-oidc={{ .Values.controller.enableOIDC }}
- -enable-external-dns={{ .Values.controller.enableExternalDNS }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ spec:
{{ if .Values.controller.enableTLSPassthrough }}
- -tls-passthrough-port={{ .Values.controller.tlsPassthroughPort }}
{{ end }}
- -enable-preview-policies={{ .Values.controller.enablePreviewPolicies }}
- -enable-cert-manager={{ .Values.controller.enableCertManager }}
- -enable-oidc={{ .Values.controller.enableOIDC }}
- -enable-external-dns={{ .Values.controller.enableExternalDNS }}
Expand Down
10 changes: 0 additions & 10 deletions charts/nginx-ingress/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -632,14 +632,6 @@
true
]
},
"enablePreviewPolicies": {
"type": "boolean",
"default": false,
"title": "The enablePreviewPolicies",
"examples": [
false
]
},
"enableOIDC": {
"type": "boolean",
"default": false,
Expand Down Expand Up @@ -1354,7 +1346,6 @@
"setAsDefaultIngress": false,
"watchNamespace": "",
"enableCustomResources": true,
"enablePreviewPolicies": false,
"enableOIDC": false,
"includeYear": false,
"enableTLSPassthrough": false,
Expand Down Expand Up @@ -1720,7 +1711,6 @@
"setAsDefaultIngress": false,
"watchNamespace": "",
"enableCustomResources": true,
"enablePreviewPolicies": false,
"enableOIDC": false,
"includeYear": false,
"enableTLSPassthrough": false,
Expand Down
3 changes: 0 additions & 3 deletions charts/nginx-ingress/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,6 @@ controller:
## Enable the custom resources.
enableCustomResources: true

## Enable preview policies. This parameter is deprecated. To enable OIDC Policies please use controller.enableOIDC instead.
enablePreviewPolicies: false

## Enable OIDC policies.
enableOIDC: false

Expand Down
8 changes: 0 additions & 8 deletions cmd/nginx-ingress/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,6 @@ var (
enableCustomResources = flag.Bool("enable-custom-resources", true,
"Enable custom resources")

enablePreviewPolicies = flag.Bool("enable-preview-policies", false,
"Enable preview policies. This flag is deprecated. To enable OIDC Policies please use -enable-oidc instead.")

enableOIDC = flag.Bool("enable-oidc", false,
"Enable OIDC Policies.")

Expand Down Expand Up @@ -219,11 +216,6 @@ func parseFlags() {
glog.Fatal("enable-tls-passthrough flag requires -enable-custom-resources")
}

if *enablePreviewPolicies {
glog.Warning("enable-preview-policies is universally deprecated. To enable OIDC Policies please use -enable-oidc instead.")
}
*enableOIDC = *enablePreviewPolicies || *enableOIDC

if *appProtect && !*nginxPlus {
glog.Fatal("NGINX App Protect support is for NGINX Plus only")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,6 @@ Enables custom resources.

Default `true`.
 
<a name="cmdoption-enable-preview-policies"></a>

### -enable-preview-policies

Enables preview policies. This flag is deprecated. To enable OIDC Policies please use [-enable-oidc](#cmdoption-enable-oidc) instead.

Default `false`.
&nbsp;
<a name="cmdoption-enable-oidc"></a>

### -enable-oidc
Expand Down
2 changes: 0 additions & 2 deletions tests/suite/test_auth_basic_policies.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
def to_base64(b64_string):
return b64encode(b64_string.encode("ascii")).decode("ascii")


shaun-nx marked this conversation as resolved.
Show resolved Hide resolved
@pytest.mark.policies
@pytest.mark.parametrize(
"crd_ingress_controller, virtual_server_setup",
Expand All @@ -59,7 +58,6 @@ def to_base64(b64_string):
"type": "complete",
"extra_args": [
f"-enable-custom-resources",
f"-enable-preview-policies",
f"-enable-leader-election=false",
],
},
Expand Down
2 changes: 0 additions & 2 deletions tests/suite/test_auth_basic_policies_vsr.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
def to_base64(b64_string):
return b64encode(b64_string.encode("ascii")).decode("ascii")


@pytest.mark.policies
@pytest.mark.parametrize(
"crd_ingress_controller, v_s_route_setup",
Expand All @@ -49,7 +48,6 @@ def to_base64(b64_string):
"type": "complete",
"extra_args": [
f"-enable-custom-resources",
f"-enable-preview-policies",
f"-enable-leader-election=false",
],
},
Expand Down
Loading