{"record":{"id":"f0f2b8215bd781a4","repo":"tailscale/tailscale","slug":"failed-to-unmarshal-proxy-spec-w","errorCode":null,"errorMessage":"failed to unmarshal proxy spec: %w","messagePattern":"failed to unmarshal proxy spec: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/k8s-operator/sts.go","lineNumber":645,"sourceCode":"\n\treturn key.Key, nil\n}\n\n//go:embed deploy/manifests/proxy.yaml\nvar proxyYaml []byte\n\n//go:embed deploy/manifests/userspace-proxy.yaml\nvar userspaceProxyYaml []byte\n\nfunc (r *tailscaleSTSReconciler) reconcileSTS(ctx context.Context, logger *zap.SugaredLogger, sts *tailscaleSTSConfig, headlessSvc *corev1.Service, proxySecrets []string) (*appsv1.StatefulSet, error) {\n\tss := new(appsv1.StatefulSet)\n\tif sts.ServeConfig != nil && sts.ForwardClusterTrafficViaL7IngressProxy != true { // If forwarding cluster traffic via is required we need non-userspace + NET_ADMIN + forwarding\n\t\tif err := yaml.Unmarshal(userspaceProxyYaml, &ss); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to unmarshal userspace proxy spec: %v\", err)\n\t\t}\n\t} else {\n\t\tif err := yaml.Unmarshal(proxyYaml, &ss); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to unmarshal proxy spec: %w\", err)\n\t\t}\n\t\tfor i := range ss.Spec.Template.Spec.InitContainers {\n\t\t\tc := &ss.Spec.Template.Spec.InitContainers[i]\n\t\t\tif c.Name == \"sysctler\" {\n\t\t\t\tc.Image = r.proxyImage\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\tpod := &ss.Spec.Template\n\tcontainer := &pod.Spec.Containers[0]\n\tcontainer.Image = r.proxyImage\n\tss.ObjectMeta = metav1.ObjectMeta{\n\t\tName:      headlessSvc.Name,\n\t\tNamespace: r.operatorNamespace,\n\t}\n\tfor key, val := range sts.ChildResourceLabels {\n\t\tmak.Set(&ss.ObjectMeta.Labels, key, val)","sourceCodeStart":627,"sourceCodeEnd":663,"githubUrl":"https://github.com/tailscale/tailscale/blob/cfe32b8be6a33f8e24fbc369cbfbf7c729d9e042/cmd/k8s-operator/sts.go#L627-L663","documentation":"Error \"failed to unmarshal proxy spec: %w\" thrown in tailscale/tailscale.","triggerScenarios":"Thrown at cmd/k8s-operator/sts.go:645 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"}