Skip to content
  • Miciah Masters's avatar
    Add local-with-fallback unsupported config override · fcc0f4a2
    Miciah Masters authored
    
    
    * pkg/operator/controller/ingress/load_balancer_service.go
    (desiredLoadBalancerService): Use the new shouldUseLocalWithFallback
    function to determine whether to set the "local-with-fallback" annotation.
    (shouldUseLocalWithFallback): New function.  Check the service's external
    traffic policy and the ingresscontroller's unsupported config overrides and
    return a Boolean value indicating whether "local-with-fallback" should be
    enabled, or an error if the override could not be parsed.
    * pkg/operator/controller/ingress/load_balancer_service_test.go
    (TestShouldUseLocalWithFallback): New test.  Verify that
    shouldUseLocalWithFallback behaves as expected.
    * pkg/operator/controller/ingress/nodeport_service.go
    (ensureNodePortService): Check the error value from desiredNodePortService.
    (desiredNodePortService): Add error return value.  Use the new
    shouldUseLocalWithFallback function (which can return an error) to
    determine whether to set the "local-with-fallback" annotation.
    * pkg/operator/controller/ingress/nodeport_service_test.go
    (TestDesiredNodePortService): Check the error value from
    desiredNodePortService.
    * test/e2e/operator_test.go
    (TestLocalWithFallbackOverrideForLoadBalancerService)
    (TestLocalWithFallbackOverrideForNodePortService): New tests.  Verify that
    the operator does not set the "local-with-fallback" annotation on a
    LoadBalancer or NodePort service if the localWithFallback unsupported
    config override is set to "false".
    
    Co-authored-by: default avatarcandita <cholman@redhat.com>
    fcc0f4a2