Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use file watcher namespace for creds, and volume handle for PV #144

Merged
merged 1 commit into from
Aug 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading