Skip to content

Commit

Permalink
fix(deploy): use incluster or kubeconfig and correct ghcr link
Browse files Browse the repository at this point in the history
  • Loading branch information
DragonStuff committed Apr 6, 2024
1 parent db0fbef commit 41a931a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ jobs:
build_and_push:
needs: test
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest

steps:
Expand Down
6 changes: 5 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import time
from kubernetes import client, config

config.load_kube_config()
# Check if kubeconfig is available, otherwise use in-cluster config
try:
config.load_kube_config()
except:
config.load_incluster_config()

v1 = client.CoreV1Api()

Expand Down
2 changes: 1 addition & 1 deletion deploy/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
serviceAccountName: ns-object-mirror
containers:
- name: ns-object-mirror
image: ghcr.io/DragonStuff/ns-object-mirror:latest
image: ghcr.io/alexandernicholson/ns-object-mirror:latest
imagePullPolicy: Always
resources:
limits:
Expand Down

0 comments on commit 41a931a

Please sign in to comment.