Skip to content

Commit 8360d69

Browse files
authored
Merge pull request #319 from application-stacks/volume-test
Volume & Volume Mount tests
2 parents 104fcce + fc8604e commit 8360d69

18 files changed

+228
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
apiVersion: v1
2+
kind: Secret
3+
type: kubernetes.io/tls
4+
metadata:
5+
name: test-volume-secret
6+
data:
7+
ca.crt: Y2FjcnQK
8+
destCA.crt: ZGVzdENBY3J0Cg==
9+
tls.crt: dGxzY3J0Cg==
10+
tls.key: dGxza2V5Cg==
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: v1
2+
kind: Secret
3+
metadata:
4+
name: test-volume-secret
5+
type: kubernetes.io/tls
6+
data:
7+
# 'tlscrt'
8+
tls.crt: dGxzY3J0Cg==
9+
# 'tlskey'
10+
tls.key: dGxza2V5Cg==
11+
# 'cacrt'
12+
ca.crt: Y2FjcnQK
13+
# 'destCAcrt'
14+
destCA.crt: ZGVzdENBY3J0Cg==
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
apiVersion: apps/v1
3+
kind: Deployment
4+
metadata:
5+
name: volume-rc
6+
spec:
7+
template:
8+
spec:
9+
containers:
10+
- volumeMounts:
11+
- name: test-volume
12+
mountPath: /test
13+
subPath: test
14+
- name: svc-certificate
15+
volumes:
16+
- name: test-volume
17+
secret:
18+
secretName: test-volume-secret
19+
- name: svc-certificate
20+
status:
21+
replicas: 1
22+
readyReplicas: 1
23+
updatedReplicas: 1
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Creating deployment with volume
2+
apiVersion: rc.app.stacks/v1beta2
3+
kind: RuntimeComponent
4+
metadata:
5+
name: volume-rc
6+
spec:
7+
# Add fields here
8+
applicationImage: k8s.gcr.io/pause:2.0
9+
replicas: 1
10+
volumeMounts:
11+
- name: test-volume
12+
mountPath: /test
13+
subPath: test
14+
volumes:
15+
- name: test-volume
16+
secret:
17+
secretName: test-volume-secret
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
apiVersion: apps/v1
3+
kind: Deployment
4+
metadata:
5+
name: volume-rc
6+
status:
7+
replicas: 1
8+
readyReplicas: 1
9+
updatedReplicas: 1
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: volume-rc
5+
spec:
6+
template:
7+
spec:
8+
containers:
9+
- volumeMounts:
10+
- name: test-volume
11+
volumes:
12+
- name: test-volume
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Removing volumes field should remove deployment's volume
2+
apiVersion: rc.app.stacks/v1beta2
3+
kind: RuntimeComponent
4+
metadata:
5+
name: volume-rc
6+
spec:
7+
volumeMounts:
8+
volumes:
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
apiVersion: apps/v1
3+
kind: StatefulSet
4+
metadata:
5+
name: volume-rc
6+
spec:
7+
template:
8+
spec:
9+
containers:
10+
- volumeMounts:
11+
- name: test-volume
12+
mountPath: /test
13+
subPath: test
14+
- name: svc-certificate
15+
volumes:
16+
- name: test-volume
17+
secret:
18+
secretName: test-volume-secret
19+
- name: svc-certificate
20+
status:
21+
replicas: 1
22+
readyReplicas: 1
23+
updatedReplicas: 1
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Creating statefulset with volume
2+
apiVersion: rc.app.stacks/v1beta2
3+
kind: RuntimeComponent
4+
metadata:
5+
name: volume-rc
6+
spec:
7+
statefulSet: {}
8+
volumeMounts:
9+
- name: test-volume
10+
mountPath: /test
11+
subPath: test
12+
volumes:
13+
- name: test-volume
14+
secret:
15+
secretName: test-volume-secret
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
apiVersion: apps/v1
3+
kind: StatefulSet
4+
metadata:
5+
name: volume-rc
6+
status:
7+
replicas: 1
8+
readyReplicas: 1
9+
updatedReplicas: 1

0 commit comments

Comments
 (0)