Skip to content

Commit

Permalink
Add api-gateway to allow list for gateway-kind annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
nathancoleman authored and sarahalsmiller committed Jan 16, 2024
1 parent 5e97ed0 commit 0648657
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const (
meshGateway = "mesh-gateway"
terminatingGateway = "terminating-gateway"
ingressGateway = "ingress-gateway"
apiGateway = "api-gateway"

envoyPrometheusBindAddr = "envoy_prometheus_bind_addr"
envoyTelemetryCollectorBindSocketDir = "envoy_telemetry_collector_bind_socket_dir"
Expand Down Expand Up @@ -801,9 +802,11 @@ func (r *Controller) createGatewayRegistrations(pod corev1.Pod, serviceEndpoints
"address": "0.0.0.0",
},
}

case apiGateway:
// Do nothing. This is only here so that API gateway pods have annotations
// consistent with other gateway types but don't return an error below.
default:
return nil, fmt.Errorf("%s must be one of %s, %s, or %s", constants.AnnotationGatewayKind, meshGateway, terminatingGateway, ingressGateway)
return nil, fmt.Errorf("%s must be one of %s, %s, %s, or %s", constants.AnnotationGatewayKind, meshGateway, terminatingGateway, ingressGateway, apiGateway)
}

if r.MetricsConfig.DefaultEnableMetrics && r.MetricsConfig.EnableGatewayMetrics {
Expand Down

0 comments on commit 0648657

Please sign in to comment.