Skip to content

Commit

Permalink
Adding back the INIT stuff,
Browse files Browse the repository at this point in the history
The sidecar stuff was never added into K8s:
kubernetes/enhancements#753 (comment)
  • Loading branch information
hholst80 committed Mar 24, 2021
1 parent 070a8a3 commit 24b6ea7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions reloader.py
Expand Up @@ -5,7 +5,7 @@

import requests


INIT = os.environ.get("RELOADER_INIT", False)
NAMESPACE = os.environ.get("RELOADER_NAMESPACE", "default")
CONFIGMAP = os.environ.get("RELOADER_CONFIGMAP")
SECRET = os.environ.get("RELOADER_SECRET")
Expand Down Expand Up @@ -86,6 +86,11 @@ def reload():
elif PIDFILE:
print("PIDFILE: %s" % ENDPOINT)
print("SIGNAL: %i" % SIGNAL)
for e_type, e_object in watch():
stream = watch()
if not INIT:
next(stream)
for e_type, e_object in stream:
update(e_object)
if INIT:
break
reload()

0 comments on commit 24b6ea7

Please sign in to comment.