chore: lint yaml
This commit is contained in:
parent
30e82a16da
commit
4709abe3e0
|
@ -1,2 +1,3 @@
|
|||
---
|
||||
MD013: false # long lines
|
||||
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
|
||||
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
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
|
@ -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
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
|
@ -7,5 +8,5 @@ metadata:
|
|||
tier: frontend
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx
|
||||
- name: nginx
|
||||
image: nginx
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
|
@ -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
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
|
@ -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
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: bash
|
||||
spec:
|
||||
containers:
|
||||
- name: bash
|
||||
image: nginx
|
||||
- name: bash
|
||||
image: nginx
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
|
@ -8,4 +9,3 @@ spec:
|
|||
backend:
|
||||
serviceName: simple-service
|
||||
servicePort: 80
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
apiVersion: batch/v1beta1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
|
@ -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)"]
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
|
@ -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
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
|
@ -5,4 +6,4 @@ metadata:
|
|||
type: Opaque
|
||||
data:
|
||||
username: YWRtaW4=
|
||||
password: MWYyZDFlMmU2N2Rm
|
||||
password: MWYyZDFlMmU2N2Rm
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -14,17 +14,17 @@ 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
|
||||
|
@ -32,7 +32,7 @@ metadata:
|
|||
name: readiness-service
|
||||
spec:
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 9876
|
||||
- port: 80
|
||||
targetPort: 9876
|
||||
selector:
|
||||
app: readiness-deployment
|
||||
|
|
|
@ -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
|
||||
|
@ -38,5 +38,5 @@ spec:
|
|||
- nginx-pod-anti-affinity
|
||||
topologyKey: kubernetes.io/hostname
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx
|
||||
- name: nginx
|
||||
image: nginx
|
||||
|
|
|
@ -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
|
||||
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
apiVersion: autoscaling/v1
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
|
@ -9,4 +10,4 @@ spec:
|
|||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
name: simple-deployment
|
||||
targetCPUUtilizationPercentage: 80
|
||||
targetCPUUtilizationPercentage: 80
|
||||
|
|
|
@ -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,3 +1,4 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
|
@ -14,18 +15,18 @@ spec:
|
|||
app: mysql
|
||||
spec:
|
||||
containers:
|
||||
- image: mysql:5.6
|
||||
name: mysql
|
||||
env:
|
||||
- name: MYSQL_ROOT_PASSWORD
|
||||
value: password
|
||||
ports:
|
||||
- containerPort: 3306
|
||||
- image: mysql:5.6
|
||||
name: mysql
|
||||
volumeMounts:
|
||||
- name: mysql-persistent-storage
|
||||
mountPath: /var/lib/mysql
|
||||
env:
|
||||
- name: MYSQL_ROOT_PASSWORD
|
||||
value: password
|
||||
ports:
|
||||
- containerPort: 3306
|
||||
name: mysql
|
||||
volumeMounts:
|
||||
- name: mysql-persistent-storage
|
||||
mountPath: /var/lib/mysql
|
||||
volumes:
|
||||
- name: mysql-persistent-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: mysql-pv-claim
|
||||
- name: mysql-persistent-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: mysql-pv-claim
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: mysql
|
||||
spec:
|
||||
ports:
|
||||
- port: 3306
|
||||
- port: 3306
|
||||
selector:
|
||||
app: mysql
|
||||
clusterIP: None
|
||||
clusterIP: None
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
|
@ -14,19 +15,19 @@ spec:
|
|||
app: nginx # has to match .spec.selector.matchLabels
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: k8s.gcr.io/nginx-slim:0.8
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: web
|
||||
volumeMounts:
|
||||
- name: www
|
||||
mountPath: /usr/share/nginx/html
|
||||
- name: nginx
|
||||
image: k8s.gcr.io/nginx-slim:0.8
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: web
|
||||
volumeMounts:
|
||||
- name: www
|
||||
mountPath: /usr/share/nginx/html
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: www
|
||||
spec:
|
||||
accessModes: [ "ReadWriteOnce" ]
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
- metadata:
|
||||
name: www
|
||||
spec:
|
||||
accessModes: ["ReadWriteOnce"]
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
|
|
|
@ -3,4 +3,4 @@ extends: default
|
|||
rules:
|
||||
line-length: disable
|
||||
comments:
|
||||
min-spaces-from-content: 1
|
||||
min-spaces-from-content: 1
|
||||
|
|
Loading…
Reference in New Issue