{"record":{"id":"b47ded59880ed831","repo":"kubernetes/kops","slug":"unhandled-load-balancer-type-q","errorCode":null,"errorMessage":"unhandled load-balancer type %q","messagePattern":"unhandled load-balancer type %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/model/scalewaymodel/api_loadbalancer.go","lineNumber":55,"sourceCode":"}\n\nvar _ fi.CloudupModelBuilder = &APILoadBalancerModelBuilder{}\n\nfunc (b *APILoadBalancerModelBuilder) Build(c *fi.CloudupModelBuilderContext) error {\n\t// Configuration where a load balancer fronts the API\n\tif !b.UseLoadBalancerForAPI() {\n\t\treturn nil\n\t}\n\n\tlbSpec := b.Cluster.Spec.API.LoadBalancer\n\n\tswitch lbSpec.Type {\n\tcase kops.LoadBalancerTypePublic:\n\t\tklog.V(8).Infof(\"Using public load-balancer\")\n\tcase kops.LoadBalancerTypeInternal:\n\t\treturn fmt.Errorf(\"Scaleway clusters don't have a VPC yet, so internal load-balancers are not supported at the time\")\n\tdefault:\n\t\treturn fmt.Errorf(\"unhandled load-balancer type %q\", lbSpec.Type)\n\t}\n\n\tzone, err := scaleway.ParseZoneFromClusterSpec(b.Cluster.Spec)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"building load-balancer task: %w\", err)\n\t}\n\n\tlbTags := []string{\n\t\tfmt.Sprintf(\"%s=%s\", scaleway.TagClusterName, b.ClusterName()),\n\t\tfmt.Sprintf(\"%s=%s\", scaleway.TagNameRolePrefix, scaleway.TagRoleControlPlane),\n\t}\n\tfor k, v := range b.CloudTags(b.ClusterName(), false) {\n\t\tlbTags = append(lbTags, fmt.Sprintf(\"%s=%s\", k, v))\n\t}\n\n\tloadBalancerName := \"api.\" + b.ClusterName()\n\tloadBalancer := &scalewaytasks.LoadBalancer{\n\t\tName:                  new(loadBalancerName),","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/model/scalewaymodel/api_loadbalancer.go#L37-L73","documentation":"The switch over spec.api.loadBalancer.type hit the default case in the Scaleway LB builder: the configured type matches neither Public nor Internal. It indicates an unrecognized/unsupported enum value for this provider.","triggerScenarios":"Thrown at pkg/model/scalewaymodel/api_loadbalancer.go:55 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set spec.api.loadBalancer.type to a supported value (Public) in the cluster spec","Upgrade kOps if a newer load-balancer type is expected to be supported"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}