make-files / makefiles

A library of opinionated Makefiles for popular programming languages.
https://makefiles.dev
MIT License
4 stars 5 forks source link

Fix Telepresence `intercept`/`leave` deprecation warnings #117

Closed ezzatron closed 11 months ago

ezzatron commented 11 months ago

This PR primarily addresses the following warning that's started appearing when intercepting:

Warning: You are executing the "telepresence intercept [flags] <intercept_base_name> [-- <command with arguments...>]" command without a preceding "telepresence connect", causing an implicit connect to take place. The implicit connect behavior is deprecated and will be removed in a future release.

The warning can also appear for telepresence leave when closing an intercept that's been open for a long time (e.g. accidentally left open overnight).

I've also added a bunch of optional flags that seem to improve the experience when switching namespaces and re-intercepting. Previously, if you forget to telepresence quit -s after switching namespaces, the intercept would appear to work, but would have applied to the previous namespace. Now, when intercepting after a namespace switch, you'll get an error instead:

telepresence connect: error: connector.Connect: Cluster configuration changed, please quit telepresence and reconnect

Which still sucks, but at least it's a decent reminder of what you need to do.

Relevant release notes: