From 9fcd61014c92882b50b2666ef3be56fdab8dd19b Mon Sep 17 00:00:00 2001 From: Miheer Salunke Date: Wed, 10 Feb 2021 20:13:27 +1000 Subject: [PATCH] Ability to Customize HAProxy 2.x Error Page https://issues.redhat.com/browse/NE-379 --- .../0000_50_ingress-operator_00-ingresscontroller.crd.yaml | 7 +++++++ operator/v1/types_ingress.go | 6 ++++++ operator/v1/zz_generated.swagger_doc_generated.go | 1 + 3 files changed, 14 insertions(+) diff --git a/operator/v1/0000_50_ingress-operator_00-ingresscontroller.crd.yaml b/operator/v1/0000_50_ingress-operator_00-ingresscontroller.crd.yaml index 5816c9c629b..859c341306e 100644 --- a/operator/v1/0000_50_ingress-operator_00-ingresscontroller.crd.yaml +++ b/operator/v1/0000_50_ingress-operator_00-ingresscontroller.crd.yaml @@ -208,6 +208,13 @@ spec: required: - type type: object + httpErrorCodePage: + description: This used to sync the configmap having customizable error + code page created by cluster admin in openshift-config namespace. + to openshift-ingress which will be used by the router to serve appropriate + error code pages If this field is empty, the default values i.e + default shipped error code pages will be served by the haproxy router. + type: string httpHeaders: description: "httpHeaders defines policy for HTTP headers. \n If this field is empty, the default values are used." diff --git a/operator/v1/types_ingress.go b/operator/v1/types_ingress.go index 11086adaa8d..f72f41097fe 100644 --- a/operator/v1/types_ingress.go +++ b/operator/v1/types_ingress.go @@ -60,6 +60,12 @@ type IngressControllerSpec struct { // +optional Domain string `json:"domain,omitempty"` + //This used to sync the configmap having customizable error code page created by cluster admin in openshift-config namespace. + //to openshift-ingress which will be used by the router to serve appropriate error code + //pages + //If this field is empty, the default values i.e default shipped error code pages will be served by the haproxy router. + HttpErrorCodePage string `json:"httpErrorCodePage,omitempty"` + // replicas is the desired number of ingress controller replicas. If unset, // defaults to 2. // diff --git a/operator/v1/zz_generated.swagger_doc_generated.go b/operator/v1/zz_generated.swagger_doc_generated.go index c5c5a7b396d..61f7bc48e8c 100644 --- a/operator/v1/zz_generated.swagger_doc_generated.go +++ b/operator/v1/zz_generated.swagger_doc_generated.go @@ -580,6 +580,7 @@ func (IngressControllerLogging) SwaggerDoc() map[string]string { var map_IngressControllerSpec = map[string]string{ "": "IngressControllerSpec is the specification of the desired behavior of the IngressController.", "domain": "domain is a DNS name serviced by the ingress controller and is used to configure multiple features:\n\n* For the LoadBalancerService endpoint publishing strategy, domain is\n used to configure DNS records. See endpointPublishingStrategy.\n\n* When using a generated default certificate, the certificate will be valid\n for domain and its subdomains. See defaultCertificate.\n\n* The value is published to individual Route statuses so that end-users\n know where to target external DNS records.\n\ndomain must be unique among all IngressControllers, and cannot be updated.\n\nIf empty, defaults to ingress.config.openshift.io/cluster .spec.domain.", + "httpErrorCodePage": "This used to sync the configmap having customizable error code page created by cluster admin in openshift-config namespace. to openshift-ingress which will be used by the router to serve appropriate error code pages If this field is empty, the default values i.e default shipped error code pages will be served by the haproxy router.", "replicas": "replicas is the desired number of ingress controller replicas. If unset, defaults to 2.", "endpointPublishingStrategy": "endpointPublishingStrategy is used to publish the ingress controller endpoints to other networks, enable load balancer integrations, etc.\n\nIf unset, the default is based on infrastructure.config.openshift.io/cluster .status.platform:\n\n AWS: LoadBalancerService (with External scope)\n Azure: LoadBalancerService (with External scope)\n GCP: LoadBalancerService (with External scope)\n IBMCloud: LoadBalancerService (with External scope)\n Libvirt: HostNetwork\n\nAny other platform types (including None) default to HostNetwork.\n\nendpointPublishingStrategy cannot be updated.", "defaultCertificate": "defaultCertificate is a reference to a secret containing the default certificate served by the ingress controller. When Routes don't specify their own certificate, defaultCertificate is used.\n\nThe secret must contain the following keys and data:\n\n tls.crt: certificate file contents\n tls.key: key file contents\n\nIf unset, a wildcard certificate is automatically generated and used. The certificate is valid for the ingress controller domain (and subdomains) and the generated certificate's CA will be automatically integrated with the cluster's trust store.\n\nIf a wildcard certificate is used and shared by multiple HTTP/2 enabled routes (which implies ALPN) then clients (i.e., notably browsers) are at liberty to reuse open connections. This means a client can reuse a connection to another route and that is likely to fail. This behaviour is generally known as connection coalescing.\n\nThe in-use certificate (whether generated or user-specified) will be automatically integrated with OpenShift's built-in OAuth server.",