Skip to content

Commit

Permalink
chore: lint yaml (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
ElPicador committed May 14, 2019
1 parent 30e82a1 commit 813a778
Show file tree
Hide file tree
Showing 26 changed files with 141 additions and 115 deletions.
1 change: 1 addition & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
MD013: false # long lines
MD034: false # bare urls
6 changes: 6 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
extends: default

rules:
line-length: disable
comments:
min-spaces-from-content: 1
5 changes: 3 additions & 2 deletions 05-pods/01-simple-pod.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
apiVersion: v1
kind: Pod
metadata:
name: simple-pod
spec:
containers:
- name: simple-pod
image: mhausenblas/simpleservice:0.5.0
- name: simple-pod
image: mhausenblas/simpleservice:0.5.0
5 changes: 3 additions & 2 deletions 06-label-annotation/01-simple-pod.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: v1
kind: Pod
metadata:
Expand All @@ -7,5 +8,5 @@ metadata:
tier: backend
spec:
containers:
- name: simple-pod
image: mhausenblas/simpleservice:0.5.0
- name: simple-pod
image: mhausenblas/simpleservice:0.5.0
5 changes: 3 additions & 2 deletions 06-label-annotation/02-nginx.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: v1
kind: Pod
metadata:
Expand All @@ -7,5 +8,5 @@ metadata:
tier: frontend
spec:
containers:
- name: nginx
image: nginx
- name: nginx
image: nginx
9 changes: 5 additions & 4 deletions 07-deployment/01-simple-deployment.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
Expand All @@ -13,7 +14,7 @@ spec:
app: simple-deployment
spec:
containers:
- name: simple-pod
image: mhausenblas/simpleservice:0.4.0
ports:
- containerPort: 9876
- name: simple-pod
image: mhausenblas/simpleservice:0.4.0
ports:
- containerPort: 9876
11 changes: 6 additions & 5 deletions 08-service/01-simple-deployment.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
Expand All @@ -7,13 +8,13 @@ spec:
selector:
matchLabels:
app: simple-deployment
template:
template:
metadata:
labels:
app: simple-deployment
spec:
containers:
- name: simple-pod
image: mhausenblas/simpleservice:0.4.0
ports:
- containerPort: 9876
- name: simple-pod
image: mhausenblas/simpleservice:0.4.0
ports:
- containerPort: 9876
5 changes: 3 additions & 2 deletions 08-service/02-bash.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
apiVersion: v1
kind: Pod
metadata:
name: bash
spec:
containers:
- name: bash
image: nginx
- name: bash
image: nginx
5 changes: 3 additions & 2 deletions 08-service/03-simple-service.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
apiVersion: v1
kind: Service
metadata:
name: simple-service
spec:
ports:
- port: 80
targetPort: 9876
- port: 80
targetPort: 9876
selector:
app: simple-deployment
2 changes: 1 addition & 1 deletion 08-service/04-ingress.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
Expand All @@ -8,4 +9,3 @@ spec:
backend:
serviceName: simple-service
servicePort: 80

7 changes: 4 additions & 3 deletions 09-cronjob/01-simple-cronjob.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: batch/v1beta1
kind: CronJob
metadata:
Expand All @@ -10,6 +11,6 @@ spec:
spec:
restartPolicy: Never
containers:
- name: pi
image: perl
command: ["perl", "-Mbignum=bpi", "-wle", "print bpi(100)"]
- name: pi
image: perl
command: ["perl", "-Mbignum=bpi", "-wle", "print bpi(100)"]
9 changes: 5 additions & 4 deletions 09-cronjob/02-simple-job.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: batch/v1
kind: Job
metadata:
Expand All @@ -6,7 +7,7 @@ spec:
template:
spec:
containers:
- name: c
image: busybox
command: ["sh", "-c", "echo Processing item $ITEM && sleep 5"]
restartPolicy: Never
- name: c
image: busybox
command: ["sh", "-c", "echo Processing item $ITEM && sleep 5"]
restartPolicy: Never
3 changes: 2 additions & 1 deletion 10-secrets/01-secrets.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
apiVersion: v1
kind: Secret
metadata:
name: mysecret
type: Opaque
data:
username: YWRtaW4=
password: MWYyZDFlMmU2N2Rm
password: MWYyZDFlMmU2N2Rm
19 changes: 10 additions & 9 deletions 11-probes/01-liveness-probe.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
---
apiVersion: v1
kind: Pod
metadata:
name: liveness-probe-pod
spec:
containers:
- name: liveness-probe-pod
image: nginx
livenessProbe:
exec:
command:
- exit
- "1"
initialDelaySeconds: 5
periodSeconds: 5
- name: liveness-probe-pod
image: nginx
livenessProbe:
exec:
command:
- exit
- "1"
initialDelaySeconds: 5
periodSeconds: 5
26 changes: 13 additions & 13 deletions 11-probes/02-readiness-probe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,25 @@ spec:
app: readiness-deployment
spec:
containers:
- name: readiness-probe-pod
image: mhausenblas/simpleservice:0.4.0
ports:
- containerPort: 9876
readinessProbe:
exec:
command:
- exit
- "1"
initialDelaySeconds: 5
periodSeconds: 5
- name: readiness-probe-pod
image: mhausenblas/simpleservice:0.4.0
ports:
- containerPort: 9876
readinessProbe:
exec:
command:
- exit
- "1"
initialDelaySeconds: 5
periodSeconds: 5
---
apiVersion: v1
kind: Service
metadata:
name: readiness-service
spec:
ports:
- port: 80
targetPort: 9876
- port: 80
targetPort: 9876
selector:
app: readiness-deployment
8 changes: 4 additions & 4 deletions 13-affinity-anti-affinity/01-pod-anti-affinity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ spec:
- nginx-pod-anti-affinity
topologyKey: kubernetes.io/hostname
containers:
- name: nginx
image: nginx
- name: nginx
image: nginx
---
apiVersion: v1
kind: Pod
Expand All @@ -38,5 +38,5 @@ spec:
- nginx-pod-anti-affinity
topologyKey: kubernetes.io/hostname
containers:
- name: nginx
image: nginx
- name: nginx
image: nginx
24 changes: 12 additions & 12 deletions 13-affinity-anti-affinity/02-node-affinity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ spec:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: gpu
operator: In
values:
- "yes"
- key: gpu
operator: In
values:
- "yes"
containers:
- name: nginx
image: nginx
- name: nginx
image: nginx
---
apiVersion: v1
kind: Pod
Expand All @@ -27,10 +27,10 @@ spec:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: gpu
operator: In
values:
- "no"
- key: gpu
operator: In
values:
- "no"
containers:
- name: nginx
image: nginx
- name: nginx
image: nginx
7 changes: 4 additions & 3 deletions 14-pdb/kind.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
# three node (two workers) cluster config
kind: Cluster
apiVersion: kind.sigs.k8s.io/v1alpha3
nodes:
- role: control-plane
- role: worker
- role: worker
- role: control-plane
- role: worker
- role: worker
3 changes: 2 additions & 1 deletion 15-hpa-vpa/02-hpa.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
Expand All @@ -9,4 +10,4 @@ spec:
apiVersion: extensions/v1beta1
kind: Deployment
name: simple-deployment
targetCPUUtilizationPercentage: 80
targetCPUUtilizationPercentage: 80
29 changes: 15 additions & 14 deletions 16-sidecar-containers/01-sidecar.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
---
apiVersion: v1
kind: Pod
metadata:
name: two-containers
spec:
volumes:
- name: shared-data
emptyDir: {}
- name: shared-data
emptyDir: {}
containers:
- name: nginx
image: nginx
volumeMounts:
- name: data
mountPath: /usr/share/nginx/html
- name: debian
image: debian
volumeMounts:
- name: data
mountPath: /pod-data
command: ["/bin/sh"]
args: ["-c", "echo Hello from the debian container > /pod-data/index.html"]
- name: nginx
image: nginx
volumeMounts:
- name: data
mountPath: /usr/share/nginx/html
- name: debian
image: debian
volumeMounts:
- name: data
mountPath: /pod-data
command: ["/bin/sh"]
args: ["-c", "echo Hello from the debian container > /pod-data/index.html"]
1 change: 1 addition & 0 deletions 17-volumes/01-simple-mysql-pv.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: v1
kind: PersistentVolume
metadata:
Expand Down
1 change: 1 addition & 0 deletions 17-volumes/02-simple-mysql-pvc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
Expand Down
Loading

0 comments on commit 813a778

Please sign in to comment.