Skip to content

Commit

Permalink
Ability to Customize HAProxy 2.x Error Page
Browse files Browse the repository at this point in the history
  • Loading branch information
miheer authored and Miheer Salunke committed Mar 26, 2021
1 parent e37aaed commit 5c95da1
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
18 changes: 18 additions & 0 deletions operator/v1/0000_50_ingress-operator_00-ingresscontroller.crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,24 @@ spec:
required:
- type
type: object
httpErrorCodePages:
description: httpErrorCodePages specifies a configmap with custom
error pages. The administrator must create this configmap in the
openshift-config namespace. This configmap should have keys in the
format "error-page-<error code>.http", where <error code> is an
HTTP error code. For example, "error-page-503.http" defines an error
page for HTTP 503 responses. Currently only error pages for 503
and 404 responses can be customized. Each value in the configmap
should be the full response, including HTTP headers. If this field
is empty, the ingress controller uses the default error pages.
properties:
name:
description: name is the metadata.name of the referenced config
map
type: string
required:
- name
type: object
httpHeaderBuffer:
description: httpHeaderBuffer defines parameters for header buffer
size values. If this field is empty, the default values are used.
Expand Down
10 changes: 10 additions & 0 deletions operator/v1/types_ingress.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,16 @@ type IngressControllerSpec struct {
// +optional
Domain string `json:"domain,omitempty"`

// httpErrorCodePages specifies a configmap with custom error pages.
// The administrator must create this configmap in the openshift-config namespace.
// This configmap should have keys in the format "error-page-<error code>.http",
// where <error code> is an HTTP error code.
// For example, "error-page-503.http" defines an error page for HTTP 503 responses.
// Currently only error pages for 503 and 404 responses can be customized.
// Each value in the configmap should be the full response, including HTTP headers.
// If this field is empty, the ingress controller uses the default error pages.
HttpErrorCodePages configv1.ConfigMapNameReference `json:"httpErrorCodePages,omitempty"`

// replicas is the desired number of ingress controller replicas. If unset,
// defaults to 2.
//
Expand Down
1 change: 1 addition & 0 deletions operator/v1/zz_generated.swagger_doc_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5c95da1

Please sign in to comment.