Downloadable examples for “Run applications” section (#14147)
* Move examples ahead of commands that use them In support of https://github.com/kubernetes/website/issues/12740 The aim is to adopt a consistent style around providing downloadable examples for use with kubectl, etc. * Tweak wording for stateful app pod example * Adopt formatting conventions for code blocks * Move ReplicationController sample YAML to examples In aid of https://github.com/kubernetes/website/issues/12740 * Move PodDisruptionBudget sample YAML to examples In aid of https://github.com/kubernetes/website/issues/12740 * Update test schema for new examples * Use Unicode ellipsis in example Aim here is to make the elision more obvious
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
b3e3332739
commit
7b44b7a3df
@@ -0,0 +1,16 @@
|
||||
apiVersion: v1
|
||||
kind: ReplicationController
|
||||
metadata:
|
||||
name: my-nginx
|
||||
spec:
|
||||
replicas: 5
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: nginx
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx:1.7.9
|
||||
ports:
|
||||
- containerPort: 80
|
||||
@@ -0,0 +1,21 @@
|
||||
apiVersion: v1
|
||||
kind: ReplicationController
|
||||
metadata:
|
||||
name: my-nginx-v4
|
||||
spec:
|
||||
replicas: 5
|
||||
selector:
|
||||
app: nginx
|
||||
deployment: v4
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: nginx
|
||||
deployment: v4
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx:1.9.2
|
||||
args: ["nginx", "-T"]
|
||||
ports:
|
||||
- containerPort: 80
|
||||
@@ -415,13 +415,15 @@ func TestExampleObjectSchemas(t *testing.T) {
|
||||
"configmap-multikeys": {&api.ConfigMap{}},
|
||||
},
|
||||
"controllers": {
|
||||
"daemonset": {&apps.DaemonSet{}},
|
||||
"frontend": {&apps.ReplicaSet{}},
|
||||
"hpa-rs": {&autoscaling.HorizontalPodAutoscaler{}},
|
||||
"job": {&batch.Job{}},
|
||||
"replicaset": {&apps.ReplicaSet{}},
|
||||
"replication": {&api.ReplicationController{}},
|
||||
"nginx-deployment": {&apps.Deployment{}},
|
||||
"daemonset": {&apps.DaemonSet{}},
|
||||
"frontend": {&apps.ReplicaSet{}},
|
||||
"hpa-rs": {&autoscaling.HorizontalPodAutoscaler{}},
|
||||
"job": {&batch.Job{}},
|
||||
"replicaset": {&apps.ReplicaSet{}},
|
||||
"replication": {&api.ReplicationController{}},
|
||||
"replication-nginx-1.7.9": {&api.ReplicationController{}},
|
||||
"replication-nginx-1.9.2": {&api.ReplicationController{}},
|
||||
"nginx-deployment": {&apps.Deployment{}},
|
||||
},
|
||||
"debug": {
|
||||
"counter-pod": {&api.Pod{}},
|
||||
@@ -523,9 +525,11 @@ func TestExampleObjectSchemas(t *testing.T) {
|
||||
"redis": {&api.Pod{}},
|
||||
},
|
||||
"policy": {
|
||||
"privileged-psp": {&policy.PodSecurityPolicy{}},
|
||||
"restricted-psp": {&policy.PodSecurityPolicy{}},
|
||||
"example-psp": {&policy.PodSecurityPolicy{}},
|
||||
"privileged-psp": {&policy.PodSecurityPolicy{}},
|
||||
"restricted-psp": {&policy.PodSecurityPolicy{}},
|
||||
"example-psp": {&policy.PodSecurityPolicy{}},
|
||||
"zookeeper-pod-disruption-budget-maxunavailable": {&policy.PodDisruptionBudget{}},
|
||||
"zookeeper-pod-disruption-budget-minunavailable": {&policy.PodDisruptionBudget{}},
|
||||
},
|
||||
"service": {
|
||||
"nginx-service": {&api.Service{}},
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
apiVersion: policy/v1beta1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: zk-pdb
|
||||
spec:
|
||||
maxUnavailable: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: zookeeper
|
||||
@@ -0,0 +1,9 @@
|
||||
apiVersion: policy/v1beta1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: zk-pdb
|
||||
spec:
|
||||
minAvailable: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: zookeeper
|
||||
Reference in New Issue
Block a user