Skip to content

Commit 34795d0

Browse files
committed
updated examples
1 parent a27c095 commit 34795d0

15 files changed

+176
-203
lines changed

example/README.md

Lines changed: 0 additions & 16 deletions
This file was deleted.

example/deployment-all-repos.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: cvmfs-all-repos
5+
labels:
6+
app: cvmfs-all-repos
7+
spec:
8+
replicas: 2
9+
selector:
10+
matchLabels:
11+
app: cvmfs-all-repos
12+
template:
13+
metadata:
14+
labels:
15+
app: cvmfs-all-repos
16+
spec:
17+
containers:
18+
- name: idle
19+
image: busybox
20+
imagePullPolicy: IfNotPresent
21+
command: [ "/bin/sh", "-c", "trap : TERM INT; (while true; do sleep 1000; done) & wait" ]
22+
volumeMounts:
23+
- name: my-cvmfs
24+
mountPath: /my-cvmfs
25+
# CVMFS automount volumes must be mounted with HostToContainer mount propagation.
26+
mountPropagation: HostToContainer
27+
volumes:
28+
- name: my-cvmfs
29+
persistentVolumeClaim:
30+
claimName: cvmfs

example/deployment.yaml

Lines changed: 0 additions & 29 deletions
This file was deleted.

example/exec-bash.sh

Lines changed: 0 additions & 31 deletions
This file was deleted.

example/logs.sh

Lines changed: 0 additions & 31 deletions
This file was deleted.

example/plugin-deploy.sh

Lines changed: 0 additions & 30 deletions
This file was deleted.

example/plugin-teardown.sh

Lines changed: 0 additions & 30 deletions
This file was deleted.

example/pod-all-repos.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: cvmfs-all-repos
5+
spec:
6+
containers:
7+
- name: idle
8+
image: busybox
9+
imagePullPolicy: IfNotPresent
10+
command: [ "/bin/sh", "-c", "trap : TERM INT; (while true; do sleep 1000; done) & wait" ]
11+
volumeMounts:
12+
- name: my-cvmfs
13+
mountPath: /my-cvmfs
14+
# CVMFS automount volumes must be mounted with HostToContainer mount propagation.
15+
mountPropagation: HostToContainer
16+
volumes:
17+
- name: my-cvmfs
18+
persistentVolumeClaim:
19+
claimName: cvmfs
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# This demo shows how to mount a single CVMFS repository
2+
# using the `repository` storage class parameter.
3+
4+
apiVersion: storage.k8s.io/v1
5+
kind: StorageClass
6+
metadata:
7+
name: cvmfs-atlas-nightlies
8+
provisioner: cvmfs.csi.cern.ch
9+
parameters:
10+
# Repository address goes here.
11+
repository: atlas-nightlies.cern.ch
12+
---
13+
apiVersion: v1
14+
kind: PersistentVolumeClaim
15+
metadata:
16+
name: cvmfs-atlas-nightlies
17+
spec:
18+
accessModes:
19+
- ReadOnlyMany
20+
resources:
21+
requests:
22+
# Volume size value has no effect and is ignored
23+
# by the driver, but must be non-zero.
24+
storage: 1
25+
storageClassName: cvmfs-atlas-nightlies
26+
---
27+
apiVersion: v1
28+
kind: Pod
29+
metadata:
30+
name: cvmfs-atlas-nightlies
31+
spec:
32+
containers:
33+
- name: idle
34+
image: busybox
35+
imagePullPolicy: IfNotPresent
36+
command: [ "/bin/sh", "-c", "trap : TERM INT; (while true; do sleep 1000; done) & wait" ]
37+
volumeMounts:
38+
- name: my-cvmfs-atlas-nightlies
39+
mountPath: /atlas-nightlies
40+
# Note that unlike demo-single-repo-subpath.yaml, in this
41+
# case we don't set mountPropagation nor subPath.
42+
volumes:
43+
- name: my-cvmfs-atlas-nightlies
44+
persistentVolumeClaim:
45+
claimName: cvmfs-atlas-nightlies
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: cvmfs-alice
5+
spec:
6+
containers:
7+
- name: idle
8+
image: busybox
9+
imagePullPolicy: IfNotPresent
10+
command: [ "/bin/sh", "-c", "trap : TERM INT; (while true; do sleep 1000; done) & wait" ]
11+
volumeMounts:
12+
- name: my-cvmfs
13+
# It is possible to mount a single CVMFS repository by specifying subPath.
14+
subPath: alice.cern.ch
15+
mountPath: /my-alice-cvmfs
16+
mountPropagation: HostToContainer
17+
volumes:
18+
- name: my-cvmfs
19+
persistentVolumeClaim:
20+
claimName: cvmfs

0 commit comments

Comments
 (0)