From d02a7ec260b3ca601d3a86b8707231dd1a3d6105 Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Sat, 2 Mar 2024 15:14:07 +0530 Subject: [PATCH] fix: fixes Aws cluster and nodepool creation flow --- .../nvim/__http__/infra/clusters.graphql.yml | 35 +- .../nvim/__http__/infra/nodepools.graphql.yml | 19 +- apps/infra/Taskfile.yml | 1 + apps/infra/internal/app/gqlgen.yml | 2 + .../internal/app/graph/generated/generated.go | 1125 +++++++++++------ .../internal/app/graph/model/models_gen.go | 25 +- .../struct-to-graphql/common-types.graphqls | 17 +- apps/infra/internal/domain/clusters.go | 3 +- apps/infra/internal/domain/nodepool.go | 10 +- .../field-constants/generated_constants.go | 26 +- apps/infra/internal/env/env.go | 7 +- go.mod | 2 +- go.sum | 2 + 13 files changed, 786 insertions(+), 488 deletions(-) diff --git a/.tools/nvim/__http__/infra/clusters.graphql.yml b/.tools/nvim/__http__/infra/clusters.graphql.yml index c47dcde12..096aaf316 100644 --- a/.tools/nvim/__http__/infra/clusters.graphql.yml +++ b/.tools/nvim/__http__/infra/clusters.graphql.yml @@ -1,16 +1,7 @@ --- -global: - clusterName: sample-cluster3 - - # providerSecretName: "aws-283277" - # providerSecretNamespace: "kl-account-new-prod-team" - - providerSecretName: "aws-creds2" - providerSecretNamespace: "kl-account-ab-641330" ---- label: Create Cluster -query: |+ +query: |+ #graphql mutation Infra_createCluster($cluster: ClusterIn!) { infra_createCluster(cluster: $cluster) { metadata { @@ -34,15 +25,15 @@ variables: namespace: "{{.providerSecretNamespace}}" cloudProvider: aws aws: - region: ap-south-1 + region: eu-north-1 k3sMasters: - instanceType: c6a.large + instanceType: c5a.large nvidiaGpuEnabled: false --- label: List Clusters -query: |+ +query: |+ #graphql query Infra_listClusters($search: SearchCluster, $pagination: CursorPaginationIn) { infra_listClusters(search: $search, pagination: $pagination) { edges { @@ -70,10 +61,10 @@ query: |+ syncScheduledAt recordVersion } - adminKubeconfig { - value - encoding - } + # adminKubeconfig { + # value + # encoding + # } } } } @@ -89,7 +80,7 @@ variables: --- label: Get Cluster -query: |+ +query: |+ #graphql query Query($name: String!) { infra_getCluster(name: $name) { kind @@ -113,7 +104,7 @@ variables: --- label: Update Cluster -query: |+ +query: |+ #graphql mutation Infra_updateCluster($cluster: ClusterIn!) { infra_updateCluster(cluster: $cluster) { metadata { @@ -140,16 +131,16 @@ variables: region: ap-south-1 k3sMasters: instanceType: c6a.large - iamInstanceProfileRole: "EC2StorageAccess" + iamInstanceProfileRole: "" --- label: Upgrade Helm Kloudlite Agent -query: |+ +query: |+ #graphql mutation Infra_upgradeHelmKloudliteAgent($clusterName: String!) { infra_upgradeHelmKloudliteAgent(clusterName: $clusterName) } variables: - clusterName: "ab-cluster-3" + clusterName: "{{.clusterName}}" --- label: Delete Cluster diff --git a/.tools/nvim/__http__/infra/nodepools.graphql.yml b/.tools/nvim/__http__/infra/nodepools.graphql.yml index bea73f918..ccd8c3f6a 100644 --- a/.tools/nvim/__http__/infra/nodepools.graphql.yml +++ b/.tools/nvim/__http__/infra/nodepools.graphql.yml @@ -1,14 +1,4 @@ --- -global: - accountName: kloudlite-dev - providerName: sample - providerNamespace: s1 - providerSecretName: provider-sample - - clusterName: sample-cluster3 - # clusterName: teshdhr-797053 ---- - label: Create Nodepool query: |+ mutation Infra_createNodePool($clusterName: String!, $pool: NodePoolIn!) { @@ -39,10 +29,11 @@ variables: # targetCount: 1 cloudProvider: "aws" aws: - availabilityZone: ap-south-1a + availabilityZone: eu-north-1a poolType: "ec2" ec2Pool: - instanceType: c6a.large + # instanceType: c6a.large + instanceType: c5.large nvidiaGpuEnabled: false --- @@ -131,7 +122,7 @@ variables: --- label: Update Nodepool -query: |+ +query: |+ #graphql mutation Infra_updateNodePool($clusterName: String!, $pool: NodePoolIn!) { infra_updateNodePool(clusterName: $clusterName, pool: $pool) { id @@ -240,6 +231,6 @@ query: |+ #graphql } variables: clusterName: "{{.clusterName}}" - poolName: first + poolName: np --- diff --git a/apps/infra/Taskfile.yml b/apps/infra/Taskfile.yml index e082db48d..5406f8b4e 100644 --- a/apps/infra/Taskfile.yml +++ b/apps/infra/Taskfile.yml @@ -47,6 +47,7 @@ tasks: build: cmds: + - go generate ./internal/entities/field-constants/gen.go - task: go:build vars: Out: ./bin/{{.app}} diff --git a/apps/infra/internal/app/gqlgen.yml b/apps/infra/internal/app/gqlgen.yml index 85ca0c7db..298306242 100644 --- a/apps/infra/internal/app/gqlgen.yml +++ b/apps/infra/internal/app/gqlgen.yml @@ -164,6 +164,8 @@ models: Github__com___kloudlite___api___pkg___types__SyncState: model: github.com/kloudlite/api/pkg/types.SyncState + # Github__com___kloudlite___operator___apis___clusters___v1__AwsRegion: + # model: github.com/kloudlite/operator/apis/clusters/v1.AwsRegion # CheckAwsAccessOutput: # model: github.com/kloudlite/api/apps/infra/internal/domain.AWSAccessValidationOutput diff --git a/apps/infra/internal/app/graph/generated/generated.go b/apps/infra/internal/app/graph/generated/generated.go index 87c2a1ef1..2bd6283ba 100644 --- a/apps/infra/internal/app/graph/generated/generated.go +++ b/apps/infra/internal/app/graph/generated/generated.go @@ -288,12 +288,11 @@ type ComplexityRoot struct { NodePools func(childComplexity int) int Region func(childComplexity int) int SpotNodePools func(childComplexity int) int + Vpc func(childComplexity int) int } Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig struct { IamInstanceProfileRole func(childComplexity int) int - ImageID func(childComplexity int) int - ImageSSHUsername func(childComplexity int) int InstanceType func(childComplexity int) int Nodes func(childComplexity int) int NvidiaGpuEnabled func(childComplexity int) int @@ -305,13 +304,13 @@ type ComplexityRoot struct { AvailabilityZone func(childComplexity int) int Ec2Pool func(childComplexity int) int IamInstanceProfileRole func(childComplexity int) int - ImageID func(childComplexity int) int - ImageSSHUsername func(childComplexity int) int NvidiaGpuEnabled func(childComplexity int) int PoolType func(childComplexity int) int RootVolumeSize func(childComplexity int) int RootVolumeType func(childComplexity int) int SpotPool func(childComplexity int) int + VpcID func(childComplexity int) int + VpcSubnetID func(childComplexity int) int } Github__com___kloudlite___operator___apis___clusters___v1__AwsEC2PoolConfig struct { @@ -335,6 +334,16 @@ type ComplexityRoot struct { SpotFleetTaggingRoleName func(childComplexity int) int } + Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID struct { + AvailabilityZone func(childComplexity int) int + ID func(childComplexity int) int + } + + Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams struct { + ID func(childComplexity int) int + PublicSubnets func(childComplexity int) int + } + Github__com___kloudlite___operator___apis___clusters___v1__CloudProviderCredentialKeys struct { KeyAWSAccountID func(childComplexity int) int KeyAWSAssumeRoleExternalID func(childComplexity int) int @@ -2392,26 +2401,19 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__AWSClusterConfig.SpotNodePools(childComplexity), true - case "Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig.iamInstanceProfileRole": - if e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig.IamInstanceProfileRole == nil { - break - } - - return e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig.IamInstanceProfileRole(childComplexity), true - - case "Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig.imageId": - if e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig.ImageID == nil { + case "Github__com___kloudlite___operator___apis___clusters___v1__AWSClusterConfig.vpc": + if e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__AWSClusterConfig.Vpc == nil { break } - return e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig.ImageID(childComplexity), true + return e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__AWSClusterConfig.Vpc(childComplexity), true - case "Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig.imageSSHUsername": - if e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig.ImageSSHUsername == nil { + case "Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig.iamInstanceProfileRole": + if e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig.IamInstanceProfileRole == nil { break } - return e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig.ImageSSHUsername(childComplexity), true + return e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig.IamInstanceProfileRole(childComplexity), true case "Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig.instanceType": if e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig.InstanceType == nil { @@ -2469,20 +2471,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig.IamInstanceProfileRole(childComplexity), true - case "Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig.imageId": - if e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig.ImageID == nil { - break - } - - return e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig.ImageID(childComplexity), true - - case "Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig.imageSSHUsername": - if e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig.ImageSSHUsername == nil { - break - } - - return e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig.ImageSSHUsername(childComplexity), true - case "Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig.nvidiaGpuEnabled": if e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig.NvidiaGpuEnabled == nil { break @@ -2518,6 +2506,20 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig.SpotPool(childComplexity), true + case "Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig.vpcId": + if e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig.VpcID == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig.VpcID(childComplexity), true + + case "Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig.vpcSubnetId": + if e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig.VpcSubnetID == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig.VpcSubnetID(childComplexity), true + case "Github__com___kloudlite___operator___apis___clusters___v1__AwsEC2PoolConfig.instanceType": if e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__AwsEC2PoolConfig.InstanceType == nil { break @@ -2581,6 +2583,34 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig.SpotFleetTaggingRoleName(childComplexity), true + case "Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID.availabilityZone": + if e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID.AvailabilityZone == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID.AvailabilityZone(childComplexity), true + + case "Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID.id": + if e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID.ID == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID.ID(childComplexity), true + + case "Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams.id": + if e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams.ID == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams.ID(childComplexity), true + + case "Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams.publicSubnets": + if e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams.PublicSubnets == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams.PublicSubnets(childComplexity), true + case "Github__com___kloudlite___operator___apis___clusters___v1__CloudProviderCredentialKeys.keyAWSAccountId": if e.complexity.Github__com___kloudlite___operator___apis___clusters___v1__CloudProviderCredentialKeys.KeyAWSAccountID == nil { break @@ -6784,11 +6814,11 @@ input SearchCluster { input SearchClusterManagedService { isReady: MatchFilterIn text: MatchFilterIn - isStateful: MatchFilterIn } input SearchNodepool { text: MatchFilterIn + isStateful: MatchFilterIn } input SearchHelmRelease { @@ -7095,12 +7125,11 @@ type Github__com___kloudlite___operator___apis___clusters___v1__AWSClusterConfig nodePools: Map region: String! spotNodePools: Map + vpc: Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams } type Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig @shareable { iamInstanceProfileRole: String - imageId: String! - imageSSHUsername: String! instanceType: String! nodes: Map nvidiaGpuEnabled: Boolean! @@ -7112,13 +7141,13 @@ type Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfi availabilityZone: String! ec2Pool: Github__com___kloudlite___operator___apis___clusters___v1__AwsEC2PoolConfig iamInstanceProfileRole: String - imageId: String! - imageSSHUsername: String! nvidiaGpuEnabled: Boolean! poolType: Github__com___kloudlite___operator___apis___clusters___v1__AWSPoolType! rootVolumeSize: Int! rootVolumeType: String! spotPool: Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig + vpcId: String! + vpcSubnetId: String! } type Github__com___kloudlite___operator___apis___clusters___v1__AwsEC2PoolConfig @shareable { @@ -7142,6 +7171,16 @@ type Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfi spotFleetTaggingRoleName: String! } +type Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID @shareable { + availabilityZone: String! + id: String! +} + +type Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams @shareable { + id: String! + publicSubnets: [Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID!]! +} + type Github__com___kloudlite___operator___apis___clusters___v1__CloudProviderCredentialKeys @shareable { keyAccessKey: String! keyAWSAccountId: String! @@ -16078,10 +16117,6 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap switch field.Name { case "iamInstanceProfileRole": return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig_iamInstanceProfileRole(ctx, field) - case "imageId": - return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig_imageId(ctx, field) - case "imageSSHUsername": - return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig_imageSSHUsername(ctx, field) case "instanceType": return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig_instanceType(ctx, field) case "nodes": @@ -16225,49 +16260,8 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap return fc, nil } -func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig_iamInstanceProfileRole(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AWSK3sMastersConfig) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig_iamInstanceProfileRole(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.IamInstanceProfileRole, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*string) - fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig_iamInstanceProfileRole(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil -} - -func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig_imageId(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AWSK3sMastersConfig) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig_imageId(ctx, field) +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AWSClusterConfig_vpc(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AWSClusterConfig) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSClusterConfig_vpc(ctx, field) if err != nil { return graphql.Null } @@ -16280,38 +16274,41 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ImageID, nil + return obj.Vpc, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*model.GithubComKloudliteOperatorApisClustersV1AwsVPCParams) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsVPCParams(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig_imageId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSClusterConfig_vpc(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig", + Object: "Github__com___kloudlite___operator___apis___clusters___v1__AWSClusterConfig", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams_id(ctx, field) + case "publicSubnets": + return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams_publicSubnets(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams", field.Name) }, } return fc, nil } -func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig_imageSSHUsername(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AWSK3sMastersConfig) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig_imageSSHUsername(ctx, field) +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig_iamInstanceProfileRole(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AWSK3sMastersConfig) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig_iamInstanceProfileRole(ctx, field) if err != nil { return graphql.Null } @@ -16324,24 +16321,21 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ImageSSHUsername, nil + return obj.IamInstanceProfileRole, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig_imageSSHUsername(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig_iamInstanceProfileRole(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig", Field: field, @@ -16703,8 +16697,8 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap return fc, nil } -func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_imageId(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AWSNodePoolConfig) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_imageId(ctx, field) +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_nvidiaGpuEnabled(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AWSNodePoolConfig) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_nvidiaGpuEnabled(ctx, field) if err != nil { return graphql.Null } @@ -16717,7 +16711,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ImageID, nil + return obj.NvidiaGpuEnabled, nil }) if err != nil { ec.Error(ctx, err) @@ -16729,26 +16723,26 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster } return graphql.Null } - res := resTmp.(string) + res := resTmp.(bool) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_imageId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_nvidiaGpuEnabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Boolean does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_imageSSHUsername(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AWSNodePoolConfig) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_imageSSHUsername(ctx, field) +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_poolType(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AWSNodePoolConfig) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_poolType(ctx, field) if err != nil { return graphql.Null } @@ -16761,7 +16755,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ImageSSHUsername, nil + return obj.PoolType, nil }) if err != nil { ec.Error(ctx, err) @@ -16773,26 +16767,26 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster } return graphql.Null } - res := resTmp.(string) + res := resTmp.(model.GithubComKloudliteOperatorApisClustersV1AWSPoolType) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNGithub__com___kloudlite___operator___apis___clusters___v1__AWSPoolType2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSPoolType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_imageSSHUsername(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_poolType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Github__com___kloudlite___operator___apis___clusters___v1__AWSPoolType does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_nvidiaGpuEnabled(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AWSNodePoolConfig) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_nvidiaGpuEnabled(ctx, field) +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_rootVolumeSize(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AWSNodePoolConfig) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_rootVolumeSize(ctx, field) if err != nil { return graphql.Null } @@ -16805,7 +16799,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.NvidiaGpuEnabled, nil + return obj.RootVolumeSize, nil }) if err != nil { ec.Error(ctx, err) @@ -16817,26 +16811,26 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster } return graphql.Null } - res := resTmp.(bool) + res := resTmp.(int) fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_nvidiaGpuEnabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_rootVolumeSize(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig", 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 nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_poolType(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AWSNodePoolConfig) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_poolType(ctx, field) +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_rootVolumeType(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AWSNodePoolConfig) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_rootVolumeType(ctx, field) if err != nil { return graphql.Null } @@ -16849,7 +16843,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PoolType, nil + return obj.RootVolumeType, nil }) if err != nil { ec.Error(ctx, err) @@ -16861,26 +16855,26 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster } return graphql.Null } - res := resTmp.(model.GithubComKloudliteOperatorApisClustersV1AWSPoolType) + res := resTmp.(string) fc.Result = res - return ec.marshalNGithub__com___kloudlite___operator___apis___clusters___v1__AWSPoolType2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSPoolType(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_poolType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_rootVolumeType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Github__com___kloudlite___operator___apis___clusters___v1__AWSPoolType does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_rootVolumeSize(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AWSNodePoolConfig) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_rootVolumeSize(ctx, field) +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_spotPool(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AWSNodePoolConfig) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_spotPool(ctx, field) if err != nil { return graphql.Null } @@ -16893,38 +16887,45 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.RootVolumeSize, nil + return obj.SpotPool, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(int) + res := resTmp.(*model.GithubComKloudliteOperatorApisClustersV1AwsSpotPoolConfig) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsSpotPoolConfig(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_rootVolumeSize(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_spotPool(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + switch field.Name { + case "cpuNode": + return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig_cpuNode(ctx, field) + case "gpuNode": + return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig_gpuNode(ctx, field) + case "nodes": + return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig_nodes(ctx, field) + case "spotFleetTaggingRoleName": + return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig_spotFleetTaggingRoleName(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig", field.Name) }, } return fc, nil } -func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_rootVolumeType(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AWSNodePoolConfig) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_rootVolumeType(ctx, field) +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_vpcId(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AWSNodePoolConfig) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_vpcId(ctx, field) if err != nil { return graphql.Null } @@ -16937,7 +16938,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.RootVolumeType, nil + return obj.VpcID, nil }) if err != nil { ec.Error(ctx, err) @@ -16954,7 +16955,7 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_rootVolumeType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_vpcId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig", Field: field, @@ -16967,8 +16968,8 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap return fc, nil } -func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_spotPool(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AWSNodePoolConfig) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_spotPool(ctx, field) +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_vpcSubnetId(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AWSNodePoolConfig) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_vpcSubnetId(ctx, field) if err != nil { return graphql.Null } @@ -16981,38 +16982,31 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.SpotPool, nil + return obj.VpcSubnetID, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*model.GithubComKloudliteOperatorApisClustersV1AwsSpotPoolConfig) + res := resTmp.(string) fc.Result = res - return ec.marshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsSpotPoolConfig(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_spotPool(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_vpcSubnetId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "cpuNode": - return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig_cpuNode(ctx, field) - case "gpuNode": - return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig_gpuNode(ctx, field) - case "nodes": - return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig_nodes(ctx, field) - case "spotFleetTaggingRoleName": - return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig_spotFleetTaggingRoleName(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil @@ -17421,6 +17415,188 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap return fc, nil } +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID_availabilityZone(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AwsSubnetWithID) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID_availabilityZone(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.AvailabilityZone, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID_availabilityZone(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID_id(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AwsSubnetWithID) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID_id(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.ID, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams_id(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AwsVPCParams) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams_id(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.ID, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams_publicSubnets(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1AwsVPCParams) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams_publicSubnets(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.PublicSubnets, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]*model.GithubComKloudliteOperatorApisClustersV1AwsSubnetWithID) + fc.Result = res + return ec.marshalNGithub__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsSubnetWithIDᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams_publicSubnets(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "availabilityZone": + return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID_availabilityZone(ctx, field) + case "id": + return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID_id(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__CloudProviderCredentialKeys_keyAccessKey(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisClustersV1CloudProviderCredentialKeys) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__CloudProviderCredentialKeys_keyAccessKey(ctx, field) if err != nil { @@ -18207,6 +18383,8 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSClusterConfig_region(ctx, field) case "spotNodePools": return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSClusterConfig_spotNodePools(ctx, field) + case "vpc": + return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSClusterConfig_vpc(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___apis___clusters___v1__AWSClusterConfig", field.Name) }, @@ -18988,10 +19166,6 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_ec2Pool(ctx, field) case "iamInstanceProfileRole": return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_iamInstanceProfileRole(ctx, field) - case "imageId": - return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_imageId(ctx, field) - case "imageSSHUsername": - return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_imageSSHUsername(ctx, field) case "nvidiaGpuEnabled": return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_nvidiaGpuEnabled(ctx, field) case "poolType": @@ -19002,6 +19176,10 @@ func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___ap return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_rootVolumeType(ctx, field) case "spotPool": return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_spotPool(ctx, field) + case "vpcId": + return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_vpcId(ctx, field) + case "vpcSubnetId": + return ec.fieldContext_Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_vpcSubnetId(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig", field.Name) }, @@ -51023,7 +51201,7 @@ func (ec *executionContext) unmarshalInputSearchClusterManagedService(ctx contex asMap[k] = v } - fieldsInOrder := [...]string{"isReady", "text", "isStateful"} + fieldsInOrder := [...]string{"isReady", "text"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -51046,14 +51224,6 @@ func (ec *executionContext) unmarshalInputSearchClusterManagedService(ctx contex if err != nil { return it, err } - case "isStateful": - var err error - - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("isStateful")) - it.IsStateful, err = ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) - if err != nil { - return it, err - } } } @@ -51167,7 +51337,7 @@ func (ec *executionContext) unmarshalInputSearchNodepool(ctx context.Context, ob asMap[k] = v } - fieldsInOrder := [...]string{"text"} + fieldsInOrder := [...]string{"text", "isStateful"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -51182,6 +51352,14 @@ func (ec *executionContext) unmarshalInputSearchNodepool(ctx context.Context, ob if err != nil { return it, err } + case "isStateful": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("isStateful")) + it.IsStateful, err = ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) + if err != nil { + return it, err + } } } @@ -53005,6 +53183,10 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster out.Values[i] = ec._Github__com___kloudlite___operator___apis___clusters___v1__AWSClusterConfig_spotNodePools(ctx, field, obj) + case "vpc": + + out.Values[i] = ec._Github__com___kloudlite___operator___apis___clusters___v1__AWSClusterConfig_vpc(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -53030,20 +53212,6 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster out.Values[i] = ec._Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig_iamInstanceProfileRole(ctx, field, obj) - case "imageId": - - out.Values[i] = ec._Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig_imageId(ctx, field, obj) - - if out.Values[i] == graphql.Null { - invalids++ - } - case "imageSSHUsername": - - out.Values[i] = ec._Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig_imageSSHUsername(ctx, field, obj) - - if out.Values[i] == graphql.Null { - invalids++ - } case "instanceType": out.Values[i] = ec._Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig_instanceType(ctx, field, obj) @@ -53112,20 +53280,6 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster out.Values[i] = ec._Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_iamInstanceProfileRole(ctx, field, obj) - case "imageId": - - out.Values[i] = ec._Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_imageId(ctx, field, obj) - - if out.Values[i] == graphql.Null { - invalids++ - } - case "imageSSHUsername": - - out.Values[i] = ec._Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_imageSSHUsername(ctx, field, obj) - - if out.Values[i] == graphql.Null { - invalids++ - } case "nvidiaGpuEnabled": out.Values[i] = ec._Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_nvidiaGpuEnabled(ctx, field, obj) @@ -53158,6 +53312,20 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster out.Values[i] = ec._Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_spotPool(ctx, field, obj) + case "vpcId": + + out.Values[i] = ec._Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_vpcId(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "vpcSubnetId": + + out.Values[i] = ec._Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfig_vpcSubnetId(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -53301,6 +53469,76 @@ func (ec *executionContext) _Github__com___kloudlite___operator___apis___cluster return out } +var github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithIDImplementors = []string{"Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID"} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisClustersV1AwsSubnetWithID) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithIDImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID") + case "availabilityZone": + + out.Values[i] = ec._Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID_availabilityZone(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "id": + + out.Values[i] = ec._Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID_id(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParamsImplementors = []string{"Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams"} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisClustersV1AwsVPCParams) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParamsImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams") + case "id": + + out.Values[i] = ec._Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams_id(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "publicSubnets": + + out.Values[i] = ec._Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams_publicSubnets(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + var github__com___kloudlite___operator___apis___clusters___v1__CloudProviderCredentialKeysImplementors = []string{"Github__com___kloudlite___operator___apis___clusters___v1__CloudProviderCredentialKeys"} func (ec *executionContext) _Github__com___kloudlite___operator___apis___clusters___v1__CloudProviderCredentialKeys(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisClustersV1CloudProviderCredentialKeys) graphql.Marshaler { @@ -59824,7 +60062,219 @@ func (ec *executionContext) marshalNClusterEdge2ᚕᚖgithubᚗcomᚋkloudlite if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNClusterEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐClusterEdge(ctx, sel, v[i]) + ret[i] = ec.marshalNClusterEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐClusterEdge(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalNClusterEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐClusterEdge(ctx context.Context, sel ast.SelectionSet, v *model.ClusterEdge) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._ClusterEdge(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNClusterIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐCluster(ctx context.Context, v interface{}) (entities.Cluster, error) { + res, err := ec.unmarshalInputClusterIn(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNClusterManagedService2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐClusterManagedService(ctx context.Context, sel ast.SelectionSet, v *entities.ClusterManagedService) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._ClusterManagedService(ctx, sel, v) +} + +func (ec *executionContext) marshalNClusterManagedServiceEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐClusterManagedServiceEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.ClusterManagedServiceEdge) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNClusterManagedServiceEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐClusterManagedServiceEdge(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalNClusterManagedServiceEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐClusterManagedServiceEdge(ctx context.Context, sel ast.SelectionSet, v *model.ClusterManagedServiceEdge) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._ClusterManagedServiceEdge(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNClusterManagedServiceIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐClusterManagedService(ctx context.Context, v interface{}) (entities.ClusterManagedService, error) { + res, err := ec.unmarshalInputClusterManagedServiceIn(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalNDate2string(ctx context.Context, v interface{}) (string, error) { + res, err := graphql.UnmarshalString(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNDate2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { + res := graphql.MarshalString(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + } + return res +} + +func (ec *executionContext) marshalNDomainEntry2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐDomainEntry(ctx context.Context, sel ast.SelectionSet, v *entities.DomainEntry) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._DomainEntry(ctx, sel, v) +} + +func (ec *executionContext) marshalNDomainEntryEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐDomainEntryEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.DomainEntryEdge) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNDomainEntryEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐDomainEntryEdge(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalNDomainEntryEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐDomainEntryEdge(ctx context.Context, sel ast.SelectionSet, v *model.DomainEntryEdge) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._DomainEntryEdge(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNDomainEntryIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐDomainEntry(ctx context.Context, v interface{}) (entities.DomainEntry, error) { + res, err := ec.unmarshalInputDomainEntryIn(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___api___apps___infra___internal___entities__InputField2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsInfraInternalEntitiesInputFieldᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.GithubComKloudliteAPIAppsInfraInternalEntitiesInputField) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNGithub__com___kloudlite___api___apps___infra___internal___entities__InputField2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsInfraInternalEntitiesInputField(ctx, sel, v[i]) } if isLen1 { f(i) @@ -59844,32 +60294,17 @@ func (ec *executionContext) marshalNClusterEdge2ᚕᚖgithubᚗcomᚋkloudlite return ret } -func (ec *executionContext) marshalNClusterEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐClusterEdge(ctx context.Context, sel ast.SelectionSet, v *model.ClusterEdge) graphql.Marshaler { - if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "the requested element is null which the schema does not allow") - } - return graphql.Null - } - return ec._ClusterEdge(ctx, sel, v) -} - -func (ec *executionContext) unmarshalNClusterIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐCluster(ctx context.Context, v interface{}) (entities.Cluster, error) { - res, err := ec.unmarshalInputClusterIn(ctx, v) - return res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalNClusterManagedService2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐClusterManagedService(ctx context.Context, sel ast.SelectionSet, v *entities.ClusterManagedService) graphql.Marshaler { +func (ec *executionContext) marshalNGithub__com___kloudlite___api___apps___infra___internal___entities__InputField2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsInfraInternalEntitiesInputField(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteAPIAppsInfraInternalEntitiesInputField) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } - return ec._ClusterManagedService(ctx, sel, v) + return ec._Github__com___kloudlite___api___apps___infra___internal___entities__InputField(ctx, sel, v) } -func (ec *executionContext) marshalNClusterManagedServiceEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐClusterManagedServiceEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.ClusterManagedServiceEdge) graphql.Marshaler { +func (ec *executionContext) marshalNGithub__com___kloudlite___api___apps___infra___internal___entities__MresTemplate2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsInfraInternalEntitiesMresTemplateᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.GithubComKloudliteAPIAppsInfraInternalEntitiesMresTemplate) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -59893,7 +60328,7 @@ func (ec *executionContext) marshalNClusterManagedServiceEdge2ᚕᚖgithubᚗcom if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNClusterManagedServiceEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐClusterManagedServiceEdge(ctx, sel, v[i]) + ret[i] = ec.marshalNGithub__com___kloudlite___api___apps___infra___internal___entities__MresTemplate2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsInfraInternalEntitiesMresTemplate(ctx, sel, v[i]) } if isLen1 { f(i) @@ -59913,47 +60348,21 @@ func (ec *executionContext) marshalNClusterManagedServiceEdge2ᚕᚖgithubᚗcom return ret } -func (ec *executionContext) marshalNClusterManagedServiceEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐClusterManagedServiceEdge(ctx context.Context, sel ast.SelectionSet, v *model.ClusterManagedServiceEdge) graphql.Marshaler { +func (ec *executionContext) marshalNGithub__com___kloudlite___api___apps___infra___internal___entities__MresTemplate2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsInfraInternalEntitiesMresTemplate(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteAPIAppsInfraInternalEntitiesMresTemplate) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } - return ec._ClusterManagedServiceEdge(ctx, sel, v) -} - -func (ec *executionContext) unmarshalNClusterManagedServiceIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐClusterManagedService(ctx context.Context, v interface{}) (entities.ClusterManagedService, error) { - res, err := ec.unmarshalInputClusterManagedServiceIn(ctx, v) - return res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) unmarshalNDate2string(ctx context.Context, v interface{}) (string, error) { - res, err := graphql.UnmarshalString(v) - return res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalNDate2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { - res := graphql.MarshalString(v) - if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "the requested element is null which the schema does not allow") - } - } - return res + return ec._Github__com___kloudlite___api___apps___infra___internal___entities__MresTemplate(ctx, sel, v) } -func (ec *executionContext) marshalNDomainEntry2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐDomainEntry(ctx context.Context, sel ast.SelectionSet, v *entities.DomainEntry) graphql.Marshaler { - if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "the requested element is null which the schema does not allow") - } - return graphql.Null - } - return ec._DomainEntry(ctx, sel, v) +func (ec *executionContext) marshalNGithub__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐMsvcTemplateEntry(ctx context.Context, sel ast.SelectionSet, v entities.MsvcTemplateEntry) graphql.Marshaler { + return ec._Github__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry(ctx, sel, &v) } -func (ec *executionContext) marshalNDomainEntryEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐDomainEntryEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.DomainEntryEdge) graphql.Marshaler { +func (ec *executionContext) marshalNGithub__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry2ᚕgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐMsvcTemplateEntryᚄ(ctx context.Context, sel ast.SelectionSet, v []entities.MsvcTemplateEntry) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -59977,7 +60386,7 @@ func (ec *executionContext) marshalNDomainEntryEdge2ᚕᚖgithubᚗcomᚋkloudli if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNDomainEntryEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐDomainEntryEdge(ctx, sel, v[i]) + ret[i] = ec.marshalNGithub__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐMsvcTemplateEntry(ctx, sel, v[i]) } if isLen1 { f(i) @@ -59997,22 +60406,7 @@ func (ec *executionContext) marshalNDomainEntryEdge2ᚕᚖgithubᚗcomᚋkloudli return ret } -func (ec *executionContext) marshalNDomainEntryEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐDomainEntryEdge(ctx context.Context, sel ast.SelectionSet, v *model.DomainEntryEdge) graphql.Marshaler { - if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "the requested element is null which the schema does not allow") - } - return graphql.Null - } - return ec._DomainEntryEdge(ctx, sel, v) -} - -func (ec *executionContext) unmarshalNDomainEntryIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐDomainEntry(ctx context.Context, v interface{}) (entities.DomainEntry, error) { - res, err := ec.unmarshalInputDomainEntryIn(ctx, v) - return res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalNGithub__com___kloudlite___api___apps___infra___internal___entities__InputField2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsInfraInternalEntitiesInputFieldᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.GithubComKloudliteAPIAppsInfraInternalEntitiesInputField) graphql.Marshaler { +func (ec *executionContext) marshalNGithub__com___kloudlite___api___apps___infra___internal___entities__OutputField2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsInfraInternalEntitiesOutputFieldᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.GithubComKloudliteAPIAppsInfraInternalEntitiesOutputField) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -60036,7 +60430,7 @@ func (ec *executionContext) marshalNGithub__com___kloudlite___api___apps___infra if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNGithub__com___kloudlite___api___apps___infra___internal___entities__InputField2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsInfraInternalEntitiesInputField(ctx, sel, v[i]) + ret[i] = ec.marshalNGithub__com___kloudlite___api___apps___infra___internal___entities__OutputField2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsInfraInternalEntitiesOutputField(ctx, sel, v[i]) } if isLen1 { f(i) @@ -60056,119 +60450,67 @@ func (ec *executionContext) marshalNGithub__com___kloudlite___api___apps___infra return ret } -func (ec *executionContext) marshalNGithub__com___kloudlite___api___apps___infra___internal___entities__InputField2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsInfraInternalEntitiesInputField(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteAPIAppsInfraInternalEntitiesInputField) graphql.Marshaler { +func (ec *executionContext) marshalNGithub__com___kloudlite___api___apps___infra___internal___entities__OutputField2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsInfraInternalEntitiesOutputField(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteAPIAppsInfraInternalEntitiesOutputField) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } - return ec._Github__com___kloudlite___api___apps___infra___internal___entities__InputField(ctx, sel, v) + return ec._Github__com___kloudlite___api___apps___infra___internal___entities__OutputField(ctx, sel, v) } -func (ec *executionContext) marshalNGithub__com___kloudlite___api___apps___infra___internal___entities__MresTemplate2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsInfraInternalEntitiesMresTemplateᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.GithubComKloudliteAPIAppsInfraInternalEntitiesMresTemplate) graphql.Marshaler { - ret := make(graphql.Array, len(v)) - var wg sync.WaitGroup - isLen1 := len(v) == 1 - if !isLen1 { - wg.Add(len(v)) - } - for i := range v { - i := i - fc := &graphql.FieldContext{ - Index: &i, - Result: &v[i], - } - ctx := graphql.WithFieldContext(ctx, fc) - f := func(i int) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil - } - }() - if !isLen1 { - defer wg.Done() - } - ret[i] = ec.marshalNGithub__com___kloudlite___api___apps___infra___internal___entities__MresTemplate2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsInfraInternalEntitiesMresTemplate(ctx, sel, v[i]) - } - if isLen1 { - f(i) - } else { - go f(i) - } +func (ec *executionContext) marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx context.Context, sel ast.SelectionSet, v common.CreatedOrUpdatedBy) graphql.Marshaler { + return ec._Github__com___kloudlite___api___common__CreatedOrUpdatedBy(ctx, sel, &v) +} - } - wg.Wait() +func (ec *executionContext) unmarshalNGithub__com___kloudlite___api___pkg___types__SyncAction2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncAction(ctx context.Context, v interface{}) (types.SyncAction, error) { + tmp, err := graphql.UnmarshalString(v) + res := types.SyncAction(tmp) + return res, graphql.ErrorOnPath(ctx, err) +} - for _, e := range ret { - if e == graphql.Null { - return graphql.Null +func (ec *executionContext) marshalNGithub__com___kloudlite___api___pkg___types__SyncAction2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncAction(ctx context.Context, sel ast.SelectionSet, v types.SyncAction) graphql.Marshaler { + res := graphql.MarshalString(string(v)) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } } + return res +} - return ret +func (ec *executionContext) unmarshalNGithub__com___kloudlite___api___pkg___types__SyncState2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncState(ctx context.Context, v interface{}) (types.SyncState, error) { + tmp, err := graphql.UnmarshalString(v) + res := types.SyncState(tmp) + return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNGithub__com___kloudlite___api___apps___infra___internal___entities__MresTemplate2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsInfraInternalEntitiesMresTemplate(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteAPIAppsInfraInternalEntitiesMresTemplate) graphql.Marshaler { - if v == nil { +func (ec *executionContext) marshalNGithub__com___kloudlite___api___pkg___types__SyncState2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncState(ctx context.Context, sel ast.SelectionSet, v types.SyncState) graphql.Marshaler { + res := graphql.MarshalString(string(v)) + if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") } - return graphql.Null } - return ec._Github__com___kloudlite___api___apps___infra___internal___entities__MresTemplate(ctx, sel, v) + return res } -func (ec *executionContext) marshalNGithub__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐMsvcTemplateEntry(ctx context.Context, sel ast.SelectionSet, v entities.MsvcTemplateEntry) graphql.Marshaler { - return ec._Github__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry(ctx, sel, &v) +func (ec *executionContext) marshalNGithub__com___kloudlite___api___pkg___types__SyncStatus2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncStatus(ctx context.Context, sel ast.SelectionSet, v types.SyncStatus) graphql.Marshaler { + return ec._Github__com___kloudlite___api___pkg___types__SyncStatus(ctx, sel, &v) } -func (ec *executionContext) marshalNGithub__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry2ᚕgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐMsvcTemplateEntryᚄ(ctx context.Context, sel ast.SelectionSet, v []entities.MsvcTemplateEntry) graphql.Marshaler { - ret := make(graphql.Array, len(v)) - var wg sync.WaitGroup - isLen1 := len(v) == 1 - if !isLen1 { - wg.Add(len(v)) - } - for i := range v { - i := i - fc := &graphql.FieldContext{ - Index: &i, - Result: &v[i], - } - ctx := graphql.WithFieldContext(ctx, fc) - f := func(i int) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil - } - }() - if !isLen1 { - defer wg.Done() - } - ret[i] = ec.marshalNGithub__com___kloudlite___api___apps___infra___internal___entities__MsvcTemplateEntry2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋentitiesᚐMsvcTemplateEntry(ctx, sel, v[i]) - } - if isLen1 { - f(i) - } else { - go f(i) - } - - } - wg.Wait() - - for _, e := range ret { - if e == graphql.Null { - return graphql.Null - } - } +func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___clusters___v1__AWSPoolType2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSPoolType(ctx context.Context, v interface{}) (model.GithubComKloudliteOperatorApisClustersV1AWSPoolType, error) { + var res model.GithubComKloudliteOperatorApisClustersV1AWSPoolType + err := res.UnmarshalGQL(v) + return res, graphql.ErrorOnPath(ctx, err) +} - return ret +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___clusters___v1__AWSPoolType2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSPoolType(ctx context.Context, sel ast.SelectionSet, v model.GithubComKloudliteOperatorApisClustersV1AWSPoolType) graphql.Marshaler { + return v } -func (ec *executionContext) marshalNGithub__com___kloudlite___api___apps___infra___internal___entities__OutputField2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsInfraInternalEntitiesOutputFieldᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.GithubComKloudliteAPIAppsInfraInternalEntitiesOutputField) graphql.Marshaler { +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsSubnetWithIDᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.GithubComKloudliteOperatorApisClustersV1AwsSubnetWithID) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -60192,7 +60534,7 @@ func (ec *executionContext) marshalNGithub__com___kloudlite___api___apps___infra if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNGithub__com___kloudlite___api___apps___infra___internal___entities__OutputField2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsInfraInternalEntitiesOutputField(ctx, sel, v[i]) + ret[i] = ec.marshalNGithub__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsSubnetWithID(ctx, sel, v[i]) } if isLen1 { f(i) @@ -60212,64 +60554,14 @@ func (ec *executionContext) marshalNGithub__com___kloudlite___api___apps___infra return ret } -func (ec *executionContext) marshalNGithub__com___kloudlite___api___apps___infra___internal___entities__OutputField2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsInfraInternalEntitiesOutputField(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteAPIAppsInfraInternalEntitiesOutputField) graphql.Marshaler { +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsSubnetWithID(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisClustersV1AwsSubnetWithID) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } - return ec._Github__com___kloudlite___api___apps___infra___internal___entities__OutputField(ctx, sel, v) -} - -func (ec *executionContext) marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx context.Context, sel ast.SelectionSet, v common.CreatedOrUpdatedBy) graphql.Marshaler { - return ec._Github__com___kloudlite___api___common__CreatedOrUpdatedBy(ctx, sel, &v) -} - -func (ec *executionContext) unmarshalNGithub__com___kloudlite___api___pkg___types__SyncAction2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncAction(ctx context.Context, v interface{}) (types.SyncAction, error) { - tmp, err := graphql.UnmarshalString(v) - res := types.SyncAction(tmp) - return res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalNGithub__com___kloudlite___api___pkg___types__SyncAction2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncAction(ctx context.Context, sel ast.SelectionSet, v types.SyncAction) graphql.Marshaler { - res := graphql.MarshalString(string(v)) - if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "the requested element is null which the schema does not allow") - } - } - return res -} - -func (ec *executionContext) unmarshalNGithub__com___kloudlite___api___pkg___types__SyncState2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncState(ctx context.Context, v interface{}) (types.SyncState, error) { - tmp, err := graphql.UnmarshalString(v) - res := types.SyncState(tmp) - return res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalNGithub__com___kloudlite___api___pkg___types__SyncState2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncState(ctx context.Context, sel ast.SelectionSet, v types.SyncState) graphql.Marshaler { - res := graphql.MarshalString(string(v)) - if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "the requested element is null which the schema does not allow") - } - } - return res -} - -func (ec *executionContext) marshalNGithub__com___kloudlite___api___pkg___types__SyncStatus2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋtypesᚐSyncStatus(ctx context.Context, sel ast.SelectionSet, v types.SyncStatus) graphql.Marshaler { - return ec._Github__com___kloudlite___api___pkg___types__SyncStatus(ctx, sel, &v) -} - -func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___clusters___v1__AWSPoolType2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSPoolType(ctx context.Context, v interface{}) (model.GithubComKloudliteOperatorApisClustersV1AWSPoolType, error) { - var res model.GithubComKloudliteOperatorApisClustersV1AWSPoolType - err := res.UnmarshalGQL(v) - return res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___clusters___v1__AWSPoolType2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AWSPoolType(ctx context.Context, sel ast.SelectionSet, v model.GithubComKloudliteOperatorApisClustersV1AWSPoolType) graphql.Marshaler { - return v + return ec._Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID(ctx, sel, v) } func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___clusters___v1__ClusterSpec2githubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1ClusterSpec(ctx context.Context, sel ast.SelectionSet, v model.GithubComKloudliteOperatorApisClustersV1ClusterSpec) graphql.Marshaler { @@ -61662,7 +61954,7 @@ func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel a return res } -func (ec *executionContext) unmarshalOAny2interface(ctx context.Context, v interface{}) (interface{}, error) { +func (ec *executionContext) unmarshalOAny2interface(ctx context.Context, v interface{}) (any, error) { if v == nil { return nil, nil } @@ -61670,7 +61962,7 @@ func (ec *executionContext) unmarshalOAny2interface(ctx context.Context, v inter return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOAny2interface(ctx context.Context, sel ast.SelectionSet, v interface{}) graphql.Marshaler { +func (ec *executionContext) marshalOAny2interface(ctx context.Context, sel ast.SelectionSet, v any) graphql.Marshaler { if v == nil { return graphql.Null } @@ -61983,6 +62275,13 @@ func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis_ return &res, graphql.ErrorOnPath(ctx, err) } +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1AwsVPCParams(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisClustersV1AwsVPCParams) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams(ctx, sel, v) +} + func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___clusters___v1__CloudProviderCredentialKeys2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋinfraᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisClustersV1CloudProviderCredentialKeys(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisClustersV1CloudProviderCredentialKeys) graphql.Marshaler { if v == nil { return graphql.Null diff --git a/apps/infra/internal/app/graph/model/models_gen.go b/apps/infra/internal/app/graph/model/models_gen.go index 53abc6939..dacb1b204 100644 --- a/apps/infra/internal/app/graph/model/models_gen.go +++ b/apps/infra/internal/app/graph/model/models_gen.go @@ -118,6 +118,7 @@ type GithubComKloudliteOperatorApisClustersV1AWSClusterConfig struct { NodePools map[string]interface{} `json:"nodePools,omitempty"` Region string `json:"region"` SpotNodePools map[string]interface{} `json:"spotNodePools,omitempty"` + Vpc *GithubComKloudliteOperatorApisClustersV1AwsVPCParams `json:"vpc,omitempty"` } type GithubComKloudliteOperatorApisClustersV1AWSClusterConfigIn struct { @@ -127,8 +128,6 @@ type GithubComKloudliteOperatorApisClustersV1AWSClusterConfigIn struct { type GithubComKloudliteOperatorApisClustersV1AWSK3sMastersConfig struct { IamInstanceProfileRole *string `json:"iamInstanceProfileRole,omitempty"` - ImageID string `json:"imageId"` - ImageSSHUsername string `json:"imageSSHUsername"` InstanceType string `json:"instanceType"` Nodes map[string]interface{} `json:"nodes,omitempty"` NvidiaGpuEnabled bool `json:"nvidiaGpuEnabled"` @@ -145,13 +144,13 @@ type GithubComKloudliteOperatorApisClustersV1AWSNodePoolConfig struct { AvailabilityZone string `json:"availabilityZone"` Ec2Pool *GithubComKloudliteOperatorApisClustersV1AwsEC2PoolConfig `json:"ec2Pool,omitempty"` IamInstanceProfileRole *string `json:"iamInstanceProfileRole,omitempty"` - ImageID string `json:"imageId"` - ImageSSHUsername string `json:"imageSSHUsername"` NvidiaGpuEnabled bool `json:"nvidiaGpuEnabled"` PoolType GithubComKloudliteOperatorApisClustersV1AWSPoolType `json:"poolType"` RootVolumeSize int `json:"rootVolumeSize"` RootVolumeType string `json:"rootVolumeType"` SpotPool *GithubComKloudliteOperatorApisClustersV1AwsSpotPoolConfig `json:"spotPool,omitempty"` + VpcID string `json:"vpcId"` + VpcSubnetID string `json:"vpcSubnetId"` } type GithubComKloudliteOperatorApisClustersV1AWSNodePoolConfigIn struct { @@ -205,6 +204,16 @@ type GithubComKloudliteOperatorApisClustersV1AwsSpotPoolConfigIn struct { Nodes map[string]interface{} `json:"nodes,omitempty"` } +type GithubComKloudliteOperatorApisClustersV1AwsSubnetWithID struct { + AvailabilityZone string `json:"availabilityZone"` + ID string `json:"id"` +} + +type GithubComKloudliteOperatorApisClustersV1AwsVPCParams struct { + ID string `json:"id"` + PublicSubnets []*GithubComKloudliteOperatorApisClustersV1AwsSubnetWithID `json:"publicSubnets"` +} + type GithubComKloudliteOperatorApisClustersV1CloudProviderCredentialKeys struct { KeyAccessKey string `json:"keyAccessKey"` KeyAWSAccountID string `json:"keyAWSAccountId"` @@ -1311,9 +1320,8 @@ type SearchCluster struct { } type SearchClusterManagedService struct { - IsReady *repos.MatchFilter `json:"isReady,omitempty"` - Text *repos.MatchFilter `json:"text,omitempty"` - IsStateful *repos.MatchFilter `json:"isStateful,omitempty"` + IsReady *repos.MatchFilter `json:"isReady,omitempty"` + Text *repos.MatchFilter `json:"text,omitempty"` } type SearchDomainEntry struct { @@ -1331,7 +1339,8 @@ type SearchNamespaces struct { } type SearchNodepool struct { - Text *repos.MatchFilter `json:"text,omitempty"` + Text *repos.MatchFilter `json:"text,omitempty"` + IsStateful *repos.MatchFilter `json:"isStateful,omitempty"` } type SearchPersistentVolumeClaims struct { diff --git a/apps/infra/internal/app/graph/struct-to-graphql/common-types.graphqls b/apps/infra/internal/app/graph/struct-to-graphql/common-types.graphqls index 08f8cd986..97695b481 100644 --- a/apps/infra/internal/app/graph/struct-to-graphql/common-types.graphqls +++ b/apps/infra/internal/app/graph/struct-to-graphql/common-types.graphqls @@ -71,12 +71,11 @@ type Github__com___kloudlite___operator___apis___clusters___v1__AWSClusterConfig nodePools: Map region: String! spotNodePools: Map + vpc: Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams } type Github__com___kloudlite___operator___apis___clusters___v1__AWSK3sMastersConfig @shareable { iamInstanceProfileRole: String - imageId: String! - imageSSHUsername: String! instanceType: String! nodes: Map nvidiaGpuEnabled: Boolean! @@ -88,13 +87,13 @@ type Github__com___kloudlite___operator___apis___clusters___v1__AWSNodePoolConfi availabilityZone: String! ec2Pool: Github__com___kloudlite___operator___apis___clusters___v1__AwsEC2PoolConfig iamInstanceProfileRole: String - imageId: String! - imageSSHUsername: String! nvidiaGpuEnabled: Boolean! poolType: Github__com___kloudlite___operator___apis___clusters___v1__AWSPoolType! rootVolumeSize: Int! rootVolumeType: String! spotPool: Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfig + vpcId: String! + vpcSubnetId: String! } type Github__com___kloudlite___operator___apis___clusters___v1__AwsEC2PoolConfig @shareable { @@ -118,6 +117,16 @@ type Github__com___kloudlite___operator___apis___clusters___v1__AwsSpotPoolConfi spotFleetTaggingRoleName: String! } +type Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID @shareable { + availabilityZone: String! + id: String! +} + +type Github__com___kloudlite___operator___apis___clusters___v1__AwsVPCParams @shareable { + id: String! + publicSubnets: [Github__com___kloudlite___operator___apis___clusters___v1__AwsSubnetWithID!]! +} + type Github__com___kloudlite___operator___apis___clusters___v1__CloudProviderCredentialKeys @shareable { keyAccessKey: String! keyAWSAccountId: String! diff --git a/apps/infra/internal/domain/clusters.go b/apps/infra/internal/domain/clusters.go index f278f5d50..56f74a028 100644 --- a/apps/infra/internal/domain/clusters.go +++ b/apps/infra/internal/domain/clusters.go @@ -194,8 +194,6 @@ func (d *domain) CreateCluster(ctx InfraContext, cluster entities.Cluster) (*ent return &clustersv1.AWSClusterConfig{ Region: cluster.Spec.AWS.Region, K3sMasters: clustersv1.AWSK3sMastersConfig{ - ImageId: d.env.AWSAMI, - ImageSSHUsername: "ubuntu", InstanceType: cluster.Spec.AWS.K3sMasters.InstanceType, NvidiaGpuEnabled: cluster.Spec.AWS.K3sMasters.NvidiaGpuEnabled, RootVolumeType: "gp3", @@ -505,6 +503,7 @@ func (d *domain) OnClusterUpdateMessage(ctx InfraContext, cluster entities.Clust MessageTimestamp: opts.MessageTimestamp, XPatch: repos.Document{ fc.ClusterSpecOutput: cluster.Spec.Output, + fc.ClusterSpecAwsVpc: cluster.Spec.AWS.VPC, }, })) d.resourceEventPublisher.PublishInfraEvent(ctx, ResourceTypeCluster, uCluster.GetName(), PublishUpdate) diff --git a/apps/infra/internal/domain/nodepool.go b/apps/infra/internal/domain/nodepool.go index 22fd3badd..0807140d5 100644 --- a/apps/infra/internal/domain/nodepool.go +++ b/apps/infra/internal/domain/nodepool.go @@ -46,9 +46,15 @@ func (d *domain) CreateNodePool(ctx InfraContext, clusterName string, nodepool e switch nodepool.Spec.CloudProvider { case ct.CloudProviderAWS: { + + awsSubnetID := cluster.Spec.AWS.VPC.GetSubnetId(nodepool.Spec.AWS.AvailabilityZone) + if awsSubnetID == "" { + return nil, errors.Newf("kloudlite VPC has no subnet configured for this availability zone (%s), please select another availability zone in your cluster's region (%s)", nodepool.Spec.AWS.AvailabilityZone, cluster.Spec.AWS.Region) + } + nodepool.Spec.AWS = &clustersv1.AWSNodePoolConfig{ - ImageId: d.env.AWSAMI, - ImageSSHUsername: "ubuntu", + VPCId: cluster.Spec.AWS.VPC.ID, + VPCSubnetID: awsSubnetID, AvailabilityZone: nodepool.Spec.AWS.AvailabilityZone, NvidiaGpuEnabled: nodepool.Spec.AWS.NvidiaGpuEnabled, diff --git a/apps/infra/internal/entities/field-constants/generated_constants.go b/apps/infra/internal/entities/field-constants/generated_constants.go index 3c837d800..f8e458cf4 100644 --- a/apps/infra/internal/entities/field-constants/generated_constants.go +++ b/apps/infra/internal/entities/field-constants/generated_constants.go @@ -37,8 +37,6 @@ const ( ClusterSpecAws = "spec.aws" ClusterSpecAwsK3sMasters = "spec.aws.k3sMasters" ClusterSpecAwsK3sMastersIamInstanceProfileRole = "spec.aws.k3sMasters.iamInstanceProfileRole" - ClusterSpecAwsK3sMastersImageId = "spec.aws.k3sMasters.imageId" - ClusterSpecAwsK3sMastersImageSSHUsername = "spec.aws.k3sMasters.imageSSHUsername" ClusterSpecAwsK3sMastersInstanceType = "spec.aws.k3sMasters.instanceType" ClusterSpecAwsK3sMastersNodes = "spec.aws.k3sMasters.nodes" ClusterSpecAwsK3sMastersNvidiaGpuEnabled = "spec.aws.k3sMasters.nvidiaGpuEnabled" @@ -47,6 +45,9 @@ const ( ClusterSpecAwsNodePools = "spec.aws.nodePools" ClusterSpecAwsRegion = "spec.aws.region" ClusterSpecAwsSpotNodePools = "spec.aws.spotNodePools" + ClusterSpecAwsVpc = "spec.aws.vpc" + ClusterSpecAwsVpcId = "spec.aws.vpc.id" + ClusterSpecAwsVpcPublicSubnets = "spec.aws.vpc.publicSubnets" ClusterSpecBackupToS3Enabled = "spec.backupToS3Enabled" ClusterSpecCloudProvider = "spec.cloudProvider" ClusterSpecCloudflareEnabled = "spec.cloudflareEnabled" @@ -70,6 +71,8 @@ const ( ClusterSpecOutput = "spec.output" ClusterSpecOutputJobName = "spec.output.jobName" ClusterSpecOutputJobNamespace = "spec.output.jobNamespace" + ClusterSpecOutputKeyAWSVPCId = "spec.output.keyAWSVPCId" + ClusterSpecOutputKeyAWSVPCPublicSubnets = "spec.output.keyAWSVPCPublicSubnets" ClusterSpecOutputKeyK3sAgentJoinToken = "spec.output.keyK3sAgentJoinToken" ClusterSpecOutputKeyK3sServerJoinToken = "spec.output.keyK3sServerJoinToken" ClusterSpecOutputKeyKubeconfig = "spec.output.keyKubeconfig" @@ -142,6 +145,7 @@ const ( HelmReleaseSpecPostUninstall = "spec.postUninstall" HelmReleaseSpecPreInstall = "spec.preInstall" HelmReleaseSpecPreUninstall = "spec.preUninstall" + HelmReleaseSpecReleaseName = "spec.releaseName" HelmReleaseSpecValues = "spec.values" ) @@ -205,8 +209,6 @@ const ( NodePoolSpecAwsEc2PoolInstanceType = "spec.aws.ec2Pool.instanceType" NodePoolSpecAwsEc2PoolNodes = "spec.aws.ec2Pool.nodes" NodePoolSpecAwsIamInstanceProfileRole = "spec.aws.iamInstanceProfileRole" - NodePoolSpecAwsImageId = "spec.aws.imageId" - NodePoolSpecAwsImageSSHUsername = "spec.aws.imageSSHUsername" NodePoolSpecAwsNvidiaGpuEnabled = "spec.aws.nvidiaGpuEnabled" NodePoolSpecAwsPoolType = "spec.aws.poolType" NodePoolSpecAwsRootVolumeSize = "spec.aws.rootVolumeSize" @@ -223,21 +225,9 @@ const ( NodePoolSpecAwsSpotPoolGpuNodeInstanceTypes = "spec.aws.spotPool.gpuNode.instanceTypes" NodePoolSpecAwsSpotPoolNodes = "spec.aws.spotPool.nodes" NodePoolSpecAwsSpotPoolSpotFleetTaggingRoleName = "spec.aws.spotPool.spotFleetTaggingRoleName" + NodePoolSpecAwsVpcId = "spec.aws.vpcId" + NodePoolSpecAwsVpcSubnetId = "spec.aws.vpcSubnetId" NodePoolSpecCloudProvider = "spec.cloudProvider" - NodePoolSpecIac = "spec.iac" - NodePoolSpecIacCloudProviderAccessKey = "spec.iac.cloudProviderAccessKey" - NodePoolSpecIacCloudProviderAccessKeyKey = "spec.iac.cloudProviderAccessKey.key" - NodePoolSpecIacCloudProviderAccessKeyName = "spec.iac.cloudProviderAccessKey.name" - NodePoolSpecIacCloudProviderAccessKeyNamespace = "spec.iac.cloudProviderAccessKey.namespace" - NodePoolSpecIacCloudProviderSecretKey = "spec.iac.cloudProviderSecretKey" - NodePoolSpecIacCloudProviderSecretKeyKey = "spec.iac.cloudProviderSecretKey.key" - NodePoolSpecIacCloudProviderSecretKeyName = "spec.iac.cloudProviderSecretKey.name" - NodePoolSpecIacCloudProviderSecretKeyNamespace = "spec.iac.cloudProviderSecretKey.namespace" - NodePoolSpecIacJobName = "spec.iac.jobName" - NodePoolSpecIacJobNamespace = "spec.iac.jobNamespace" - NodePoolSpecIacStateS3BucketFilePath = "spec.iac.stateS3BucketFilePath" - NodePoolSpecIacStateS3BucketName = "spec.iac.stateS3BucketName" - NodePoolSpecIacStateS3BucketRegion = "spec.iac.stateS3BucketRegion" NodePoolSpecMaxCount = "spec.maxCount" NodePoolSpecMinCount = "spec.minCount" NodePoolSpecNodeLabels = "spec.nodeLabels" diff --git a/apps/infra/internal/env/env.go b/apps/infra/internal/env/env.go index 75e8f703b..c9864a8f4 100644 --- a/apps/infra/internal/env/env.go +++ b/apps/infra/internal/env/env.go @@ -34,16 +34,15 @@ type Env struct { AWSAccessKey string `env:"AWS_ACCESS_KEY" required:"true"` AWSSecretKey string `env:"AWS_SECRET_KEY" required:"true"` - AWSAMI string `env:"AWS_AMI_ID" required:"true" default:"ami-0ec149e1e8b76e957"` - PublicDNSHostSuffix string `env:"PUBLIC_DNS_HOST_SUFFIX" required:"true"` SessionKVBucket string `env:"SESSION_KV_BUCKET" required:"true"` - IsDev bool - KubernetesApiProxy string `env:"KUBERNETES_API_PROXY"` MsvcTemplateFilePath string `env:"MSVC_TEMPLATE_FILE_PATH" required:"true"` KloudliteRelease string `env:"KLOUDLITE_RELEASE" required:"true"` + + IsDev bool + KubernetesApiProxy string `env:"KUBERNETES_API_PROXY"` } func LoadEnv() (*Env, error) { diff --git a/go.mod b/go.mod index 446f7cddf..fb0275bec 100644 --- a/go.mod +++ b/go.mod @@ -42,7 +42,7 @@ require ( require ( github.com/kloudlite/container-registry-authorizer v0.0.0-20231021122509-161dc30fde55 - github.com/kloudlite/operator v1.0.4-0.20240222110024-40f5cdf20fd5 + github.com/kloudlite/operator v1.0.4-0.20240301102315-eaaca2bf5858 github.com/nats-io/nats.go v1.31.0 github.com/onsi/ginkgo/v2 v2.12.0 github.com/onsi/gomega v1.27.10 diff --git a/go.sum b/go.sum index b48c84084..08f29828c 100644 --- a/go.sum +++ b/go.sum @@ -172,6 +172,8 @@ github.com/kloudlite/operator v1.0.3-0.20240214140630-cabaf59fe3d4 h1:bpYACb4+ay github.com/kloudlite/operator v1.0.3-0.20240214140630-cabaf59fe3d4/go.mod h1:eD8xKzwOVtajAglELcEHn2XL4H22ERBLT2uaisA6SzQ= github.com/kloudlite/operator v1.0.4-0.20240222110024-40f5cdf20fd5 h1:4MpUX5eGryD03gMG4XuzdvfsTjSSUtJhTI4OR+vE2q0= github.com/kloudlite/operator v1.0.4-0.20240222110024-40f5cdf20fd5/go.mod h1:kMXogvCB4qSG56WlJ5lhyL6JVeVLJ+IyyE18g/1FF1I= +github.com/kloudlite/operator v1.0.4-0.20240301102315-eaaca2bf5858 h1:9xwI6Kg3nyUfbElzjb/XMM7PM1O5aVlde+4Ftcs7ZtM= +github.com/kloudlite/operator v1.0.4-0.20240301102315-eaaca2bf5858/go.mod h1:kMXogvCB4qSG56WlJ5lhyL6JVeVLJ+IyyE18g/1FF1I= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=