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/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>
9 months ago
..
addlicense all: update tools that manage copyright headers 1 year ago
cloner cmd/cloner: use maps.Clone and ptr.To 10 months ago
containerboot cmd/k8s-operator: put Tailscale IPs in Service ingress status 9 months ago
derper util/winutil: add RegisterForRestart, allowing programs to indicate their preferences to the Windows restart manager 9 months ago
derpprobe prober: migrate to Prometheus metric library 1 year ago
dist cmd/dist,release/dist: add distsign signing hooks (#9070) 9 months ago
get-authkey all: use cmpx.Or where it made sense 12 months ago
gitops-pusher cmd/gitops-pusher: re-use existing types from acl package 11 months ago
hello all: update copyright and license headers 1 year ago
k8s-operator cmd/k8s-operator,ipn/store/kubestore: patch secrets instead of updating 9 months ago
mkmanifest cmd/mkmanifest, cmd/tailscale, cmd/tailscaled: remove Windows arm32 resources from OSS 1 year ago
mkpkg go.mod: upgrade nfpm to v2 (#8786) 10 months ago
mkversion version/mkversion: open-source version generation logic 1 year ago
nardump all: update copyright and license headers 1 year ago
netlogfmt all: use Go 1.21 slices, maps instead of x/exp/{slices,maps} 10 months ago
nginx-auth tailcfg,all: add and use Node.IsTagged() 1 year ago
pgproxy various: add golangci-lint, fix issues (#7905) 1 year ago
printdep cmd/printdep: print correct toolchain URL 1 year ago
proxy-to-grafana tailcfg,all: add and use Node.IsTagged() 1 year ago
sniproxy cmd/sniproxy: add port forwarding and prometheus metrics 9 months ago
speedtest all: update copyright and license headers 1 year ago
ssh-auth-none-demo all: replace deprecated ioutil references 9 months ago
stunc all: update copyright and license headers 1 year ago
sync-containers all: adjust some build tags for plan9 9 months ago
tailscale types/logger: add AsJSON 9 months ago
tailscaled cmd/tailscaled: default to userspace-networking on plan9 9 months ago
testcontrol all: update copyright and license headers 1 year ago
testwrapper cmd/testwrapper: fix off-by-one error in maxAttempts check 9 months ago
tsconnect all: adjust some build tags for plan9 9 months ago
tsshd all: update copyright and license headers 1 year ago
viewer types/views,cmd/viewer: add ByteSlice[T] to replace mem.RO 10 months ago