Skip to content

Commit 4f557ce

Browse files
author
Alan Christie
committed
fix: Kopf now runs standalone and with a namespace
1 parent 4b83618 commit 4f557ce

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

operator/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ RUN pip install -r requirements.txt
55

66
WORKDIR /src
77
COPY handlers.py /src/
8+
COPY entrypoint.sh /src/
89

9-
CMD kopf run ./handlers.py --verbose --log-format full
10+
CMD ./entrypoint.sh

operator/entrypoint.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env bash
2+
NS=$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace)
3+
kopf run ./handlers.py --verbose --standalone --namespace=${NS} --log-format full

0 commit comments

Comments
 (0)