Skip to content

Commit

Permalink
No need for context when in cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
LawiK974 committed Mar 12, 2024
1 parent de433d8 commit 6fba83c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
Expand All @@ -17,11 +18,10 @@ spec:
serviceAccountName: kube-notify-watcher
containers:
- name: kube-notify
image: wikle/kube-notify:0.1.0
image: wikle/kube-notify:latest
volumeMounts:
- name: config
mountPath: /app/config.yaml
readonly: true
volumes:
- name: config
configMap:
Expand Down
4 changes: 1 addition & 3 deletions kube_notify/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,7 @@ def main():
# Initialize Kubernetes client
ioloop = asyncio.get_event_loop()
if args.inCluster:
ioloop.run_until_complete(
kubernetes_asyncio.config.load_incluster_config(context=args.context)
)
ioloop.run_until_complete(kubernetes_asyncio.config.load_incluster_config())
else:
ioloop.run_until_complete(
kubernetes_asyncio.config.load_kube_config(context=args.context)
Expand Down

0 comments on commit 6fba83c

Please sign in to comment.