From 5cb601a3e22b5c3916e1620fdda410cb15749144 Mon Sep 17 00:00:00 2001 From: Dean Coakley Date: Fri, 29 Nov 2019 15:54:23 +0000 Subject: [PATCH 1/3] Enable CRDs by default --- deployments/daemon-set/nginx-ingress.yaml | 2 +- deployments/daemon-set/nginx-plus-ingress.yaml | 2 +- deployments/deployment/nginx-ingress.yaml | 2 +- deployments/deployment/nginx-plus-ingress.yaml | 2 +- deployments/helm-chart/README.md | 2 +- deployments/helm-chart/values.yaml | 2 +- docs/installation.md | 3 ++- 7 files changed, 8 insertions(+), 7 deletions(-) diff --git a/deployments/daemon-set/nginx-ingress.yaml b/deployments/daemon-set/nginx-ingress.yaml index 6bef5c9ca3..af8da35523 100644 --- a/deployments/daemon-set/nginx-ingress.yaml +++ b/deployments/daemon-set/nginx-ingress.yaml @@ -49,9 +49,9 @@ spec: args: - -nginx-configmaps=$(POD_NAMESPACE)/nginx-config - -default-server-tls-secret=$(POD_NAMESPACE)/default-server-secret + - -enable-custom-resources #- -v=3 # Enables extensive logging. Useful for troubleshooting. #- -report-ingress-status #- -external-service=nginx-ingress #- -enable-leader-election #- -enable-prometheus-metrics - #- -enable-custom-resources diff --git a/deployments/daemon-set/nginx-plus-ingress.yaml b/deployments/daemon-set/nginx-plus-ingress.yaml index 2086ae3ea1..77c5bd9bdd 100644 --- a/deployments/daemon-set/nginx-plus-ingress.yaml +++ b/deployments/daemon-set/nginx-plus-ingress.yaml @@ -50,9 +50,9 @@ spec: - -nginx-plus - -nginx-configmaps=$(POD_NAMESPACE)/nginx-config - -default-server-tls-secret=$(POD_NAMESPACE)/default-server-secret + - -enable-custom-resources #- -v=3 # Enables extensive logging. Useful for troubleshooting. #- -report-ingress-status #- -external-service=nginx-ingress #- -enable-leader-election #- -enable-prometheus-metrics - #- -enable-custom-resources diff --git a/deployments/deployment/nginx-ingress.yaml b/deployments/deployment/nginx-ingress.yaml index bcf712d64f..43cc7a2ac1 100644 --- a/deployments/deployment/nginx-ingress.yaml +++ b/deployments/deployment/nginx-ingress.yaml @@ -48,9 +48,9 @@ spec: args: - -nginx-configmaps=$(POD_NAMESPACE)/nginx-config - -default-server-tls-secret=$(POD_NAMESPACE)/default-server-secret + - -enable-custom-resources #- -v=3 # Enables extensive logging. Useful for troubleshooting. #- -report-ingress-status #- -external-service=nginx-ingress #- -enable-leader-election #- -enable-prometheus-metrics - #- -enable-custom-resources diff --git a/deployments/deployment/nginx-plus-ingress.yaml b/deployments/deployment/nginx-plus-ingress.yaml index 51d2ba6a19..21f9db842f 100644 --- a/deployments/deployment/nginx-plus-ingress.yaml +++ b/deployments/deployment/nginx-plus-ingress.yaml @@ -49,9 +49,9 @@ spec: - -nginx-plus - -nginx-configmaps=$(POD_NAMESPACE)/nginx-config - -default-server-tls-secret=$(POD_NAMESPACE)/default-server-secret + - -enable-custom-resources #- -v=3 # Enables extensive logging. Useful for troubleshooting. #- -report-ingress-status #- -external-service=nginx-ingress #- -enable-leader-election #- -enable-prometheus-metrics - #- -enable-custom-resources diff --git a/deployments/helm-chart/README.md b/deployments/helm-chart/README.md index 79b405a165..e08b0095c9 100644 --- a/deployments/helm-chart/README.md +++ b/deployments/helm-chart/README.md @@ -84,7 +84,7 @@ Parameter | Description | Default `controller.ingressClass` | A class of the Ingress controller. The Ingress controller only processes Ingress resources that belong to its class - i.e. have the annotation `"kubernetes.io/ingress.class"` equal to the class. Additionally, the Ingress controller processes Ingress resources that do not have that annotation which can be disabled by setting the "-use-ingress-class-only" flag. | nginx `controller.useIngressClassOnly` | Ignore Ingress resources without the `"kubernetes.io/ingress.class"` annotation. | false `controller.watchNamespace` | Namespace to watch for Ingress resources. By default the Ingress controller watches all namespaces. | "" -`controller.enableCustomResources` | Enable the custom resources. | false +`controller.enableCustomResources` | Enable the custom resources. | true `controller.healthStatus` | Add a location "/nginx-health" to the default server. The location responds with the 200 status code for any request. Useful for external health-checking of the Ingress controller. | false `controller.healthStatusURI` | Sets the URI of health status location in the default server. Requires `contoller.healthStatus`. | "/nginx-health" `controller.nginxStatus.enable` | Enable the NGINX stub_status, or the NGINX Plus API. | true diff --git a/deployments/helm-chart/values.yaml b/deployments/helm-chart/values.yaml index 68006080e2..e63b21c5bf 100644 --- a/deployments/helm-chart/values.yaml +++ b/deployments/helm-chart/values.yaml @@ -104,7 +104,7 @@ controller: watchNamespace: "" ## Enable the custom resources. - enableCustomResources: false + enableCustomResources: true ## Add a location based on the value of health-status-uri to the default server. The location responds with the 200 status code for any request. ## Useful for external health-checking of the Ingress controller. diff --git a/docs/installation.md b/docs/installation.md index e3a59481d3..41acca1cdb 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -32,7 +32,8 @@ The installation manifests are located in the [deployments](../deployments) fold ``` $ kubectl apply -f common/custom-resource-definitions.yaml ``` - Note: in Step 3, make sure the Ingress controller starts with the `-enable-custom-resources` [command-line argument](cli-arguments.md). + + **Note**: If you want to use the ingress resource instead, you must skip this step. Additionally in Step 3 remove the `-enable-custom-resources` [command-line argument](cli-arguments.md). ## 2. Configure RBAC From c9b7d84688e8c435617f375cbb1680fe38142768 Mon Sep 17 00:00:00 2001 From: Dean Coakley Date: Fri, 29 Nov 2019 16:34:34 +0000 Subject: [PATCH 2/3] Remove invalid note --- docs/installation.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/installation.md b/docs/installation.md index 41acca1cdb..24907c5ad3 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -33,8 +33,6 @@ The installation manifests are located in the [deployments](../deployments) fold $ kubectl apply -f common/custom-resource-definitions.yaml ``` - **Note**: If you want to use the ingress resource instead, you must skip this step. Additionally in Step 3 remove the `-enable-custom-resources` [command-line argument](cli-arguments.md). - ## 2. Configure RBAC If RBAC is enabled in your cluster, create a cluster role and bind it to the service account, created in Step 1: From 2db373fa5eb99d5fb5a6f38a19dcce5929c3ee78 Mon Sep 17 00:00:00 2001 From: Dean Coakley Date: Wed, 4 Dec 2019 15:41:20 -0800 Subject: [PATCH 3/3] Use CRDs by default. Remove arg from manifests Update docs --- cmd/nginx-ingress/main.go | 2 +- deployments/daemon-set/nginx-ingress.yaml | 1 - deployments/daemon-set/nginx-plus-ingress.yaml | 1 - deployments/deployment/nginx-ingress.yaml | 1 - deployments/deployment/nginx-plus-ingress.yaml | 1 - docs/cli-arguments.md | 2 +- docs/installation.md | 2 +- docs/virtualserver-and-virtualserverroute.md | 2 -- 8 files changed, 3 insertions(+), 9 deletions(-) diff --git a/cmd/nginx-ingress/main.go b/cmd/nginx-ingress/main.go index 97638c10d4..3e27c77b96 100644 --- a/cmd/nginx-ingress/main.go +++ b/cmd/nginx-ingress/main.go @@ -124,7 +124,7 @@ The external address of the service is used when reporting the status of Ingress prometheusMetricsListenPort = flag.Int("prometheus-metrics-listen-port", 9113, "Set the port where the Prometheus metrics are exposed. [1023 - 65535]") - enableCustomResources = flag.Bool("enable-custom-resources", false, + enableCustomResources = flag.Bool("enable-custom-resources", true, "Enable custom resources") ) diff --git a/deployments/daemon-set/nginx-ingress.yaml b/deployments/daemon-set/nginx-ingress.yaml index af8da35523..6488875c2d 100644 --- a/deployments/daemon-set/nginx-ingress.yaml +++ b/deployments/daemon-set/nginx-ingress.yaml @@ -49,7 +49,6 @@ spec: args: - -nginx-configmaps=$(POD_NAMESPACE)/nginx-config - -default-server-tls-secret=$(POD_NAMESPACE)/default-server-secret - - -enable-custom-resources #- -v=3 # Enables extensive logging. Useful for troubleshooting. #- -report-ingress-status #- -external-service=nginx-ingress diff --git a/deployments/daemon-set/nginx-plus-ingress.yaml b/deployments/daemon-set/nginx-plus-ingress.yaml index 77c5bd9bdd..6d040af1ec 100644 --- a/deployments/daemon-set/nginx-plus-ingress.yaml +++ b/deployments/daemon-set/nginx-plus-ingress.yaml @@ -50,7 +50,6 @@ spec: - -nginx-plus - -nginx-configmaps=$(POD_NAMESPACE)/nginx-config - -default-server-tls-secret=$(POD_NAMESPACE)/default-server-secret - - -enable-custom-resources #- -v=3 # Enables extensive logging. Useful for troubleshooting. #- -report-ingress-status #- -external-service=nginx-ingress diff --git a/deployments/deployment/nginx-ingress.yaml b/deployments/deployment/nginx-ingress.yaml index 43cc7a2ac1..3545ea8683 100644 --- a/deployments/deployment/nginx-ingress.yaml +++ b/deployments/deployment/nginx-ingress.yaml @@ -48,7 +48,6 @@ spec: args: - -nginx-configmaps=$(POD_NAMESPACE)/nginx-config - -default-server-tls-secret=$(POD_NAMESPACE)/default-server-secret - - -enable-custom-resources #- -v=3 # Enables extensive logging. Useful for troubleshooting. #- -report-ingress-status #- -external-service=nginx-ingress diff --git a/deployments/deployment/nginx-plus-ingress.yaml b/deployments/deployment/nginx-plus-ingress.yaml index 21f9db842f..369cf34916 100644 --- a/deployments/deployment/nginx-plus-ingress.yaml +++ b/deployments/deployment/nginx-plus-ingress.yaml @@ -49,7 +49,6 @@ spec: - -nginx-plus - -nginx-configmaps=$(POD_NAMESPACE)/nginx-config - -default-server-tls-secret=$(POD_NAMESPACE)/default-server-secret - - -enable-custom-resources #- -v=3 # Enables extensive logging. Useful for troubleshooting. #- -report-ingress-status #- -external-service=nginx-ingress diff --git a/docs/cli-arguments.md b/docs/cli-arguments.md index 00c3c3abb7..4604a038ed 100644 --- a/docs/cli-arguments.md +++ b/docs/cli-arguments.md @@ -14,7 +14,7 @@ Usage of ./nginx-ingress: Format: /. If the argument is not set, for such Ingress hosts NGINX will break any attempt to establish a TLS connection. If the argument is set, but the Ingress controller is not able to fetch the Secret from Kubernetes API, the Ingress controller will fail to start. -enable-custom-resources - Enable custom resources + Enable custom resources (default true) -enable-leader-election Enable Leader election to avoid multiple replicas of the controller reporting the status of Ingress resources -- only one replica will report status. See -report-ingress-status flag. -external-service string diff --git a/docs/installation.md b/docs/installation.md index 24907c5ad3..a19b737d0c 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -28,7 +28,7 @@ The installation manifests are located in the [deployments](../deployments) fold $ kubectl apply -f common/nginx-config.yaml ``` -1. (Optional) To use the [VirtualServer and VirtualServerRoute](virtualserver-and-virtualserverroute.md) resources, create the corresponding resource definitions: +1. Create custom resource definitions for [VirtualServer and VirtualServerRoute](virtualserver-and-virtualserverroute.md) resources: ``` $ kubectl apply -f common/custom-resource-definitions.yaml ``` diff --git a/docs/virtualserver-and-virtualserverroute.md b/docs/virtualserver-and-virtualserverroute.md index 9c246f2f84..a91e625cb1 100644 --- a/docs/virtualserver-and-virtualserverroute.md +++ b/docs/virtualserver-and-virtualserverroute.md @@ -4,8 +4,6 @@ The VirtualServer and VirtualServerRoute resources are new load balancing config This document is the reference documentation for the resources. To see additional examples of using the resources for specific use cases, go to the [examples-of-custom-resources](../examples-of-custom-resources) folder. -**Feature Status**: The VirtualServer and VirtualServerRoute resources are available as a preview feature: it is suitable for experimenting and testing; however, it must be used with caution in production environments. Additionally, while the feature is in preview, we might introduce some backward-incompatible changes to the resources specification in the next releases. - ## Contents - [VirtualServer and VirtualServerRoute Resources](#virtualserver-and-virtualserverroute-resources)