tailscale/cmd
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>
2023-08-29 13:24:05 -07:00
..
addlicense all: update tools that manage copyright headers 2023-01-27 15:36:29 -08:00
cloner cmd/cloner: use maps.Clone and ptr.To 2023-08-20 13:47:26 -04:00
containerboot cmd/k8s-operator: put Tailscale IPs in Service ingress status 2023-08-28 09:07:18 -07:00
derper util/winutil: add RegisterForRestart, allowing programs to indicate their preferences to the Windows restart manager 2023-08-22 15:06:48 -06:00
derpprobe prober: migrate to Prometheus metric library 2023-04-11 08:37:32 +01:00
dist cmd/dist,release/dist: add distsign signing hooks (#9070) 2023-08-24 14:36:47 -07:00
get-authkey all: use cmpx.Or where it made sense 2023-06-07 22:06:24 -07:00
gitops-pusher cmd/gitops-pusher: re-use existing types from acl package 2023-07-19 14:44:45 -04:00
hello all: update copyright and license headers 2023-01-27 15:36:29 -08:00
k8s-operator cmd/k8s-operator,ipn/store/kubestore: patch secrets instead of updating 2023-08-29 13:24:05 -07:00
mkmanifest cmd/mkmanifest, cmd/tailscale, cmd/tailscaled: remove Windows arm32 resources from OSS 2023-03-01 15:45:12 -07:00
mkpkg go.mod: upgrade nfpm to v2 (#8786) 2023-08-03 13:00:45 -07:00
mkversion version/mkversion: open-source version generation logic 2023-02-18 05:21:05 +00:00
nardump all: update copyright and license headers 2023-01-27 15:36:29 -08:00
netlogfmt all: use Go 1.21 slices, maps instead of x/exp/{slices,maps} 2023-08-17 08:42:35 -07:00
nginx-auth tailcfg,all: add and use Node.IsTagged() 2023-03-13 08:44:25 -07:00
pgproxy various: add golangci-lint, fix issues (#7905) 2023-04-17 18:38:24 -04:00
printdep cmd/printdep: print correct toolchain URL 2023-02-11 17:57:36 +00:00
proxy-to-grafana tailcfg,all: add and use Node.IsTagged() 2023-03-13 08:44:25 -07:00
sniproxy cmd/sniproxy: add port forwarding and prometheus metrics 2023-08-24 15:52:17 -07:00
speedtest all: update copyright and license headers 2023-01-27 15:36:29 -08:00
ssh-auth-none-demo all: replace deprecated ioutil references 2023-08-23 23:53:19 +01:00
stunc all: update copyright and license headers 2023-01-27 15:36:29 -08:00
sync-containers all: adjust some build tags for plan9 2023-08-24 15:42:35 -07:00
tailscale types/logger: add AsJSON 2023-08-28 15:14:24 -07:00
tailscaled cmd/tailscaled: default to userspace-networking on plan9 2023-08-29 11:46:33 -07:00
testcontrol all: update copyright and license headers 2023-01-27 15:36:29 -08:00
testwrapper cmd/testwrapper: fix off-by-one error in maxAttempts check 2023-08-24 16:59:37 -04:00
tsconnect all: adjust some build tags for plan9 2023-08-24 15:42:35 -07:00
tsshd all: update copyright and license headers 2023-01-27 15:36:29 -08:00
viewer types/views,cmd/viewer: add ByteSlice[T] to replace mem.RO 2023-08-20 15:30:35 -04:00