Skip to content

Commit e52d97a

Browse files
committed
Display configuration of APP_PROBE_STATUSES at startup.
1 parent 2509fe6 commit e52d97a

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export APP_PROBE_STATUSES=Running,Deleted
6060
An environment variable APP_PROBE_APPS controls the app types that the URL probing controls. Currently only available for shiny and shiny-proxy (default).
6161
6262
```bash
63-
export APP_PROBE_STATUSES=shiny,shiny-proxy
63+
export APP_PROBE_APPS=shiny,shiny-proxy
6464
```
6565
6666
There are additional environment variables with sensible defaults that control URL resolution. See app_urls.py for more information.

serve_event_listener/main.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,16 +196,22 @@ def run(namespace: str, label_selector: str) -> None:
196196
label_selector (str): Label selector used to filter pods.
197197
"""
198198

199+
# only for displaying startup configuration
200+
APP_PROBE_STATUSES = os.getenv("APP_PROBE_STATUSES", default="")
201+
199202
start_message = (
200203
"\n\n\t{}\n\t"
201204
"Starting Kubernetes Event Listener \n\t"
202205
"Namespace: {}\n\t"
203206
"Label Selector: {}\n\t"
207+
"App probing for statuses: {}\n\t"
204208
"debug: {}\n\t"
205209
"{}\n"
206210
)
207211
logger.info(
208-
start_message.format("#" * 40, namespace, label_selector, DEBUG, "#" * 40)
212+
start_message.format(
213+
"#" * 40, namespace, label_selector, APP_PROBE_STATUSES, DEBUG, "#" * 40
214+
)
209215
)
210216

211217
event_listener = EventListener(namespace, label_selector)

serve_event_listener/status_queue.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ def process(self) -> None:
218218
body = resp.text or ""
219219
if resp.status_code == 404 and "OK. OBJECT_NOT_FOUND." in body:
220220
logger.debug(
221-
"Response 404 treated as OK (object not found). Could be renamed or removed. release=%s body=%s",
221+
"Response 404 treated as OK (object not found), renamed or removed? release=%s body=%s",
222222
release,
223223
body[:200],
224224
)

0 commit comments

Comments
 (0)