Skip to content

Commit

Permalink
Use file watcher namespace for creds, and volume handle for PV
Browse files Browse the repository at this point in the history
  • Loading branch information
Pasarus committed Apr 5, 2024
1 parent 4da1983 commit 2ccf03f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions file_watcher_operator/file_watcher_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,14 @@ def generate_deployment_body(
db_ip = os.environ.get("DB_IP", "localhost")
archive_pvc_name = f"{name}-file-watcher-pvc"
archive_pv_name = f"{name}-file-watcher-pv"
namespace = os.environ.get("FILEWATCHER_NAMESPACE", "fia")
deployment_spec = yaml.safe_load(
f"""
apiVersion: apps/v1
kind: Deployment
metadata:
name: {name}-file-watcher-deployment
namespace: {namespace}
labels:
app: {name}-file-watcher
spec:
Expand Down Expand Up @@ -147,12 +149,12 @@ def generate_deployment_body(
csi:
driver: smb.csi.k8s.io
readOnly: true
volumeHandle: archive.ir.svc.cluster.local/share##archive
volumeHandle: archive.{namespace}.svc.cluster.local/share##archive
volumeAttributes:
source: "//isisdatar55.isis.cclrc.ac.uk/inst$/"
nodeStageSecretRef:
name: archive-creds
namespace: ir
namespace: {namespace}
"""
)

Expand Down

0 comments on commit 2ccf03f

Please sign in to comment.