From e81e3c84641f5a53ea69195be353520913fc0586 Mon Sep 17 00:00:00 2001 From: TigerXu Date: Tue, 22 Aug 2017 07:28:12 +0800 Subject: [PATCH] unify all service yaml: use 2 spaces indent (#4754) --- docs/api-reference/v1.5/index.html | 32 +++++------ docs/api-reference/v1.6/index.html | 32 +++++------ docs/api-reference/v1.7/index.html | 32 +++++------ .../services-networking/dns-pod-service.md | 6 +-- docs/concepts/services-networking/service.md | 54 +++++++++---------- .../workloads/pods/init-containers.md | 12 ++--- .../configure-cloud-provider-firewall.md | 8 +-- .../access-application-cluster/frontend.yaml | 18 +++---- .../hello-service.yaml | 6 +-- .../run-application/mysql-deployment.yaml | 2 +- .../cassandra-service.yaml | 2 +- .../jobs/work-queue-2/redis-service.yaml | 4 +- .../services/load-balancer-sample.yaml | 4 +- docs/user-guide/services/service-sample.yaml | 4 +- 14 files changed, 108 insertions(+), 108 deletions(-) diff --git a/docs/api-reference/v1.5/index.html b/docs/api-reference/v1.5/index.html index 6f3a30ca19..71b333af82 100644 --- a/docs/api-reference/v1.5/index.html +++ b/docs/api-reference/v1.5/index.html @@ -17957,10 +17957,10 @@ Appears In Ingress name: service-example spec: ports: - # Accept traffic sent to port 80 - - name: http - port: 80 - targetPort: 80 + # Accept traffic sent to port 80 + - name: http + port: 80 + targetPort: 80 selector: # Loadbalance traffic across Pods matching # this label selector @@ -17981,10 +17981,10 @@ Appears In Ingress name: service-example spec: ports: - # Accept traffic sent to port 80 - - name: http - port: 80 - targetPort: 80 + # Accept traffic sent to port 80 + - name: http + port: 80 + targetPort: 80 selector: # Loadbalance traffic across Pods matching # this label selector @@ -18156,11 +18156,11 @@ metadata: name: service-example spec: ports: - - name: http - port: 80 - targetPort: 80 + - name: http + port: 80 + targetPort: 80 selector: - app: nginx + app: nginx type: LoadBalancer ' | kubectl create -f - @@ -18176,11 +18176,11 @@ metadata: name: service-example spec: ports: - - name: http - port: 80 - targetPort: 80 + - name: http + port: 80 + targetPort: 80 selector: - app: nginx + app: nginx type: LoadBalancer ' http://127.0.0.1:8001/api/v1/namespaces/default/services diff --git a/docs/api-reference/v1.6/index.html b/docs/api-reference/v1.6/index.html index 130acf039a..7e64251ea9 100644 --- a/docs/api-reference/v1.6/index.html +++ b/docs/api-reference/v1.6/index.html @@ -17849,10 +17849,10 @@ Appears In Ingress name: service-example spec: ports: - # Accept traffic sent to port 80 - - name: http - port: 80 - targetPort: 80 + # Accept traffic sent to port 80 + - name: http + port: 80 + targetPort: 80 selector: # Loadbalance traffic across Pods matching # this label selector @@ -17873,10 +17873,10 @@ Appears In Ingress name: service-example spec: ports: - # Accept traffic sent to port 80 - - name: http - port: 80 - targetPort: 80 + # Accept traffic sent to port 80 + - name: http + port: 80 + targetPort: 80 selector: # Loadbalance traffic across Pods matching # this label selector @@ -18048,11 +18048,11 @@ metadata: name: service-example spec: ports: - - name: http - port: 80 - targetPort: 80 + - name: http + port: 80 + targetPort: 80 selector: - app: nginx + app: nginx type: LoadBalancer ' | kubectl create -f - @@ -18068,11 +18068,11 @@ metadata: name: service-example spec: ports: - - name: http - port: 80 - targetPort: 80 + - name: http + port: 80 + targetPort: 80 selector: - app: nginx + app: nginx type: LoadBalancer ' http://127.0.0.1:8001/api/v1/namespaces/default/services diff --git a/docs/api-reference/v1.7/index.html b/docs/api-reference/v1.7/index.html index 9f8b0c2bbd..4f7606ea40 100644 --- a/docs/api-reference/v1.7/index.html +++ b/docs/api-reference/v1.7/index.html @@ -17914,10 +17914,10 @@ metadata: name: service-example spec: ports: - # Accept traffic sent to port 80 - - name: http - port: 80 - targetPort: 80 + # Accept traffic sent to port 80 + - name: http + port: 80 + targetPort: 80 selector: # Loadbalance traffic across Pods matching # this label selector @@ -17938,10 +17938,10 @@ metadata: name: service-example spec: ports: - # Accept traffic sent to port 80 - - name: http - port: 80 - targetPort: 80 + # Accept traffic sent to port 80 + - name: http + port: 80 + targetPort: 80 selector: # Loadbalance traffic across Pods matching # this label selector @@ -18129,11 +18129,11 @@ $ echo 'kind: Service name: service-example spec: ports: - - name: http - port: 80 - targetPort: 80 + - name: http + port: 80 + targetPort: 80 selector: - app: nginx + app: nginx type: LoadBalancer ' | kubectl create -f - @@ -18149,11 +18149,11 @@ metadata: name: service-example spec: ports: - - name: http - port: 80 - targetPort: 80 + - name: http + port: 80 + targetPort: 80 selector: - app: nginx + app: nginx type: LoadBalancer ' http://127.0.0.1:8001/api/v1/namespaces/default/services diff --git a/docs/concepts/services-networking/dns-pod-service.md b/docs/concepts/services-networking/dns-pod-service.md index 77c3ad92df..7f024f523a 100644 --- a/docs/concepts/services-networking/dns-pod-service.md +++ b/docs/concepts/services-networking/dns-pod-service.md @@ -101,9 +101,9 @@ spec: name: busybox clusterIP: None ports: - - name: foo # Actually, no port is needed. - port: 1234 - targetPort: 1234 + - name: foo # Actually, no port is needed. + port: 1234 + targetPort: 1234 --- apiVersion: v1 kind: Pod diff --git a/docs/concepts/services-networking/service.md b/docs/concepts/services-networking/service.md index 54007a67e5..c566b42047 100644 --- a/docs/concepts/services-networking/service.md +++ b/docs/concepts/services-networking/service.md @@ -52,9 +52,9 @@ spec: selector: app: MyApp ports: - - protocol: TCP - port: 80 - targetPort: 9376 + - protocol: TCP + port: 80 + targetPort: 9376 ``` This specification will create a new `Service` object named "my-service" which @@ -97,9 +97,9 @@ metadata: name: my-service spec: ports: - - protocol: TCP - port: 80 - targetPort: 9376 + - protocol: TCP + port: 80 + targetPort: 9376 ``` Because this service has no selector, the corresponding `Endpoints` object will not be @@ -216,17 +216,17 @@ apiVersion: v1 metadata: name: my-service spec: - selector: - app: MyApp - ports: - - name: http - protocol: TCP - port: 80 - targetPort: 9376 - - name: https - protocol: TCP - port: 443 - targetPort: 9377 + selector: + app: MyApp + ports: + - name: http + protocol: TCP + port: 80 + targetPort: 9376 + - name: https + protocol: TCP + port: 443 + targetPort: 9377 ``` ## Choosing your own IP address @@ -404,17 +404,17 @@ spec: selector: app: MyApp ports: - - protocol: TCP - port: 80 - targetPort: 9376 - nodePort: 30061 + - protocol: TCP + port: 80 + targetPort: 9376 + nodePort: 30061 clusterIP: 10.0.171.239 loadBalancerIP: 78.11.24.19 type: LoadBalancer status: loadBalancer: ingress: - - ip: 146.148.47.155 + - ip: 146.148.47.155 ``` Traffic from the external load balancer will be directed at the backend `Pods`, @@ -531,12 +531,12 @@ spec: selector: app: MyApp ports: - - name: http - protocol: TCP - port: 80 - targetPort: 9376 + - name: http + protocol: TCP + port: 80 + targetPort: 9376 externalIPs: - - 80.11.12.10 + - 80.11.12.10 ``` ## Shortcomings diff --git a/docs/concepts/workloads/pods/init-containers.md b/docs/concepts/workloads/pods/init-containers.md index d4eaa11117..73cb6b5b40 100644 --- a/docs/concepts/workloads/pods/init-containers.md +++ b/docs/concepts/workloads/pods/init-containers.md @@ -157,9 +157,9 @@ metadata: name: myservice spec: ports: - - protocol: TCP - port: 80 - targetPort: 9376 + - protocol: TCP + port: 80 + targetPort: 9376 --- kind: Service apiVersion: v1 @@ -167,9 +167,9 @@ metadata: name: mydb spec: ports: - - protocol: TCP - port: 80 - targetPort: 9377 + - protocol: TCP + port: 80 + targetPort: 9377 ``` This Pod can be started and debugged with the following commands: diff --git a/docs/tasks/access-application-cluster/configure-cloud-provider-firewall.md b/docs/tasks/access-application-cluster/configure-cloud-provider-firewall.md index 58eb4d65d2..5b8b768123 100644 --- a/docs/tasks/access-application-cluster/configure-cloud-provider-firewall.md +++ b/docs/tasks/access-application-cluster/configure-cloud-provider-firewall.md @@ -26,8 +26,8 @@ metadata: name: myapp spec: ports: - - port: 8765 - targetPort: 9376 + - port: 8765 + targetPort: 9376 selector: app: example type: LoadBalancer @@ -44,8 +44,8 @@ metadata: name: myapp spec: ports: - - port: 8765 - targetPort: 9376 + - port: 8765 + targetPort: 9376 selector: app: example type: LoadBalancer diff --git a/docs/tasks/access-application-cluster/frontend.yaml b/docs/tasks/access-application-cluster/frontend.yaml index 62ff60c0df..382c3786e5 100644 --- a/docs/tasks/access-application-cluster/frontend.yaml +++ b/docs/tasks/access-application-cluster/frontend.yaml @@ -7,9 +7,9 @@ spec: app: hello tier: frontend ports: - - protocol: "TCP" - port: 80 - targetPort: 80 + - protocol: "TCP" + port: 80 + targetPort: 80 type: LoadBalancer --- apiVersion: apps/v1beta1 @@ -26,9 +26,9 @@ spec: track: stable spec: containers: - - name: nginx - image: "gcr.io/google-samples/hello-frontend:1.0" - lifecycle: - preStop: - exec: - command: ["/usr/sbin/nginx","-s","quit"] + - name: nginx + image: "gcr.io/google-samples/hello-frontend:1.0" + lifecycle: + preStop: + exec: + command: ["/usr/sbin/nginx","-s","quit"] diff --git a/docs/tasks/access-application-cluster/hello-service.yaml b/docs/tasks/access-application-cluster/hello-service.yaml index 8be93e1da6..1e4c7a6c32 100644 --- a/docs/tasks/access-application-cluster/hello-service.yaml +++ b/docs/tasks/access-application-cluster/hello-service.yaml @@ -7,6 +7,6 @@ spec: app: hello tier: backend ports: - - protocol: TCP - port: 80 - targetPort: http + - protocol: TCP + port: 80 + targetPort: http diff --git a/docs/tasks/run-application/mysql-deployment.yaml b/docs/tasks/run-application/mysql-deployment.yaml index 19e102947f..1bf9671ef1 100644 --- a/docs/tasks/run-application/mysql-deployment.yaml +++ b/docs/tasks/run-application/mysql-deployment.yaml @@ -4,7 +4,7 @@ metadata: name: mysql spec: ports: - - port: 3306 + - port: 3306 selector: app: mysql clusterIP: None diff --git a/docs/tutorials/stateful-application/cassandra-service.yaml b/docs/tutorials/stateful-application/cassandra-service.yaml index 35b07733b5..31bee74b58 100644 --- a/docs/tutorials/stateful-application/cassandra-service.yaml +++ b/docs/tutorials/stateful-application/cassandra-service.yaml @@ -7,6 +7,6 @@ metadata: spec: clusterIP: None ports: - - port: 9042 + - port: 9042 selector: app: cassandra diff --git a/docs/user-guide/jobs/work-queue-2/redis-service.yaml b/docs/user-guide/jobs/work-queue-2/redis-service.yaml index 85f2ca2271..519ea60fb9 100644 --- a/docs/user-guide/jobs/work-queue-2/redis-service.yaml +++ b/docs/user-guide/jobs/work-queue-2/redis-service.yaml @@ -4,7 +4,7 @@ metadata: name: redis spec: ports: - - port: 6379 - targetPort: 6379 + - port: 6379 + targetPort: 6379 selector: app: redis diff --git a/docs/user-guide/services/load-balancer-sample.yaml b/docs/user-guide/services/load-balancer-sample.yaml index 28b1dd3014..0f53c3a524 100644 --- a/docs/user-guide/services/load-balancer-sample.yaml +++ b/docs/user-guide/services/load-balancer-sample.yaml @@ -4,8 +4,8 @@ metadata: name: myapp spec: ports: - - port: 8765 - targetPort: 9376 + - port: 8765 + targetPort: 9376 selector: app: example type: LoadBalancer diff --git a/docs/user-guide/services/service-sample.yaml b/docs/user-guide/services/service-sample.yaml index c819df7ac5..1563884931 100644 --- a/docs/user-guide/services/service-sample.yaml +++ b/docs/user-guide/services/service-sample.yaml @@ -4,7 +4,7 @@ metadata: name: myapp spec: ports: - - port: 8765 - targetPort: 9376 + - port: 8765 + targetPort: 9376 selector: app: example