refactor(gateway): make node name explicitly configurable in spec

This commit is contained in:
Peter 2025-01-17 15:03:13 +01:00
parent 0b551325b9
commit a5c170a478
Signed by: prskr
GPG key ID: F56BED6903BC5E37
3 changed files with 9 additions and 1 deletions
internal/webhook/v1alpha1

View file

@ -69,6 +69,10 @@ func (d *APIGatewayCustomDefaulter) Default(ctx context.Context, obj runtime.Obj
apiGateway.Spec.Envoy = new(supabasev1alpha1.EnvoySpec)
}
if apiGateway.Spec.Envoy.NodeName == "" {
apiGateway.Spec.Envoy.NodeName = apiGateway.Name
}
if apiGateway.Spec.Envoy.ControlPlane == nil {
if d.CurrentNamespace == defaultManagerNamespace {
d.Recorder.Event(