Skip to content

Commit b61d110

Browse files
committed
Re-try the SMB imat bridge
This reverts commit 554e7f0. Reapply "Fix misspellings" This reverts commit e41a23e. Reapply "Fix broken selector" This reverts commit a373c4a. Reapply "Switch from nfs to smb for imat" This reverts commit bc0a49e. Reapply "Use a different version" This reverts commit b578979.
1 parent 1439a77 commit b61d110

19 files changed

Lines changed: 207 additions & 67 deletions

apps/smb-bridges/deployment.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
apiVersion: argoproj.io/v1alpha1
3+
kind: Application
4+
metadata:
5+
name: smb-bridges-staging
6+
namespace: argocd
7+
spec:
8+
destination:
9+
namespace: fia
10+
name: staging
11+
project: staging
12+
source:
13+
path: components/smb-bridges/envs/staging
14+
repoURL: https://github.com/interactivereduction/gitops.git
15+
targetRevision: HEAD
16+
syncPolicy:
17+
automated:
18+
prune: true
19+
selfHeal: true
20+
syncOptions:
21+
- CreateNamespace=true
22+
23+
---
24+
apiVersion: argoproj.io/v1alpha1
25+
kind: Application
26+
metadata:
27+
name: smb-bridges-prod
28+
namespace: argocd
29+
spec:
30+
destination:
31+
namespace: fia
32+
name: prod
33+
project: prod
34+
source:
35+
path: components/smb-bridges/envs/production
36+
repoURL: https://github.com/interactivereduction/gitops.git
37+
targetRevision: HEAD
38+
syncPolicy:
39+
automated:
40+
prune: true
41+
selfHeal: true
42+
syncOptions:
43+
- CreateNamespace=true

components/plotting-service/base/kustomization.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,5 @@ resources:
55
- plotting-service-service.yml
66
- ceph-pv.yml
77
- ceph-pvc.yml
8-
- imat-secret.yml
98
- plotting-service-secret.yml
109
- httproute.yml

components/plotting-service/base/plotting-service.yml

Lines changed: 10 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,8 @@ spec:
4343
volumeMounts:
4444
- name: cephfs-mount
4545
mountPath: /ceph
46-
- name: imat-work
46+
- name: imat-mount
4747
mountPath: /imat
48-
mountPropagation: HostToContainer
4948
readinessProbe:
5049
httpGet:
5150
path: /healthz
@@ -58,55 +57,16 @@ spec:
5857
port: 80
5958
initialDelaySeconds: 5
6059
periodSeconds: 5
61-
- name: imat-mounter
62-
image: alpine
63-
securityContext:
64-
privileged: true
65-
command: ["sh", "-c"]
66-
args:
67-
- |
68-
apk add --no-cache cifs-utils
69-
mkdir -p /imat
70-
71-
while true; do
72-
if [ ${STAGING} == true ]; then
73-
sleep 1000000
74-
else
75-
if [ ! -f /imat/lastrun.txt ]; then
76-
echo "$(date): Attempting to mount IMAT share..."
77-
if mount -t cifs //NDXIMAT.isis.cclrc.ac.uk/data$ /imat -o username=${IMAT_USER},password=${IMAT_PASSWORD},vers=2.1,ro,noserverino,_netdev 2>/dev/null; then
78-
echo "$(date): IMAT share mounted successfully"
79-
else
80-
echo "$(date): Failed to mount IMAT share, retrying in 5s..."
81-
sleep 5
82-
fi
83-
else
84-
echo "$(date): IMAT is mounted"
85-
sleep 60
86-
fi
87-
fi
88-
done
89-
90-
env:
91-
- name: IMAT_USER
92-
valueFrom:
93-
secretKeyRef:
94-
name: imat-creds
95-
key: username
96-
- name: IMAT_PASSWORD
97-
valueFrom:
98-
secretKeyRef:
99-
name: imat-creds
100-
key: password
101-
- name: STAGING
102-
value: "true"
103-
volumeMounts:
104-
- name: imat-work
105-
mountPath: /imat
106-
mountPropagation: Bidirectional
10760
volumes:
10861
- name: cephfs-mount
10962
persistentVolumeClaim:
11063
claimName: plotting-service-ceph-pvc
111-
- name: imat-work
112-
emptyDir: {}
64+
- name: imat-mount
65+
csi:
66+
driver: smb.csi.k8s.io
67+
volumeHandle: plotting-service-imat-smb
68+
volumeAttributes:
69+
source: "//smb-bridge-imat.fia.svc.cluster.local/imat"
70+
nodeStageSecretRef:
71+
name: smb-bridge-secret
72+
namespace: fia

components/plotting-service/envs/production/kustomization.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,4 @@ components:
77
patches:
88
- path: plotting-service.yml
99
- path: plotting-service-secret.yml
10-
- path: imat-secret.yml
1110
- path: httproute.yml

components/plotting-service/envs/staging/kustomization.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@ resources:
55
patches:
66
- path: plotting-service.yml
77
- path: plotting-service-secret.yml
8-
- path: imat-secret.yml
98
- path: httproute.yml

components/plotting-service/variants/production/imat-mounter.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
apiVersion: v1
3+
kind: PersistentVolume
4+
metadata:
5+
annotations:
6+
pv.kubernetes.io/provisioned-by: smb.csi.k8s.io
7+
name: imat-pv-smb
8+
spec:
9+
capacity:
10+
storage: 1000Gi
11+
accessModes:
12+
- ReadOnlyMany
13+
persistentVolumeReclaimPolicy: Retain
14+
mountOptions:
15+
- vers=2.1
16+
- noserverino
17+
- _netdev
18+
csi:
19+
driver: smb.csi.k8s.io
20+
readOnly: true
21+
# volumeHandle format: {smb-server-address}#{sub-dir-name}#{share-name}
22+
# make sure this value is unique for every share in the cluster
23+
volumeHandle: imat-smb
24+
volumeAttributes:
25+
source: "//NDXIMAT.isis.cclrc.ac.uk/data$"
26+
nodeStageSecretRef:
27+
name: imat-creds
28+
namespace: fia
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
kind: PersistentVolumeClaim
3+
apiVersion: v1
4+
metadata:
5+
name: imat-smb-pvc
6+
spec:
7+
accessModes:
8+
- ReadOnlyMany
9+
resources:
10+
requests:
11+
storage: 1000Gi
12+
volumeName: imat-pv-smb
13+
storageClassName: ""
File renamed without changes.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
resources:
4+
- imat-pv.yml
5+
- imat-pvc.yml
6+
- imat-secret.yml
7+
- smb-bridge-imat.yml
8+
- smb-bridge-imat-svc.yml
9+
- smb-bridge-imat-secret.yml

0 commit comments

Comments
 (0)