From f7edb8254775406bc1894a282be57021f55e3384 Mon Sep 17 00:00:00 2001 From: jianglingxia Date: Mon, 25 Sep 2017 16:40:38 +0800 Subject: [PATCH] the pod yaml type error and add apiVersion --- .../inject-data-application/podpreset.md | 53 ++++++++++--------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/docs/tasks/inject-data-application/podpreset.md b/docs/tasks/inject-data-application/podpreset.md index 3018fcdefb..6e1026a5df 100644 --- a/docs/tasks/inject-data-application/podpreset.md +++ b/docs/tasks/inject-data-application/podpreset.md @@ -325,34 +325,35 @@ spec: **Pod spec after admission controller:** ```yaml +apiVersion: v1 kind: Pod - metadata: - labels: - app: guestbook - tier: frontend - annotations: +metadata: + labels: + app: guestbook + tier: frontend + annotations: podpreset.admission.kubernetes.io/podpreset-allow-database: "resource version" - spec: - containers: - - name: php-redis - image: gcr.io/google_samples/gb-frontend:v3 - resources: - requests: - cpu: 100m - memory: 100Mi - volumeMounts: - - mountPath: /cache - name: cache-volume - env: - - name: GET_HOSTS_FROM - value: dns - - name: DB_PORT - value: "6379" - ports: - - containerPort: 80 - volumes: - - name: cache-volume - emptyDir: {} +spec: + containers: + - name: php-redis + image: gcr.io/google_samples/gb-frontend:v3 + resources: + requests: + cpu: 100m + memory: 100Mi + volumeMounts: + - mountPath: /cache + name: cache-volume + env: + - name: GET_HOSTS_FROM + value: dns + - name: DB_PORT + value: "6379" + ports: + - containerPort: 80 + volumes: + - name: cache-volume + emptyDir: {} ``` ### Multiple PodPreset Example