From 5f8e58a2c092e39befba73554329204893e36669 Mon Sep 17 00:00:00 2001 From: Qiming Teng Date: Wed, 15 Dec 2021 12:50:30 +0800 Subject: [PATCH] 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. --- .../pods/storage/projected-service-account-token.yaml | 1 + content/en/examples/pods/storage/pv-duplicate.yaml | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/content/en/examples/pods/storage/projected-service-account-token.yaml b/content/en/examples/pods/storage/projected-service-account-token.yaml index 353271a067..3ad06b5dc7 100644 --- a/content/en/examples/pods/storage/projected-service-account-token.yaml +++ b/content/en/examples/pods/storage/projected-service-account-token.yaml @@ -10,6 +10,7 @@ spec: - name: token-vol mountPath: "/service-account" readOnly: true + serviceAccountName: default volumes: - name: token-vol projected: diff --git a/content/en/examples/pods/storage/pv-duplicate.yaml b/content/en/examples/pods/storage/pv-duplicate.yaml index 15a48acbed..e5a0e6ff69 100644 --- a/content/en/examples/pods/storage/pv-duplicate.yaml +++ b/content/en/examples/pods/storage/pv-duplicate.yaml @@ -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 \ No newline at end of file + claimName: test-nfs-claim