Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
k8s-ingress
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
uplex-varnish
k8s-ingress
Commits
7312fb76
Commit
7312fb76
authored
Feb 07, 2020
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update dev docs.
parent
f3297989
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
25 deletions
+15
-25
dev.md
docs/dev.md
+15
-25
No files found.
docs/dev.md
View file @
7312fb76
...
...
@@ -6,12 +6,14 @@ Source code for the controller executable ``k8s-ingress`` is in the
targets for code generation, and for building and maintaining the
controller.
The controller is currently built with Go 1.10. Currently Kubernetes
version 1.9 is supported (it has been also tested successfully with
1.
10). This means that the code must be compatible with version 6.0.0
of k8s
[
client-go
](
https://github.com/kubernetes/client-go
)
, which in
turn means that it must be compatible with other k8s code required for
client-go 6.0.0.
The controller is currently built with Go 1.11. Currently Kubernetes
version 1.16. This means that the code must be compatible with version
0.
16 of k8s
[
client-go
](
https://github.com/kubernetes/client-go
)
.
Code dependencies are managed with
[
Go modules
](
https://github.com/golang/go/wiki/Modules
)
; hence
``go``
commands in development MUST be run with the
``GO111MODULE``
environment variable set to
``on``
.
The controller is deployed in a cluster as the image
``varnish-ingress/controller``
, built by the
...
...
@@ -25,17 +27,6 @@ minikube without rebuilding the image):
$ ./k8s-ingress -kubeconfig=$HOME/.kube/config
```
Builds are executed with the
[
``vgo``
](
https://github.com/golang/vgo
)
tool, in anticipation of the
[
modules
](
https://github.com/golang/go/wiki/Modules
)
feature for
dependency management that is experimental in Go 1.11, and expected to
be finalized in 1.12.
``vgo``
must be installed before you begin with
development:
```
$ go get -u golang.org/x/vgo
```
## Code generation
The project currently uses code generators for two purposes:
...
...
@@ -54,7 +45,7 @@ suffices:
```
$ go get -d github.com/slimhazard/gogitversion
$ cd $GOPATH/
src/github.com/slimhazard/gogitversion
$ cd $GOPATH/
pkg/mod/github.com/slimhazard/gogitversion*
$ make install
```
...
...
@@ -142,24 +133,23 @@ of concerns for the controller:
Targets in the Makefile:
*
``vgo``
: runs
``go get``
for
``vgo``
*
``install-code-gen``
: installs the k8s API code generators at the
versions needed for compatibility with Kubernetes 1.9 (client-go 6.0.0)
versions needed for compatibility with the targeted Kubernetes
version.
*
``generate``
: run the k8s API code generators. Since this is only
done occasionally, the target is
*not*
a dependency for any other
target; run only when needed, for example when types in
``types.go``
have been updated, or when a new API version is introduced.
*
``build``
: runs
``
v
go generate``
(to run
``gogitversion``
),
``
v
go fmt``
, and builds the code in
``pkg/``
and
``cmd/``
. The
*
``build``
: runs
``go generate``
(to run
``gogitversion``
),
``go fmt``
, and builds the code in
``pkg/``
and
``cmd/``
. The
executable is
*not*
built.
*
``k8s-ingress``
: runs the
``build``
target, and builds the
controller executable.
*
``check``
,
``test``
: build the
``k8s-ingress``
executable if
necessary, and run
``golint``
and
``
v
go test``
.
necessary, and run
``golint``
and
``go test``
.
*
``clean``
: run
``
v
go clean``
, and clean up other generated artifacts
*
``clean``
: run
``go clean``
, and clean up other generated artifacts
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment