1
- <!--
2
- Copyright 2019 The Kubernetes Authors.
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- -->
16
-
17
- ## Developing Gateway API
18
-
19
- You must have a working [ Go environment] and then clone the repo:
20
-
21
- ```
22
- mkdir -p $GOPATH/src/sigs.k8s.io
23
- cd $GOPATH/src/sigs.k8s.io
24
- git clone https://github.com/kubernetes-sigs/gateway-api
25
- cd gateway-api
26
- ```
27
-
28
- This project works with Go modules; you can chose to setup your environment
29
- outside $GOPATH as well.
30
-
31
- # Building, testing and deploying
32
-
33
- You will need to have Docker installed to perform the steps below.
1
+ # Dev Guide
34
2
35
3
## Project management
36
4
37
- We are using the Github issues and project dashboard to manage the list of TODOs
5
+ We are using the GitHub issues and project dashboard to manage the list of TODOs
38
6
for this project:
39
7
40
8
* [ Open issues] [ gh-issues ]
@@ -63,46 +31,58 @@ command in PR and issue comments][issue-cmds]. For example,
63
31
[ prio-labels ] :https://github.com/kubernetes-sigs/gateway-api/labels?q=priority
64
32
[ issue-cmds ] :https://prow.k8s.io/command-help?repo=kubernetes-sigs%2Fgateway-api
65
33
66
- ## Building the code
34
+ ## Prerequisites
67
35
68
- The project uses ` make ` to drive the build.
69
- ` make ` will run code generators, and run static analysis against the code and
70
- generate Kubernetes CRDs.
71
- You can kick off an overall build from the top-level makefile:
36
+ Before you start developing with Gateway API, we'd recommend having the
37
+ following prerequisites installed:
72
38
73
- ``` shell
74
- make
75
- ```
39
+ * [ Go ] ( https://golang.org/doc/install )
40
+ * [ Kubectl ] ( https://kubernetes.io/docs/tasks/tools/#kubectl )
41
+ * [ Kind ] ( https://kubernetes.io/docs/tasks/tools/#kind )
76
42
77
- ## Adding Experimental Fields
43
+ Note that Kind and many of our build tasks also have a dependency on Docker or
44
+ Podman.
78
45
79
- Starting with v0.5.0, all additions to the API must start in the experimental
80
- release channel. Experimental fields must be marked with the
81
- ` <gateway:experimental> ` annotation in Go type definitions. Gateway API CRD
82
- generation will only include these fields in the experimental set of CRDs.
46
+ ### Building, testing and deploying
83
47
84
- If experimental fields are removed or renamed, the original field name should be
85
- removed from the go struct, with a tombstone comment
86
- ([ example] ( https://github.com/kubernetes/kubernetes/blob/707b8b6efd1691b84095c9f995f2c259244e276c/staging/src/k8s.io/api/core/v1/types.go#L4444-L4445 ) )
87
- ensuring the field name will not be reused.
48
+ Clone the repo:
49
+
50
+ ```
51
+ mkdir -p $GOPATH/src/sigs.k8s.io
52
+ cd $GOPATH/src/sigs.k8s.io
53
+ git clone https://github.com/kubernetes-sigs/gateway-api
54
+ cd gateway-api
55
+ ```
56
+
57
+ This project works with Go modules; you can chose to setup your environment
58
+ outside $GOPATH as well.
88
59
89
- ## Install CRDs
60
+ ### Building the code
90
61
91
- To install gateway-api CRDs into a Kubernetes cluster:
62
+ The project uses ` make ` to drive the build. ` make ` will run code generators, and
63
+ run static analysis against the code and generate Kubernetes CRDs. You can kick
64
+ off an overall build from the top-level makefile:
92
65
93
66
``` shell
94
- make install
67
+ make generate
95
68
```
96
69
97
- To uninstall CRDs and associated resources:
70
+ ### Adding Experimental Fields
98
71
99
- ``` shell
100
- make uninstall
101
- ```
72
+ All additions to the API must start in the Experimental release channel.
73
+ Experimental fields must be marked with the ` <gateway:experimental> ` annotation
74
+ in Go type definitions. Gateway API CRD generation will only include these
75
+ fields in the experimental set of CRDs.
76
+
77
+ If experimental fields are removed or renamed, the original field name should be
78
+ removed from the go struct, with a tombstone comment
79
+ ([ example] ( https://github.com/kubernetes/kubernetes/blob/707b8b6efd1691b84095c9f995f2c259244e276c/staging/src/k8s.io/api/core/v1/types.go#L4444-L4445 ) )
80
+ ensuring the field name will not be reused.
102
81
103
- ## Submitting a Pull Request
82
+ ### Submitting a Pull Request
104
83
105
- Gateway API follows a similar pull request process as [ Kubernetes] .
84
+ Gateway API follows a similar pull request process as
85
+ [ Kubernetes] ( https://github.com/kubernetes/community/blob/master/contributors/guide/pull-requests.md ) .
106
86
Merging a pull request requires the following steps to be completed before the
107
87
pull request will be merged automatically.
108
88
@@ -123,20 +103,22 @@ make verify
123
103
124
104
[ prow-setup ] : https://github.com/kubernetes/test-infra/tree/master/config/jobs/kubernetes-sigs/gateway-api
125
105
126
- ## Documentation
106
+ ### Documentation
127
107
128
- The site documentation is written in Markdown and compiled with [ mkdocs] . Each PR
129
- will automatically include a [ Netlify] deploy preview. When new code merges, it will
130
- automatically be deployed with Netlify to [ gateway-api.sigs.k8s.io] . If you want to manually
131
- preview docs changes locally, you can install mkdocs and run:
108
+ The site documentation is written in Markdown and compiled with
109
+ [ mkdocs] ( https://www.mkdocs.org/ ) . Each PR will automatically include a
110
+ [ Netlify] ( https://netlify.com/ ) deploy preview. When new code merges, it will
111
+ automatically be deployed with Netlify to
112
+ [ gateway-api.sigs.k8s.io] ( https://gateway-api.sigs.k8s.io ) . If you want to
113
+ manually preview docs changes locally, you can install mkdocs and run:
132
114
133
115
``` shell
134
116
make docs
135
117
```
136
118
137
- To make it easier to use the right version of [ mkdocs] , there is a ` .venv `
138
- target to create a Python virtualenv that includes [ mkdocs] . To use the
139
- [ mkdocs] live preview server while you edit, you can run [ mkdocs] from
119
+ To make it easier to use the right version of mkdocs, there is a ` .venv `
120
+ target to create a Python virtualenv that includes mkdocs. To use the
121
+ mkdocs live preview server while you edit, you can run mkdocs from
140
122
the virtualenv:
141
123
142
124
``` shell
@@ -149,14 +131,10 @@ INFO - Building documentation...
149
131
...
150
132
```
151
133
152
- [ mkdocs ] : https://www.mkdocs.org/
153
- [ Netlify ] : https://netlify.com/
154
- [ gateway-api.sigs.k8s.io ] : https://gateway-api.sigs.k8s.io
155
- [ Go environment ] : https://golang.org/doc/install
156
- [ Kubernetes ] : https://github.com/kubernetes/community/blob/master/contributors/guide/pull-requests.md
134
+ For more information on how documentation should be written, refer to our
135
+ [ Documentation Style Guide] ( /contributing/style-guide ) .
157
136
158
137
## Conformance Tests
159
138
160
- To develop or run conformance tests, follow the [ Conformance Test Guide] .
161
-
162
- [ Conformance Test Guide ] : /concepts/conformance/#running-tests
139
+ To develop or run conformance tests, refer to the [ Conformance Test
140
+ Documentation] ( /concepts/conformance/#running-tests ) .
0 commit comments