summaryrefslogtreecommitdiffhomepage
path: root/envknob/envknob.go
diff options
context:
space:
mode:
Diffstat (limited to 'envknob/envknob.go')
-rw-r--r--envknob/envknob.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/envknob/envknob.go b/envknob/envknob.go
index 2662da2b4..8f0fd0c5f 100644
--- a/envknob/envknob.go
+++ b/envknob/envknob.go
@@ -434,6 +434,16 @@ func IsCertShareReadOnlyMode() bool {
const modeRO = "ro"
+// IsCertShareReadWriteMode returns true if this instance is the replica
+// responsible for issuing and renewing TLS certs in an HA setup with certs
+// shared between multiple replicas.
+func IsCertShareReadWriteMode() bool {
+ m := String("TS_CERT_SHARE_MODE")
+ return m == modeRW
+}
+
+const modeRW = "rw"
+
// CrashOnUnexpected reports whether the Tailscale client should panic
// on unexpected conditions. If TS_DEBUG_CRASH_ON_UNEXPECTED is set, that's
// used. Otherwise the default value is true for unstable builds.