diff --git a/components/provisioner/pkg/gqlschema/models_gen.go b/components/provisioner/pkg/gqlschema/models_gen.go index 64e50fe324..7381af1413 100644 --- a/components/provisioner/pkg/gqlschema/models_gen.go +++ b/components/provisioner/pkg/gqlschema/models_gen.go @@ -168,6 +168,7 @@ type GardenerConfig struct { ShootNetworkingFilterDisabled *bool `json:"shootNetworkingFilterDisabled,omitempty"` ControlPlaneFailureTolerance *string `json:"controlPlaneFailureTolerance,omitempty"` EuAccess *bool `json:"euAccess,omitempty"` + ShootAndSeedSameRegion *bool `json:"shootAndSeedSameRegion,omitempty"` } type GardenerConfigInput struct { diff --git a/components/provisioner/pkg/gqlschema/schema.graphql b/components/provisioner/pkg/gqlschema/schema.graphql index 63735f28af..8062c14a8d 100644 --- a/components/provisioner/pkg/gqlschema/schema.graphql +++ b/components/provisioner/pkg/gqlschema/schema.graphql @@ -36,6 +36,7 @@ type GardenerConfig { shootNetworkingFilterDisabled: Boolean controlPlaneFailureTolerance: String euAccess: Boolean + shootAndSeedSameRegion: Boolean } union ProviderSpecificConfig = GCPProviderConfig | AzureProviderConfig | AWSProviderConfig | OpenStackProviderConfig diff --git a/components/provisioner/pkg/gqlschema/schema_gen.go b/components/provisioner/pkg/gqlschema/schema_gen.go index a874272582..8d6f8a9375 100644 --- a/components/provisioner/pkg/gqlschema/schema_gen.go +++ b/components/provisioner/pkg/gqlschema/schema_gen.go @@ -131,6 +131,7 @@ type ComplexityRoot struct { Region func(childComplexity int) int Seed func(childComplexity int) int ServicesCidr func(childComplexity int) int + ShootAndSeedSameRegion func(childComplexity int) int ShootNetworkingFilterDisabled func(childComplexity int) int TargetSecret func(childComplexity int) int VolumeSizeGb func(childComplexity int) int @@ -626,6 +627,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.GardenerConfig.ServicesCidr(childComplexity), true + case "GardenerConfig.shootAndSeedSameRegion": + if e.complexity.GardenerConfig.ShootAndSeedSameRegion == nil { + break + } + + return e.complexity.GardenerConfig.ShootAndSeedSameRegion(childComplexity), true + case "GardenerConfig.shootNetworkingFilterDisabled": if e.complexity.GardenerConfig.ShootNetworkingFilterDisabled == nil { break @@ -3828,6 +3836,47 @@ func (ec *executionContext) fieldContext_GardenerConfig_euAccess(ctx context.Con return fc, nil } +func (ec *executionContext) _GardenerConfig_shootAndSeedSameRegion(ctx context.Context, field graphql.CollectedField, obj *GardenerConfig) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_GardenerConfig_shootAndSeedSameRegion(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.ShootAndSeedSameRegion, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*bool) + fc.Result = res + return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_GardenerConfig_shootAndSeedSameRegion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "GardenerConfig", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _HibernationStatus_hibernated(ctx context.Context, field graphql.CollectedField, obj *HibernationStatus) (ret graphql.Marshaler) { fc, err := ec.fieldContext_HibernationStatus_hibernated(ctx, field) if err != nil { @@ -5762,6 +5811,8 @@ func (ec *executionContext) fieldContext_RuntimeConfig_clusterConfig(ctx context return ec.fieldContext_GardenerConfig_controlPlaneFailureTolerance(ctx, field) case "euAccess": return ec.fieldContext_GardenerConfig_euAccess(ctx, field) + case "shootAndSeedSameRegion": + return ec.fieldContext_GardenerConfig_shootAndSeedSameRegion(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type GardenerConfig", field.Name) }, @@ -9609,6 +9660,8 @@ func (ec *executionContext) _GardenerConfig(ctx context.Context, sel ast.Selecti out.Values[i] = ec._GardenerConfig_controlPlaneFailureTolerance(ctx, field, obj) case "euAccess": out.Values[i] = ec._GardenerConfig_euAccess(ctx, field, obj) + case "shootAndSeedSameRegion": + out.Values[i] = ec._GardenerConfig_shootAndSeedSameRegion(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) }