Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
6 changes: 6 additions & 0 deletions manifests/00-custom-resource-definition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,12 @@ spec:
type: object
type: array
type: object
proxyprotocol:
description: proxyprotocol is a flag used to indicate whether the ingress
routers should be configured to accept the PROXY Protocol or not.
If unset, defaults to false, unless the Infrastructure platform is
of type AWS, which it is enabled by default.
type: boolean
replicas:
description: replicas is the desired number of ingress controller replicas.
If unset, defaults to 2.
Expand Down
8 changes: 7 additions & 1 deletion pkg/operator/controller/ingress/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,16 @@ func desiredRouterDeployment(ci *operatorv1.IngressController, ingressController
env = append(env, corev1.EnvVar{Name: "ROUTER_CANONICAL_HOSTNAME", Value: ci.Status.Domain})
}

if ci.Status.EndpointPublishingStrategy.Type == operatorv1.LoadBalancerServiceStrategyType {
// Check if ProxyProtocol is enabled - not the most efficient if/elseif, but someone else can
// clean it up when they make this more robust to handle more flags, or ask me to do it.
if ci.Spec.ProxyProtocolEnabled == true {
log.Info("ProxyProtocol flag was set - using PROXY PROTOCOL")
env = append(env, corev1.EnvVar{Name: "ROUTER_USE_PROXY_PROTOCOL", Value: "true"})
} else if ci.Status.EndpointPublishingStrategy.Type == operatorv1.LoadBalancerServiceStrategyType {
// For now, check if we are on AWS. This can really be done for
// for any external [cloud] LBs that support the proxy protocol.
if infraConfig.Status.Platform == configv1.AWSPlatformType {
log.Info("Platform is AWS - using PROXY PROTOCOL")
env = append(env, corev1.EnvVar{Name: "ROUTER_USE_PROXY_PROTOCOL", Value: "true"})
}
}
Expand Down

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