You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/ipn
Maisem Ali c919ff540f cmd/k8s-operator,ipn/store/kubestore: patch secrets instead of updating
We would call Update on the secret, but that was racey and would occasionaly
fail. Instead use patch whenever we can.

Fixes errors like
```
boot: 2023/08/29 01:03:53 failed to set serve config: sending serve config: updating config: writing ServeConfig to StateStore: Operation cannot be fulfilled on secrets "ts-webdav-kfrzv-0": the object has been modified; please apply your changes to the latest version and try again

{"level":"error","ts":"2023-08-29T01:03:48Z","msg":"Reconciler error","controller":"ingress","controllerGroup":"networking.k8s.io","controllerKind":"Ingress","Ingress":{"name":"webdav","namespace":"default"},"namespace":"default","name":"webdav","reconcileID":"96f5cfed-7782-4834-9b75-b0950fd563ed","error":"failed to provision: failed to create or get API key secret: Operation cannot be fulfilled on secrets \"ts-webdav-kfrzv-0\": the object has been modified; please apply your changes to the latest version and try again","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\tsigs.k8s.io/controller-runtime@v0.15.0/pkg/internal/controller/controller.go:324\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\tsigs.k8s.io/controller-runtime@v0.15.0/pkg/internal/controller/controller.go:265\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\tsigs.k8s.io/controller-runtime@v0.15.0/pkg/internal/controller/controller.go:226"}
```

Updates #502
Updates #7895

Signed-off-by: Maisem Ali <maisem@tailscale.com>
1 year ago
..
ipnauth all: update copyright and license headers 2 years ago
ipnlocal ipn/iplocale: remove unused argument to shouldUseOneCGNATRoute 1 year ago
ipnserver logpolicy, various: allow overriding log function 1 year ago
ipnstate ipn/ipnstate: add PeerStatus.AltSharerUserID, stop mangling Node.User 1 year ago
localapi cmd/tailscale, net/portmapper: add --log-http option to "debug portmap" 1 year ago
policy ipn: prefer allow/denylist terminology 2 years ago
store cmd/k8s-operator,ipn/store/kubestore: patch secrets instead of updating 1 year ago
backend.go all: update copyright and license headers 2 years ago
doc.go all: update copyright and license headers 2 years ago
fake_test.go all: update copyright and license headers 2 years ago
ipn_clone.go cmd/cloner: use maps.Clone and ptr.To 1 year ago
ipn_view.go cmd/viewer, types/views, all: un-special case slice of netip.Prefix 1 year ago
prefs.go cmd/viewer, types/views, all: un-special case slice of netip.Prefix 1 year ago
prefs_test.go types/persist: drop duplicated Persist.LoginName 1 year ago
serve.go ipn, ipn/ipnlocal: clean up documentation and use clock instead of time 1 year ago
serve_test.go tailscale/cli: add interactive flow for enabling Funnel 1 year ago
store.go ipn: avoid useless no-op WriteState calls 1 year ago
store_test.go ipn: avoid useless no-op WriteState calls 1 year ago