{"record":{"id":"9de728d728a83431","repo":"kubernetes/kops","slug":"building-load-balancer-task-w","errorCode":null,"errorMessage":"building load-balancer task: %w","messagePattern":"building load-balancer task: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/model/scalewaymodel/api_loadbalancer.go","lineNumber":60,"sourceCode":"\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),\n\t\tZone:                  new(string(zone)),\n\t\tType:                  scalewaytasks.LbDefaultType,\n\t\tLifecycle:             b.Lifecycle,\n\t\tTags:                  lbTags,\n\t\tDescription:           \"Load-balancer for kops cluster \" + b.ClusterName(),","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/model/scalewaymodel/api_loadbalancer.go#L42-L78","documentation":"Wrapped failure while parsing the Scaleway availability zone from the cluster spec (scaleway.ParseZoneFromClusterSpec) during load-balancer task construction. The root cause is an empty or malformed zone in the spec; this message is the wrapping layer.","triggerScenarios":"Thrown at pkg/model/scalewaymodel/api_loadbalancer.go:60 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set a valid Scaleway zone (e.g. fr-par-1) in the cluster spec","Check the wrapped error for exactly which field failed to parse","Re-run `kops update cluster` after correcting the zone"],"exampleFix":null,"handlingStrategy":"try-catch","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"}