Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

easy smokescreen address whitelist #483

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aogier
Copy link

@aogier aogier commented Dec 28, 2024

This PR helped me solving the problem we face with smokescreen when some of your services are on a private network. Entirely disabling it does not looks like a good idea, plus I did not manage to do that because everything broke when I added the usual:

[proxy]
host = 

thing. So! This uses dockerfile's entrypoint runPostSetupScripts and allows me to list my whitelisted addressed so everything works well!

How did you test this PR?

$ diff -u \
 <(helm template zulip . -s templates/cm-post-setup-scripts.yaml) \
 <(helm template zulip . \
      --set-json=zulip.smokeScreen.whitelistedAddresses='["1.2.3.4", "11.22.33.44"]' \
      -s templates/cm-post-setup-scripts.yaml)
--- /proc/self/fd/11    2024-12-28 15:55:37.660000000 +0100
+++ /proc/self/fd/22    2024-12-28 15:55:37.660000000 +0100
@@ -11,3 +11,9 @@
     app.kubernetes.io/version: "9.3-0"
     app.kubernetes.io/managed-by: Helm
 data:
+  __zulip_smokescreen_whitelist.sh: |
+    #!/bin/bash
+
+    sed -ri \
+        "s/(command.*)/\1 --allow-address 1.2.3.4 --allow-address 11.22.33.44/" \
+        /etc/supervisor/conf.d/zulip/smokescreen.conf

Hope this helps, ciao!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant