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.
This commit is contained in:
Qiming Teng
2021-12-15 12:50:30 +08:00
parent 440ebd1e0e
commit 5f8e58a2c0
2 changed files with 5 additions and 2 deletions
@@ -10,6 +10,7 @@ spec:
- name: token-vol
mountPath: "/service-account"
readOnly: true
serviceAccountName: default
volumes:
- name: token-vol
projected:
@@ -8,13 +8,15 @@ spec:
- name: test
image: nginx
volumeMounts:
- name: site-data
# a mount for site-data
- name: config
mountPath: /usr/share/nginx/html
subPath: html
# another mount for nginx config
- name: config
mountPath: /etc/nginx/nginx.conf
subPath: nginx.conf
volumes:
- name: config
persistentVolumeClaim:
claimName: test-nfs-claim
claimName: test-nfs-claim