{"record":{"id":"0044089ab4f857dd","repo":"tailscale/tailscale","slug":"failed-to-update-tailscaled-config-w-004408","errorCode":null,"errorMessage":"failed to update tailscaled config: %w","messagePattern":"failed to update tailscaled config: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/k8s-operator/svc-for-pg.go","lineNumber":332,"sourceCode":"\n\texistingCfg := cfgs[serviceName.String()]\n\tif !reflect.DeepEqual(existingCfg, cfg) {\n\t\tmak.Set(&cfgs, serviceName.String(), cfg)\n\t\tcfgBytes, err := json.Marshal(cfgs)\n\t\tif err != nil {\n\t\t\treturn false, fmt.Errorf(\"error marshaling ingress config: %w\", err)\n\t\t}\n\t\tmak.Set(&cm.BinaryData, ingressservices.IngressConfigKey, cfgBytes)\n\t\tif err := r.Update(ctx, cm); err != nil {\n\t\t\treturn false, fmt.Errorf(\"error updating ingress config: %w\", err)\n\t\t}\n\t}\n\n\tlogger.Infof(\"updating AdvertiseServices config\")\n\t// 4. Update tailscaled's AdvertiseServices config, which should add the Tailscale Service\n\t// IPs to the ProxyGroup Pods' AllowedIPs in the next netmap update if approved.\n\tif err = r.maybeUpdateAdvertiseServicesConfig(ctx, svc, pg.Name, serviceName, &cfg, true, logger); err != nil {\n\t\treturn false, fmt.Errorf(\"failed to update tailscaled config: %w\", err)\n\t}\n\n\tcount, err := r.numberPodsAdvertising(ctx, pg.Name, serviceName)\n\tif err != nil {\n\t\treturn false, fmt.Errorf(\"failed to get number of advertised Pods: %w\", err)\n\t}\n\n\t// TODO(irbekrm): here and when creating the Tailscale Service, verify if the\n\t// error is not terminal (and therefore should not be reconciled). For\n\t// example, if the hostname is already a hostname of a Tailscale node,\n\t// the GET here will fail.\n\t// If there are no Pods advertising the Tailscale Service (yet), we want to set 'svc.Status.LoadBalancer.Ingress' to nil\"\n\tvar lbs []corev1.LoadBalancerIngress\n\tconditionStatus := metav1.ConditionFalse\n\tconditionType := tsapi.IngressSvcConfigured\n\tconditionReason := reasonIngressSvcNoBackendsConfigured\n\tconditionMessage := fmt.Sprintf(\"%d/%d proxy backends ready and advertising\", count, pgReplicas(pg))\n\tif count != 0 {","sourceCodeStart":314,"sourceCodeEnd":350,"githubUrl":"https://github.com/tailscale/tailscale/blob/cfe32b8be6a33f8e24fbc369cbfbf7c729d9e042/cmd/k8s-operator/svc-for-pg.go#L314-L350","documentation":"Error \"failed to update tailscaled config: %w\" thrown in tailscale/tailscale.","triggerScenarios":"Thrown at cmd/k8s-operator/svc-for-pg.go:332 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"cfe32b8be6a33f8e24fbc369cbfbf7c729d9e042","analyzedAt":"2026-08-15T19:58:31.583Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}