{"record":{"id":"58da1d2c70475edd","repo":"kubernetes/kops","slug":"error-adding-cilium-ipsec-secret-v","errorCode":null,"errorMessage":"error adding Cilium IPSec secret: %v","messagePattern":"error adding Cilium IPSec secret: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/kops/create_secret_ciliumpassword.go","lineNumber":130,"sourceCode":"\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"reading Cilium IPSec config %v: %v\", options.CiliumPasswordFilePath, err)\n\t\t}\n\t}\n\n\tvar parsedData map[string]interface{}\n\terr = kops.ParseRawYaml(data, &parsedData)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"unable to parse YAML %v: %v\", options.CiliumPasswordFilePath, err)\n\t}\n\n\tsecret := &fi.Secret{\n\t\tData: data,\n\t}\n\n\tif !options.Force {\n\t\t_, created, err := secretStore.GetOrCreateSecret(ctx, \"ciliumpassword\", secret)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error adding Cilium IPSec secret: %v\", err)\n\t\t}\n\t\tif !created {\n\t\t\treturn fmt.Errorf(\"failed to create the Cilium IPSec secret as it already exists. Pass the `--force` flag to replace an existing secret\")\n\t\t}\n\t} else {\n\t\t_, err := secretStore.ReplaceSecret(\"ciliumpassword\", secret)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"updating Cilium IPSec secret: %v\", err)\n\t\t}\n\t}\n\n\treturn nil\n}\n","sourceCodeStart":112,"sourceCodeEnd":144,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/cmd/kops/create_secret_ciliumpassword.go#L112-L144","documentation":"RunCreateSecretCiliumEncryptionConfig calls GetOrCreateSecret to store the parsed Cilium IPSec config as the 'ciliumpassword' secret; this wraps that store call failing - state store write error, permissions, or connectivity. The config file itself was already read and parsed.","triggerScenarios":"Thrown at cmd/kops/create_secret_ciliumpassword.go:130 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped error for the state store failure reason","Verify write access to the cluster secret store","Retry after fixing state store connectivity"],"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"}