Consolidate YAML files [part-9] (#9361)

This PR relocates the YAML files referenced by the data injection topic.
This commit is contained in:
Qiming
2018-07-04 02:50:19 +08:00
committed by k8s-ci-robot
parent 81bc804e9a
commit 1228689b1d
28 changed files with 71 additions and 84 deletions
@@ -34,12 +34,12 @@ Get an overview of PodPresets at
This is a simple example to show how a Pod spec is modified by the Pod
Preset.
{{< code file="podpreset-preset.yaml" >}}
{{< codenew file="podpreset/preset.yaml" >}}
Create the PodPreset:
```shell
kubectl create -f https://k8s.io/docs/tasks/inject-data-application/podpreset-preset.yaml
kubectl create -f https://k8s.io/examples/podpreset/preset.yaml
```
Examine the created PodPreset:
@@ -52,12 +52,12 @@ allow-database 1m
The new PodPreset will act upon any pod that has label `role: frontend`.
{{< code file="podpreset-pod.yaml" >}}
{{< codenew file="podpreset/pod.yaml" >}}
Create a pod:
```shell
$ kubectl create -f https://k8s.io/docs/tasks/inject-data-application/podpreset-pod.yaml
$ kubectl create -f https://k8s.io/examples/podpreset/pod.yaml
```
List the running Pods:
@@ -70,7 +70,7 @@ website 1/1 Running 0 4m
**Pod spec after admission controller:**
{{< code file="podpreset-merged.yaml" >}}
{{< codenew file="podpreset/merged.yaml" >}}
To see above output, run the following command:
@@ -85,19 +85,19 @@ that defines a `ConfigMap` for Environment Variables.
**User submitted pod spec:**
{{< code file="podpreset-pod.yaml" >}}
{{< codenew file="podpreset/pod.yaml" >}}
**User submitted `ConfigMap`:**
{{< code file="podpreset-configmap.yaml" >}}
{{< codenew file="podpreset/configmap.yaml" >}}
**Example Pod Preset:**
{{< code file="podpreset-allow-db.yaml" >}}
{{< codenew file="podpreset/allow-db.yaml" >}}
**Pod spec after admission controller:**
{{< code file="podpreset-allow-db-merged.yaml" >}}
{{< codenew file="podpreset/allow-db-merged.yaml" >}}
### ReplicaSet with Pod Spec Example
@@ -106,18 +106,18 @@ Preset.
**User submitted ReplicaSet:**
{{< code file="podpreset-replicaset.yaml" >}}
{{< codenew file="podpreset/replicaset.yaml" >}}
**Example Pod Preset:**
{{< code file="podpreset-preset.yaml" >}}
{{< codenew file="podpreset/preset.yaml" >}}
**Pod spec after admission controller:**
Note that the ReplicaSet spec was not changed, users have to check individual pods
to validate that the PodPreset has been applied.
{{< code file="podpreset-replicaset-merged.yaml" >}}
{{< codenew file="podpreset/replicaset-merged.yaml" >}}
### Multiple PodPreset Example
@@ -126,19 +126,19 @@ Injection Policies.
**User submitted pod spec:**
{{< code file="podpreset-pod.yaml" >}}
{{< codenew file="podpreset/pod.yaml" >}}
**Example Pod Preset:**
{{< code file="podpreset-preset.yaml" >}}
{{< codenew file="podpreset/preset.yaml" >}}
**Another Pod Preset:**
{{< code file="podpreset-proxy.yaml" >}}
{{< codenew file="podpreset/proxy.yaml" >}}
**Pod spec after admission controller:**
{{< code file="podpreset-multi-merged.yaml" >}}
{{< codenew file="podpreset/multi-merged.yaml" >}}
### Conflict Example
@@ -147,15 +147,15 @@ when there is a conflict.
**User submitted pod spec:**
{{< code file="podpreset-conflict-pod.yaml" >}}
{{< codenew file="podpreset/conflict-pod.yaml" >}}
**Example Pod Preset:**
{{< code file="podpreset-conflict-preset.yaml" >}}
{{< codenew file="podpreset/conflict-preset.yaml" >}}
**Pod spec after admission controller will not change because of the conflict:**
{{< code file="podpreset-conflict-pod.yaml" >}}
{{< codenew file="podpreset/conflict-pod.yaml" >}}
**If we run `kubectl describe...` we can see the event:**