{"record":{"id":"5e00fe82177cc96d","repo":"kubernetes/kops","slug":"s-must-be-set-for-bare-metal","errorCode":null,"errorMessage":"%s must be set for bare metal","messagePattern":"(.+?) must be set for bare metal","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/metal/cloud.go","lineNumber":141,"sourceCode":"}\n\n// FindClusterStatus discovers the status of the cluster, by inspecting the cloud objects\nfunc (c *Cloud) FindClusterStatus(cluster *kops.Cluster) (*kops.ClusterStatus, error) {\n\t// etcdStatus, err := findEtcdStatus(c, cluster)\n\t// if err != nil {\n\t//      return nil, err\n\t// }\n\tklog.Warningf(\"method metal.Cloud::FindClusterStatus stub-implemented\")\n\treturn &kops.ClusterStatus{\n\t\t// EtcdClusters: etcdStatus,\n\t}, nil\n}\n\nfunc (c *Cloud) GetApiIngressStatus(cluster *kops.Cluster) ([]fi.ApiIngressStatus, error) {\n\tvar ret []fi.ApiIngressStatus\n\tpublicName := cluster.Spec.API.PublicName\n\tif publicName == \"\" {\n\t\treturn ret, fmt.Errorf(\"%s must be set for bare metal\", kops.HumanPathForClusterField(\"spec.api.publicName\"))\n\t}\n\tip := net.ParseIP(publicName)\n\tif ip == nil {\n\t\tret = append(ret, fi.ApiIngressStatus{\n\t\t\tHostname: publicName,\n\t\t})\n\t} else {\n\t\tret = append(ret, fi.ApiIngressStatus{\n\t\t\tIP: publicName,\n\t\t})\n\t}\n\treturn ret, nil\n}\n","sourceCodeStart":123,"sourceCodeEnd":155,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/metal/cloud.go#L123-L155","documentation":"GetApiIngressStatus validation for bare metal: fires when cluster.Spec.API.PublicName (the public DNS name pointing at the metal API endpoint) is empty, since API ingress status cannot be computed without it. The message interpolates the empty name.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/metal/cloud.go:141 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set spec.api.publicName in the cluster spec for bare-metal clusters","Ensure the public name resolves to the API server's address"],"exampleFix":null,"handlingStrategy":"validation","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"}