Skip to content

Commit b1b1d35

Browse files
committed
Add yamllint workflow
Signed-off-by: smoshiur1237 <moshiur.rahman@est.tech>
1 parent b17ceb6 commit b1b1d35

9 files changed

+190
-166
lines changed

.github/workflows/yamllint.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: yamllint
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
pull_request:
8+
types: [ opened, edited, reopened, synchronize, ready_for_review ]
9+
10+
jobs:
11+
yamllint-check:
12+
name: yaml-lint
13+
uses: metal3-io/project-infra/.github/workflows/yamllint.yaml@main
14+
with:
15+
ref: ${{ github.event.pull_request.head.sha }}

.yamllint.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
yaml-files:
2+
- '*.yaml'
3+
- '*.yml'
4+
- '.yamllint'
5+
6+
rules:
7+
trailing-spaces: enable
8+
key-duplicates: enable
9+
indentation:
10+
spaces: 2
11+
indent-sequences: false # Enforce k8s-style indentation
12+
check-multi-line-strings: false
13+
truthy:
14+
allowed-values: [ 'true', 'false', 'yes', 'no', 'on' ]

_config.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
title: Metal³ - Metal Kubed
1717
email: non@none.com
1818
description: >- # this means to ignore newlines until "baseurl:"
19-
Metal3.io aims to build on baremetal host provisioning technologies to provide a Kubernetes native API for managing bare metal hosts via a provisioning stack that is also running on Kubernetes.
19+
Metal3.io aims to build on baremetal host provisioning technologies to provide a Kubernetes native API for managing bare metal hosts via a provisioning stack that is also running on Kubernetes.
2020
baseurl: "" # the subpath of your site, e.g. /blog
2121
url: "https://metal3.io" # the base hostname & protocol for your site, e.g. http://example.com
2222
twitter_username: metal3_io
23-
github_username: metal3-io
23+
github_username: metal3-io
2424
type: website
2525
image: /assets/images/metal3logo.png
2626

@@ -39,11 +39,11 @@ kramdown:
3939
start_line: 1
4040
theme: minima
4141
plugins:
42-
- premonition
43-
- jekyll-feed
44-
- jekyll-paginate
45-
- jekyll-redirect-from
46-
- jekyll-sitemap
42+
- premonition
43+
- jekyll-feed
44+
- jekyll-paginate
45+
- jekyll-redirect-from
46+
- jekyll-sitemap
4747

4848
paginate: 5
4949
paginate_path: "/blog/page:num"
@@ -55,12 +55,10 @@ collections:
5555
output: true
5656
permalink: /:collection/:path
5757

58-
5958
sass:
6059
sass_dir: _sass
6160
style: compressed
6261

63-
6462
# Exclude from processing.
6563
# The following items will not be processed, by default. Create a custom list
6664
# to override the default setting.
@@ -74,8 +72,8 @@ sass:
7472
# - vendor/ruby/
7573

7674
exclude:
77-
- GUIDELINES.md
78-
- README.md
79-
- node_modules
75+
- GUIDELINES.md
76+
- README.md
77+
- node_modules
8078

8179
permalink: /blog/:year/:month/:day/:title:output_ext

_posts/2019-06-25-Metal3.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ spec:
3333
group: stable.example.com
3434
# list of versions supported by this CustomResourceDefinition
3535
versions:
36-
- name: v1
37-
# Each version can be enabled/disabled by Served flag.
38-
served: true
39-
# One and only one version must be marked as the storage version.
40-
storage: true
36+
- name: v1
37+
# Each version can be enabled/disabled by Served flag.
38+
served: true
39+
# One and only one version must be marked as the storage version.
40+
storage: true
4141
# either Namespaced or Cluster
4242
scope: Namespaced
4343
names:
@@ -49,7 +49,7 @@ spec:
4949
kind: CronTab
5050
# shortNames allow shorter string to match your resource on the CLI
5151
shortNames:
52-
- ct
52+
- ct
5353
preserveUnknownFields: false
5454
validation:
5555
openAPIV3Schema:

