Skip to content

Commit 5f8e58a

Browse files
committed
Fix errors detected by the test case
The service account token one must have `serviceAccountName` specified in order to be successfully validated. The PV duplicate example can only refer to an existing volume.
1 parent 440ebd1 commit 5f8e58a

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

content/en/examples/pods/storage/projected-service-account-token.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ spec:
1010
- name: token-vol
1111
mountPath: "/service-account"
1212
readOnly: true
13+
serviceAccountName: default
1314
volumes:
1415
- name: token-vol
1516
projected:

content/en/examples/pods/storage/pv-duplicate.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@ spec:
88
- name: test
99
image: nginx
1010
volumeMounts:
11-
- name: site-data
11+
# a mount for site-data
12+
- name: config
1213
mountPath: /usr/share/nginx/html
1314
subPath: html
15+
# another mount for nginx config
1416
- name: config
1517
mountPath: /etc/nginx/nginx.conf
1618
subPath: nginx.conf
1719
volumes:
1820
- name: config
1921
persistentVolumeClaim:
20-
claimName: test-nfs-claim
22+
claimName: test-nfs-claim

0 commit comments

Comments
 (0)