chore: lint yaml (#19)

pull/21/head
Rémy-Christophe Schermesser 5 years ago committed by GitHub
parent 30e82a16da
commit 813a7787c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,2 +1,3 @@
---
MD013: false # long lines MD013: false # long lines
MD034: false # bare urls MD034: false # bare urls

@ -0,0 +1,6 @@
extends: default
rules:
line-length: disable
comments:
min-spaces-from-content: 1

@ -1,8 +1,9 @@
---
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
metadata: metadata:
name: simple-pod name: simple-pod
spec: spec:
containers: containers:
- name: simple-pod - name: simple-pod
image: mhausenblas/simpleservice:0.5.0 image: mhausenblas/simpleservice:0.5.0

@ -1,3 +1,4 @@
---
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
metadata: metadata:
@ -7,5 +8,5 @@ metadata:
tier: backend tier: backend
spec: spec:
containers: containers:
- name: simple-pod - name: simple-pod
image: mhausenblas/simpleservice:0.5.0 image: mhausenblas/simpleservice:0.5.0

@ -1,3 +1,4 @@
---
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
metadata: metadata:
@ -7,5 +8,5 @@ metadata:
tier: frontend tier: frontend
spec: spec:
containers: containers:
- name: nginx - name: nginx
image: nginx image: nginx

@ -1,3 +1,4 @@
---
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@ -13,7 +14,7 @@ spec:
app: simple-deployment app: simple-deployment
spec: spec:
containers: containers:
- name: simple-pod - name: simple-pod
image: mhausenblas/simpleservice:0.4.0 image: mhausenblas/simpleservice:0.4.0
ports: ports:
- containerPort: 9876 - containerPort: 9876

@ -1,3 +1,4 @@
---
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@ -7,13 +8,13 @@ spec:
selector: selector:
matchLabels: matchLabels:
app: simple-deployment app: simple-deployment
template: template:
metadata: metadata:
labels: labels:
app: simple-deployment app: simple-deployment
spec: spec:
containers: containers:
- name: simple-pod - name: simple-pod
image: mhausenblas/simpleservice:0.4.0 image: mhausenblas/simpleservice:0.4.0
ports: ports:
- containerPort: 9876 - containerPort: 9876

@ -1,8 +1,9 @@
---
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
metadata: metadata:
name: bash name: bash
spec: spec:
containers: containers:
- name: bash - name: bash
image: nginx image: nginx

@ -1,10 +1,11 @@
---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: simple-service name: simple-service
spec: spec:
ports: ports:
- port: 80 - port: 80
targetPort: 9876 targetPort: 9876
selector: selector:
app: simple-deployment app: simple-deployment

@ -1,3 +1,4 @@
---
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Ingress kind: Ingress
metadata: metadata:
@ -8,4 +9,3 @@ spec:
backend: backend:
serviceName: simple-service serviceName: simple-service
servicePort: 80 servicePort: 80

@ -1,3 +1,4 @@
---
apiVersion: batch/v1beta1 apiVersion: batch/v1beta1
kind: CronJob kind: CronJob
metadata: metadata:
@ -10,6 +11,6 @@ spec:
spec: spec:
restartPolicy: Never restartPolicy: Never
containers: containers:
- name: pi - name: pi
image: perl image: perl
command: ["perl", "-Mbignum=bpi", "-wle", "print bpi(100)"] command: ["perl", "-Mbignum=bpi", "-wle", "print bpi(100)"]

@ -1,3 +1,4 @@
---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
metadata: metadata:
@ -6,7 +7,7 @@ spec:
template: template:
spec: spec:
containers: containers:
- name: c - name: c
image: busybox image: busybox
command: ["sh", "-c", "echo Processing item $ITEM && sleep 5"] command: ["sh", "-c", "echo Processing item $ITEM && sleep 5"]
restartPolicy: Never restartPolicy: Never

@ -1,3 +1,4 @@
---
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
metadata: metadata:
@ -5,4 +6,4 @@ metadata:
type: Opaque type: Opaque
data: data:
username: YWRtaW4= username: YWRtaW4=
password: MWYyZDFlMmU2N2Rm password: MWYyZDFlMmU2N2Rm

@ -1,15 +1,16 @@
---
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
metadata: metadata:
name: liveness-probe-pod name: liveness-probe-pod
spec: spec:
containers: containers:
- name: liveness-probe-pod - name: liveness-probe-pod
image: nginx image: nginx
livenessProbe: livenessProbe:
exec: exec:
command: command:
- exit - exit
- "1" - "1"
initialDelaySeconds: 5 initialDelaySeconds: 5
periodSeconds: 5 periodSeconds: 5

@ -14,17 +14,17 @@ spec:
app: readiness-deployment app: readiness-deployment
spec: spec:
containers: containers:
- name: readiness-probe-pod - name: readiness-probe-pod
image: mhausenblas/simpleservice:0.4.0 image: mhausenblas/simpleservice:0.4.0
ports: ports:
- containerPort: 9876 - containerPort: 9876
readinessProbe: readinessProbe:
exec: exec:
command: command:
- exit - exit
- "1" - "1"
initialDelaySeconds: 5 initialDelaySeconds: 5
periodSeconds: 5 periodSeconds: 5
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
@ -32,7 +32,7 @@ metadata:
name: readiness-service name: readiness-service
spec: spec:
ports: ports:
- port: 80 - port: 80
targetPort: 9876 targetPort: 9876
selector: selector:
app: readiness-deployment app: readiness-deployment

@ -17,8 +17,8 @@ spec:
- nginx-pod-anti-affinity - nginx-pod-anti-affinity
topologyKey: kubernetes.io/hostname topologyKey: kubernetes.io/hostname
containers: containers:
- name: nginx - name: nginx
image: nginx image: nginx
--- ---
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
@ -38,5 +38,5 @@ spec:
- nginx-pod-anti-affinity - nginx-pod-anti-affinity
topologyKey: kubernetes.io/hostname topologyKey: kubernetes.io/hostname
containers: containers:
- name: nginx - name: nginx
image: nginx image: nginx

@ -9,13 +9,13 @@ spec:
requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms: nodeSelectorTerms:
- matchExpressions: - matchExpressions:
- key: gpu - key: gpu
operator: In operator: In
values: values:
- "yes" - "yes"
containers: containers:
- name: nginx - name: nginx
image: nginx image: nginx
--- ---
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
@ -27,10 +27,10 @@ spec:
requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms: nodeSelectorTerms:
- matchExpressions: - matchExpressions:
- key: gpu - key: gpu
operator: In operator: In
values: values:
- "no" - "no"
containers: containers:
- name: nginx - name: nginx
image: nginx image: nginx

@ -1,7 +1,8 @@
---
# three node (two workers) cluster config # three node (two workers) cluster config
kind: Cluster kind: Cluster
apiVersion: kind.sigs.k8s.io/v1alpha3 apiVersion: kind.sigs.k8s.io/v1alpha3
nodes: nodes:
- role: control-plane - role: control-plane
- role: worker - role: worker
- role: worker - role: worker

@ -1,3 +1,4 @@
---
apiVersion: autoscaling/v1 apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler kind: HorizontalPodAutoscaler
metadata: metadata:
@ -9,4 +10,4 @@ spec:
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Deployment kind: Deployment
name: simple-deployment name: simple-deployment
targetCPUUtilizationPercentage: 80 targetCPUUtilizationPercentage: 80

@ -1,21 +1,22 @@
---
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
metadata: metadata:
name: two-containers name: two-containers
spec: spec:
volumes: volumes:
- name: shared-data - name: shared-data
emptyDir: {} emptyDir: {}
containers: containers:
- name: nginx - name: nginx
image: nginx image: nginx
volumeMounts: volumeMounts:
- name: data - name: data
mountPath: /usr/share/nginx/html mountPath: /usr/share/nginx/html
- name: debian - name: debian
image: debian image: debian
volumeMounts: volumeMounts:
- name: data - name: data
mountPath: /pod-data mountPath: /pod-data
command: ["/bin/sh"] command: ["/bin/sh"]
args: ["-c", "echo Hello from the debian container > /pod-data/index.html"] args: ["-c", "echo Hello from the debian container > /pod-data/index.html"]

@ -1,3 +1,4 @@
---
apiVersion: v1 apiVersion: v1
kind: PersistentVolume kind: PersistentVolume
metadata: metadata:

@ -1,3 +1,4 @@
---
apiVersion: v1 apiVersion: v1
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
metadata: metadata:

@ -1,3 +1,4 @@
---
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@ -14,18 +15,18 @@ spec:
app: mysql app: mysql
spec: spec:
containers: containers:
- image: mysql:5.6 - image: mysql:5.6
name: mysql
env:
- name: MYSQL_ROOT_PASSWORD
value: password
ports:
- containerPort: 3306
name: mysql name: mysql
volumeMounts: env:
- name: mysql-persistent-storage - name: MYSQL_ROOT_PASSWORD
mountPath: /var/lib/mysql value: password
ports:
- containerPort: 3306
name: mysql
volumeMounts:
- name: mysql-persistent-storage
mountPath: /var/lib/mysql
volumes: volumes:
- name: mysql-persistent-storage - name: mysql-persistent-storage
persistentVolumeClaim: persistentVolumeClaim:
claimName: mysql-pv-claim claimName: mysql-pv-claim

@ -1,10 +1,11 @@
---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: mysql name: mysql
spec: spec:
ports: ports:
- port: 3306 - port: 3306
selector: selector:
app: mysql app: mysql
clusterIP: None clusterIP: None

@ -1,3 +1,4 @@
---
apiVersion: apps/v1 apiVersion: apps/v1
kind: StatefulSet kind: StatefulSet
metadata: metadata:
@ -14,19 +15,19 @@ spec:
app: nginx # has to match .spec.selector.matchLabels app: nginx # has to match .spec.selector.matchLabels
spec: spec:
containers: containers:
- name: nginx - name: nginx
image: k8s.gcr.io/nginx-slim:0.8 image: k8s.gcr.io/nginx-slim:0.8
ports: ports:
- containerPort: 80 - containerPort: 80
name: web name: web
volumeMounts: volumeMounts:
- name: www - name: www
mountPath: /usr/share/nginx/html mountPath: /usr/share/nginx/html
volumeClaimTemplates: volumeClaimTemplates:
- metadata: - metadata:
name: www name: www
spec: spec:
accessModes: [ "ReadWriteOnce" ] accessModes: ["ReadWriteOnce"]
resources: resources:
requests: requests:
storage: 1Gi storage: 1Gi

@ -3,4 +3,4 @@ extends: default
rules: rules:
line-length: disable line-length: disable
comments: comments:
min-spaces-from-content: 1 min-spaces-from-content: 1

Loading…
Cancel
Save