_posts/2020-06-18-Metal3-dev-env-BareMetal-Cluster-Deployment.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ kubectl describe Cluster ${CLUSTER_NAME} -n metal3
175175
```yaml
176176
apiVersion: cluster.x-k8s.io/v1alpha3
177177
kind: Cluster
178-
metadata: [......]
178+
metadata: #[....]
179179
spec:
180180
clusterNetwork:
181181
pods:
@@ -225,8 +225,7 @@ kubectl describe KubeadmControlPlane ${CLUSTER_NAME} -n metal3
225225
```yaml
226226
apiVersion: controlplane.cluster.x-k8s.io/v1alpha3
227227
kind: KubeadmControlPlane
228-
metadata:
229-
[....]
228+
metadata: #[....]
230229
ownerReferences:
231230
- apiVersion: cluster.x-k8s.io/v1alpha3
232231
blockOwnerDeletion: true
@@ -245,8 +244,7 @@ spec:
245244
namespace: metal3
246245
kubeadmConfigSpec:
247246
files:
248-
- content: |
249-
[....]
247+
- content: #[....]
250248
replicas: 1
251249
version: v1.18.0
252250
status:
@@ -334,8 +332,7 @@ kubectl describe MachineDeployment ${CLUSTER_NAME} -n metal3
334332
```yaml
335333
apiVersion: cluster.x-k8s.io/v1alpha3
336334
kind: MachineDeployment
337-
metadata:
338-
[....]
335+
metadata: #[....]
339336
ownerReferences:
340337
- apiVersion: cluster.x-k8s.io/v1alpha3
341338
kind: Cluster

_posts/2020-07-06-IP_address_manager.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,12 @@ metadata:
7070
spec:
7171
clusterName: cluster1
7272
pools:
73-
- start: 192.168.0.10
74-
end: 192.168.0.30
75-
prefix: 25
76-
gateway: 192.168.0.1
77-
- subnet: 192.168.1.1/26
78-
- subnet: 192.168.1.128/25
73+
- start: 192.168.0.10
74+
end: 192.168.0.30
75+
prefix: 25
76+
gateway: 192.168.0.1
77+
- subnet: 192.168.1.1/26
78+
- subnet: 192.168.1.128/25
7979
prefix: 24
8080
gateway: 192.168.1.1
8181
preAllocations:
@@ -92,11 +92,11 @@ metadata:
9292
spec:
9393
clusterName: cluster1
9494
pools:
95-
- start: 2001:0db8:85a3:0000:0000:8a2e::10
96-
end: 2001:0db8:85a3:0000:0000:8a2e:ffff:fff0
97-
prefix: 96
98-
gateway: 12001:0db8:85a3:0000:0000:8a2e::1
99-
- subnet: 2001:0db8:85a3:0000:0000:8a2d::/96
95+
- start: 2001:0db8:85a3:0000:0000:8a2e::10
96+
end: 2001:0db8:85a3:0000:0000:8a2e:ffff:fff0
97+
prefix: 96
98+
gateway: 12001:0db8:85a3:0000:0000:8a2e::1
99+
- subnet: 2001:0db8:85a3:0000:0000:8a2d::/96
100100
prefix: 96
101101
gateway: 2001:0db8:85a3:0000:0000:8a2d::1
102102
```
@@ -152,12 +152,12 @@ metadata:
152152
spec:
153153
clusterName: cluster1
154154
pools:
155-
- start: 192.168.0.10
156-
end: 192.168.0.30
157-
prefix: 25
158-
gateway: 192.168.0.1
159-
- subnet: 192.168.1.1/26
160-
- subnet: 192.168.1.128/25
155+
- start: 192.168.0.10
156+
end: 192.168.0.30
157+
prefix: 25
158+
gateway: 192.168.0.1
159+
- subnet: 192.168.1.1/26
160+
- subnet: 192.168.1.128/25
161161
prefix: 24
162162
gateway: 192.168.1.1
163163
preAllocations:

0 commit comments

Comments
 (0)