Skip to content

Commit 2e0bbd9

Browse files
authored
Merge pull request #179 from Kong/master
This master merge into 0.2.x is for 0.2.1 release.
2 parents de9e38c + ca2c087 commit 2e0bbd9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+3037
-6715
lines changed

.gitignore

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,36 @@
1-
# OSX
2-
._*
3-
.DS_Store
1+
# Compiled Object files, Static and Dynamic libs (Shared Objects)
2+
*.o
3+
*.a
4+
*.so
45

5-
# intellij files
6-
.idea/*
6+
# Folders
7+
_obj
8+
_test
79

8-
# Eclipse files
9-
.classpath
10-
.project
11-
.settings/**
10+
# Architecture specific extensions/prefixes
11+
*.[568vq]
12+
[568vq].out
1213

13-
# visual studio code
14-
.vscode/*
14+
*.cgo1.go
15+
*.cgo2.c
16+
_cgo_defun.c
17+
_cgo_gotypes.go
18+
_cgo_export.*
1519

16-
# Emacs save files
17-
*~
18-
\#*\#
19-
.\#*
20+
_testmain.go
2021

21-
# Vim-related files
22-
[._]*.s[a-w][a-z]
23-
[._]s[a-w][a-z]
24-
*.un~
25-
Session.vim
26-
.netrwhist
22+
*.exe
23+
*.test
24+
*.prof
2725

2826
# coverage artifacts
2927
.coverprofile
3028
/gover.coverprofile
31-
3229
e2e-tests
3330

3431
coverage.txt
32+
# for this repo only
33+
ingress-controller
3534

3635
# ignore vendor tree
37-
vendor/
36+
vendor

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ jobs:
5151
# - test/e2e/wait-for-kong.sh
5252
# script:
5353
# - make e2e-test
54+
- stage: Unit Test
55+
before_script:
56+
- make deps
57+
script:
58+
- make test
5459
# split builds to avoid job timeouts
5560
- stage: publish amd64
5661
if: type = api AND branch = master AND repo = kong/ingress-controller

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
# Table of Contents
22

3+
- [0.1.1](#011-20180926)
34
- [0.2.0](#020-20180921)
45
- [0.1.0](#010-20180817)
56
- [0.0.5](#005---20180602)
67
- [0.0.4 and prior](#004-and-prior)
78

9+
## [0.1.1] - 2018/09/26
10+
11+
#### Fixed
12+
13+
- Fix version parsing for minor releases of Kong Enterprise (like 0.33-1).
14+
The dash(`-`) didn't go well with the semver parsing
15+
[#141](https://github.com/Kong/kubernetes-ingress-controller/pull/141)
816

917
## [0.2.0] - 2018/09/21
1018

@@ -94,6 +102,7 @@
94102
- The initial versions rapidly were iterated delivering
95103
a working ingress controller.
96104

105+
[0.1.1]: https://github.com/kong/kubernetes-ingress-controller/compare/0.1.0...0.1.1
97106
[0.2.0]: https://github.com/kong/kubernetes-ingress-controller/compare/0.1.0...0.2.0
98107
[0.1.0]: https://github.com/kong/kubernetes-ingress-controller/compare/v0.0.5...0.1.0
99108
[v0.0.5]: https://github.com/kong/kubernetes-ingress-controller/compare/v0.0.4...v0.0.5

CODE_OF_CONDUCT.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at support@mashape.com. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at [http://contributor-covenant.org/version/1/4][version]
72+
73+
[homepage]: http://contributor-covenant.org
74+
[version]: http://contributor-covenant.org/version/1/4/

CONTRIBUTING.md

Lines changed: 148 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,167 @@
11
# Contributing Guidelines
22

3-
Read the following guide if you're interested in contributing to Ingress.
3+
Thank you for showing interest in contributing to
4+
Kong Ingress Controller.
45

5-
## Contributor License Agreements
6+
Following guide will help you navigate
7+
the repository and get your PRs
8+
merged in faster.
69

7-
We'd love to accept your patches! Before we can take them, we have to jump a couple of legal hurdles.
10+
## Finding work
811

9-
Please fill out either the individual or corporate Contributor License Agreement (CLA).
12+
If you're new to the project and want to help, but don't know where to start,
13+
look for "Help wanted" or "Good first issue" labels in our
14+
[issue tracker](https://github.com/Kong/kubernetes-ingress-controller/issues).
15+
Alternatively, read our documentation and fix or
16+
improve any issues that you see. We really value documentation contributions
17+
since that makes life easier for a lot of people.
1018

11-
* If you are an individual writing original source code and you're sure you own the intellectual property, then you'll need to sign an [individual CLA](http://code.google.com/legal/individual-cla-v1.0.html).
12-
* If you work for a company that wants to allow you to contribute your work, then you'll need to sign a [corporate CLA](http://code.google.com/legal/corporate-cla-v1.0.html).
19+
All of the following tasks are noble and worthy contributions that you can
20+
make without coding:
1321

14-
Follow either of the two links above to access the appropriate CLA and instructions for how to sign and return it. Once we receive it, we'll be able to accept your pull requests.
22+
- Reporting a bug
23+
- Helping other members of the community on the
24+
[support channels](https://github.com/Kong/kubernetes-ingress-controller#seeking-help)
25+
- Fixing a typo in the code
26+
- Fixing a typo in the documentation
27+
- Providing your feedback on the proposed features and designs
28+
- Reviewing Pull Requests
1529

16-
***NOTE***: Only original source code from you and other people that have signed the CLA can be accepted into the main repository.
30+
If you wish to contribute code (features or bug fixes), see the [Submitting a
31+
patch](#submitting-a-patch) section.
1732

18-
## Finding Things That Need Help
33+
## Development environement
1934

20-
If you're new to the project and want to help, but don't know where to start, we have a semi-curated list of issues that should not need deep knowledge of the system. [Have a look and see if anything sounds interesting](https://github.com/kubernetes/ingress-nginx/issues?utf8=%E2%9C%93&q=is%3Aopen%20is%3Aissue%20label%3A%22help+wanted%22). Alternatively, read some of the docs on other controllers and try to write your own, file and fix any/all issues that come up, including gaps in documentation!
35+
## Environment
2136

22-
## Contributing a Patch
37+
- Golang version >= 1.10 installed
38+
- Access to a k8s cluster, you can use Minikube or GKE
39+
- Install dep for dependency management
40+
- make
41+
- Docker (for building)
2342

24-
1. If you haven't already done so, sign a Contributor License Agreement (see details above).
25-
1. Read the [Ingress development guide](docs/development.md).
26-
1. Fork the desired repo, develop and test your code changes.
27-
1. Submit a pull request.
43+
## Dependencies
2844

29-
All changes must be code reviewed. Coding conventions and standards are explained in the official [developer docs](https://github.com/kubernetes/community/tree/master/contributors/devel). Expect reviewers to request that you avoid common [go style mistakes](https://github.com/golang/go/wiki/CodeReviewComments) in your PRs.
45+
The build uses dependencies in the `vendor` directory, which
46+
must be installed before building a binary/image. Occasionally, you
47+
might need to update the dependencies.
3048

31-
### Merge Approval
49+
Check the version of `dep` you are using and make sure it is up to date.
50+
If you have an older version of `dep`, you can update it as follows:
3251

33-
Ingress collaborators may add "LGTM" (Looks Good To Me) or an equivalent comment to indicate that a PR is acceptable. Any change requires at least one LGTM. No pull requests can be merged until at least one Ingress collaborator signs off with an LGTM.
52+
```console
53+
$ go get -u github.com/golang/dep
54+
```
3455

35-
## Support Channels
56+
This will automatically save the dependencies to the `vendor/` directory.
3657

37-
Whether you are a user or contributor, official support channels include:
58+
```console
59+
$ cd $GOPATH/src/github.com/kong/ingress-controller
60+
$ dep ensure -v -vendor-only
61+
```
3862

39-
- GitHub issues: https://github.com/kubernetes/ingress-nginx/issues/new
40-
- Slack: kubernetes-users room in the [Kubernetes Slack](http://slack.kubernetes.io/)
41-
- Email: [kubernetes-users](https://groups.google.com/forum/#!forum/kubernetes-users) mailing list
63+
## Running in dev mode
4264

43-
Before opening a new issue or submitting a new pull request, it's helpful to search the project - it's likely that another user has already reported the issue you're facing, or it's a known issue that we're already aware of.
65+
You can run the ingress controller without building a Docker
66+
Image and installing it onto your docker container.
67+
68+
Following is a helpful shell script that you could
69+
use to run the Ingress Controller without building
70+
the Ingress Controller:
71+
72+
```shell
73+
#!/bin/bash
74+
pkill -f kubectl
75+
# setup proxies
76+
kubectl port-forward svc/kong-proxy -n kong 8443:443 2>&1 > /dev/null &
77+
kubectl port-forward svc/kong-proxy -n kong 8000:80 2>&1 > /dev/null &
78+
kubectl port-forward svc/kong-ingress-controller -n kong 8001:8001 2>&1 > /dev/null &
79+
kubectl proxy --port=8002 2>&1 > /dev/null &
80+
81+
export POD_NAME=`kubectl get po -n kong -o json | jq ".items[] | .metadata.name" -r | grep ingress`
82+
export POD_NAMESPACE=kong
83+
84+
go run -tags gcp ./cli/ingress-controller/ \
85+
--default-backend-service kong/kong-proxy \
86+
--kubeconfig ~/.kube/config \
87+
--publish-service=kong/kong-proxy \
88+
--apiserver-host=http://localhost:8002 \
89+
--kong-url http://localhost:8001
90+
```
91+
92+
## Building
93+
94+
Build is performed via Makefile. Depending on your
95+
requirements you can build a raw server binary, a local container image,
96+
or push an image to a remote repository.
97+
98+
### Build a raw server binary
99+
100+
```console
101+
$ make build
102+
```
103+
104+
### Build a local container image
105+
106+
```console
107+
$ TAG=DEV make docker-build
108+
```
109+
110+
Note: this will use the Docker daemon
111+
running on your system.
112+
If you're developing using minikube, you
113+
should exectue the following to use the
114+
Docker daemon running inside the Minikube VM:
115+
116+
```console
117+
eval $(minikube docker-env)
118+
```
119+
120+
This will allow you to publish images to
121+
Minikube VM, allowing you to reference them
122+
in your Deployment specs.
123+
124+
### Push the container image to a remote repository
125+
126+
```console
127+
$ TAG=DEV REGISTRY=$USER/kong-ingress-controller make docker-push
128+
```
129+
130+
## Deploying
131+
132+
There are several ways to deploy Kong Ingress Controller onto a cluster.
133+
Please check the [deployment guide](/deploy/README.md)
134+
135+
## Testing
136+
137+
To run unit-tests, just run
138+
139+
```console
140+
$ cd $GOPATH/src/github.com/kong/kubernetes-ingress-controller
141+
$ make test
142+
```
143+
144+
## Releasing
145+
146+
Makefile will produce a release binary, as shown above. To publish this
147+
to a wider Kubernetes user base, push the image to a container registry.
148+
Our images are hosted on
149+
[Bintray](https://bintray.com/kong/kubernetes-ingress-controller).
150+
151+
An example release might look like:
152+
153+
```shell
154+
$ export TAG=42
155+
$ make release
156+
```
157+
158+
Please follow these guidelines to cut a release:
159+
160+
- Update the [release](https://help.github.com/articles/creating-releases/)
161+
page with a link to changelog.
162+
- Cut a release branch, if appropriate.
163+
All major feature work is done in HEAD. Specific bug fixes are
164+
cherry-picked into a release branch.
165+
- If you're not confident about the stability of the code,
166+
[tag](https://help.github.com/articles/working-with-tags/) it as alpha or beta.
167+
Typically, a release branch should have stable code.

0 commit comments

Comments
 (0)