Skip to content
This repository was archived by the owner on Oct 20, 2023. It is now read-only.

Commit c248098

Browse files
committed
Introduce lint
1 parent bbe0582 commit c248098

10 files changed

+110
-32
lines changed

.circleci/config.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: 2
2+
jobs:
3+
test:
4+
docker:
5+
- image: circleci/node:12
6+
7+
steps:
8+
- checkout
9+
10+
- run:
11+
name: Lint the markdown
12+
command: |
13+
make lint
14+
15+
workflows:
16+
version: 2
17+
build-workflow:
18+
jobs:
19+
- test

.markdownlint.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
line_length:
2+
code_blocks: false
3+
tables: false

CONTRIBUTING.md

+40-13
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,50 @@ Whether you are a user or contributor, official support channels include:
99

1010
## CLA Requirement
1111

12-
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
13-
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA.
14-
15-
## Specifications subject to the Open Web Foundation Agreements.
16-
17-
In addition, by making a contribution to specifications in this repository, you, on behalf of yourself, your employer, and its affiliates, are making those contributions subject to the obligations set forth in the [OWF Contributor License Agreement 1.0 - Copyright and Patent](http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owf-contributor-license-agreement-1-0---copyright-and-patent).
18-
Final specifications developed in this repository will be subject to the [Open Web Foundation Final Specification Agreement (“OWFa 1.0”)](http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-00). OWFa 1.0 will be applied as follows:
19-
20-
- The maintainer will notify all contributors to a designated specification in writing via provided contact information of the start of a 30 day review period, after which the specification will be subject to the OWFa 1.0.
21-
- During that 30 day period, contributors may provide written notice to the maintainer that the contributor is not making the forgoing commitment under OWFa 1.0 for the designated specification (“Exclusion”).
22-
- Upon the end of that 30 day notice period, those contributors who have not issued an Exclusion, on behalf of themselves, their employer, and its affiliates, will, without further action, be subject to the obligations set forth in the OWFa 1.0 for the designated specification.
12+
This project welcomes contributions and suggestions. Most contributions require
13+
you to agree to a Contributor License Agreement (CLA) declaring that you have
14+
the right to, and actually do, grant us the rights to use your contribution. For
15+
details, visit [https://cla.microsoft.com](https://cla.microsoft.com). When you
16+
submit a pull request, a CLA-bot will automatically determine whether you need
17+
to provide a CLA and decorate the PR appropriately (e.g., label, comment).
18+
Simply follow the instructions provided by the bot. You will only need to do
19+
this once across all repositories using our CLA.
20+
21+
## Specifications subject to the Open Web Foundation Agreements
22+
23+
In addition, by making a contribution to specifications in this repository, you,
24+
on behalf of yourself, your employer, and its affiliates, are making those
25+
contributions subject to the obligations set forth in the [OWF Contributor
26+
License Agreement 1.0 - Copyright and
27+
Patent](http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owf-contributor-license-agreement-1-0---copyright-and-patent).
28+
29+
Final specifications developed in this repository will be subject to the [Open
30+
Web Foundation Final Specification Agreement (“OWFa
31+
1.0”)](http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-00).
32+
OWFa 1.0 will be applied as follows:
33+
34+
- The maintainer will notify all contributors to a designated specification in
35+
writing via provided contact information of the start of a 30 day review
36+
period, after which the specification will be subject to the OWFa 1.0.
37+
38+
- During that 30 day period, contributors may provide written notice to the
39+
maintainer that the contributor is not making the forgoing commitment under
40+
OWFa 1.0 for the designated specification (“Exclusion”).
41+
42+
- Upon the end of that 30 day notice period, those contributors who have not
43+
issued an Exclusion, on behalf of themselves, their employer, and its
44+
affiliates, will, without further action, be subject to the obligations set
45+
forth in the OWFa 1.0 for the designated specification.
2346

2447
## Project Governance
2548

2649
Project maintainership is outlined in the [GOVERNANCE](GOVERNANCE.md) file.
2750

2851
## Code of Conduct
2952

30-
This project has adopted the [Microsoft Open Source Code of conduct](https://opensource.microsoft.com/codeofconduct/).
31-
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [email protected] (mailto:[email protected]) with any additional questions or comments.
53+
This project has adopted the [Microsoft Open Source Code of
54+
conduct](https://opensource.microsoft.com/codeofconduct/). For more information
55+
see the [Code of Conduct
56+
FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact
57+
[email protected] (mailto:[email protected]) with any additional
58+
questions or comments.

GOVERNANCE.md

+20-5
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,27 @@
22

33
## Project Maintainers
44

5-
[Project maintainers](CODEOWNERS) are responsible for activities around maintaining and updating the SMI specification. Final decisions on the spec reside with the project maintainers.
5+
[Project maintainers](CODEOWNERS) are responsible for activities around
6+
maintaining and updating the SMI specification. Final decisions on the spec
7+
reside with the project maintainers.
68

7-
Maintainers MUST remain active. If they are unresponsive for >3 months, they will be automatically removed unless a [super-majority](https://en.wikipedia.org/wiki/Supermajority#Two-thirds_vote) of the other project maintainers agrees to extend the period to be greater than 3 months.
9+
Maintainers MUST remain active. If they are unresponsive for >3 months, they
10+
will be automatically removed unless a
11+
[super-majority](https://en.wikipedia.org/wiki/Supermajority#Two-thirds_vote) of
12+
the other project maintainers agrees to extend the period to be greater than 3
13+
months.
814

9-
New maintainers can be added to the project by a [super-majority](https://en.wikipedia.org/wiki/Supermajority#Two-thirds_vote) vote of the existing maintainers. A potential maintainer may be nominated by an existing maintainer. A vote is conducted in private between the current maintainers over the course of a one week voting period. At the end of the week, votes are counted and a pull request is made on the repo adding the new maintainer to the [CODEOWNERS](CODEOWNERS) file.
15+
New maintainers can be added to the project by a
16+
[super-majority](https://en.wikipedia.org/wiki/Supermajority#Two-thirds_vote)
17+
vote of the existing maintainers. A potential maintainer may be nominated by an
18+
existing maintainer. A vote is conducted in private between the current
19+
maintainers over the course of a one week voting period. At the end of the week,
20+
votes are counted and a pull request is made on the repo adding the new
21+
maintainer to the [CODEOWNERS](CODEOWNERS) file.
1022

11-
A maintainer may step down by submitting an [issue](https://github.com/deislabs/smi-spec/issues/new) stating their intent.
23+
A maintainer may step down by submitting an
24+
[issue](https://github.com/deislabs/smi-spec/issues/new) stating their intent.
1225

13-
Changes to this governance document require a pull request with approval from a [super-majority](https://en.wikipedia.org/wiki/Supermajority#Two-thirds_vote) of the current maintainers.
26+
Changes to this governance document require a pull request with approval from a
27+
[super-majority](https://en.wikipedia.org/wiki/Supermajority#Two-thirds_vote) of
28+
the current maintainers.

Makefile

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
HAS_MDLINT := $(shell command -v markdownlint;)
3+
4+
.PHONY: lint
5+
lint:
6+
@# lint the markdown
7+
ifndef HAS_MDLINT
8+
npm install -g markdownlint-cli
9+
endif
10+
markdownlint -c .markdownlint.yaml .

README.md

+12-8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<!-- markdownlint-disable MD041 -->
12
![SMI Logo](./images/smi-banner.png)
23

34
## Service Mesh Interface
@@ -61,18 +62,21 @@ from internal types to those the API expects to return.
6162
This approach to pluggable interfaces is similar to other core Kubernetes APIs
6263
like +NetworkPolicy+, +Ingress+ and +CustomMetrics+.
6364

64-
6565
## Communications
6666

6767
### Slack Channel
68-
#general Slack channel for related discussion in the
69-
[SMI Slack](http://smi-spec.slack.com).
7068

71-
If you are not yet a member of the SMI Slack you may sign up [here](https://aka.ms/smi/slack).
69+
If you are not yet a member of the SMI Slack you may sign up
70+
[here](https://aka.ms/smi/slack).
71+
72+
## Contributing
7273

73-
### Contributing
74+
Please refer to [CONTRIBUTING.md](./CONTRIBUTING.md) for more information on
75+
contributing to the specification.
7476

75-
Please refer to [CONTRIBUTING.md](./CONTRIBUTING.md) for more information on contributing to the specification.
77+
## License
7678

77-
### License
78-
The specification is licensed under [OWF Contributor License Agreement 1.0 - Copyright and Patent](http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owf-contributor-license-agreement-1-0---copyright-and-patent) in the [LICENSE](./LICENSE) file.
79+
The specification is licensed under [OWF Contributor License Agreement 1.0 -
80+
Copyright and
81+
Patent](http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owf-contributor-license-agreement-1-0---copyright-and-patent)
82+
in the [LICENSE](./LICENSE) file.

traffic-access-control.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Traffic Access Control
1+
# Traffic Access Control
22

33
This set of resources allows users to define access control policy for their
44
applications. It is the *authorization* side of the picture. Authentication

traffic-metrics.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Traffic Metrics
1+
# Traffic Metrics
22

33
This resource provides a common integration point for tools that can benefit by
44
consuming metrics related to HTTP traffic. It follows the pattern of

traffic-specs.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Traffic Spec
1+
# Traffic Spec
22

33
This set of resources allows users to specify how their traffic looks. It is
44
used in concert with [access control](traffic-access-control.md) and other

traffic-split.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Traffic Split
1+
# Traffic Split
22

33
This resource allows users to incrementally direct percentages of traffic
44
between various services. It will be used by *clients* such as ingress
@@ -324,8 +324,8 @@ Assume a `TrafficSplit` object that looks like:
324324
When a new `TrafficSplit` object is created, it instantiates the following Kubernetes
325325
objects:
326326

327-
* Service who's name is the same as `spec.service` in the TrafficSplit (`web`)
328-
* A Deployment running `nginx` which has labels that match the Service
327+
* Service who's name is the same as `spec.service` in the TrafficSplit (`web`)
328+
* A Deployment running `nginx` which has labels that match the Service
329329

330330
The nginx layer serves as an HTTP(s) layer which implements the canary. In
331331
particular the nginx config looks like:

0 commit comments

Comments
 (0)