Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge main into next #971

Merged
merged 23 commits into from
Dec 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
b588aee
Merge pull request #892 from Kong/next
Oct 5, 2020
f61010e
docs: add compatibility for controller 1.0
hbagdi Oct 5, 2020
ed88ebe
docs: fix link to rbac.yaml
Oct 6, 2020
d29d864
fix links to bintray builds
Oct 8, 2020
691a062
doc: fix links to bintray builds (#900)
Oct 8, 2020
dfa37c0
Log print memory address instead service.Name (#915)
artemsre Oct 20, 2020
da53cb4
docs(mtls) use number for verify depth (#913)
Oct 22, 2020
8c94846
doc(deploy) update Enterprise manifest examples and docs (#909)
Oct 23, 2020
b56f43d
doc(deploy) update bitly link
Oct 26, 2020
90135d2
chore(ci) bump kustomize version
Oct 22, 2020
ccba4ce
doc(deploy) update pull secret name
Oct 26, 2020
680027e
docs(*) use modern plugins annotation (#927)
Oct 30, 2020
702832e
Udate CONTRIBUTING Golang version (#928)
Nov 2, 2020
86bba5b
E2E testing a KIC built from HEAD by CI. (#869)
mflendrich Nov 2, 2020
58aefba
chore(ci): obtain ref without git cloning (#942)
mflendrich Nov 2, 2020
99486c7
fix(doc) correct inaccurate header (#946)
Aboisier Nov 4, 2020
20cc212
chore(docs) update cert-manager guide (#952)
mkahlberg Nov 11, 2020
1c02cc4
Add CI check for untidy go modules (#949)
Nov 12, 2020
8f101b9
chore(manifests): bump kong to 2.2 (#932)
mflendrich Nov 12, 2020
39cae2a
chore(deploy) update default worker count to 2 (#957)
Nov 16, 2020
62f024e
ci(*) use sed to isolate branch/tag (#964)
Nov 30, 2020
812fd69
Updates custom plugin documentation for clarity (#963)
anjiemerchant Nov 30, 2020
a66dd8c
feat(consumer) validate credential secret fields (#944)
Nov 30, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Test

on: [push]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup go
uses: actions/setup-go@v2
with:
go-version: '^1.15'

- name: Cache Go modules
uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-build-codegen-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go

- name: 'Check out the repo'
uses: actions/checkout@v2

- name: 'make container'
run: |
make REGISTRY=local IMGNAME=kong-ingress-controller TAG=ci container

- run: docker save local/kong-ingress-controller:ci > image.tar

- uses: actions/upload-artifact@v2
with:
name: image
path: image.tar

push-public:
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/next'

steps:
- uses: actions/download-artifact@v2
with:
name: image

- name: 'Arrange: Push the Kong Operator image to the public registry'
env:
BINTRAY_KEY: ${{ secrets.BINTRAY_KEY }}
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
run: |
set -e

REPO="kong-docker-kubernetes-ingress-controller.bintray.io"
REF=`sed -re "s/^refs\/[a-z]+\///" <<< $GITHUB_REF` # remove "^refs/(heads|tags|remotes)"

DOCKER_TAG="$REPO/master:$REF"
docker load < image.tar
docker tag local/kong-ingress-controller:ci "$DOCKER_TAG"
echo "${BINTRAY_KEY}" | docker login -u "${BINTRAY_USER}" ${REPO} --password-stdin
docker push "$DOCKER_TAG"

test-k8s:
needs: build
runs-on: ubuntu-latest
steps:
- name: 'Arrange: Check out the repo'
uses: actions/checkout@v2

- uses: actions/download-artifact@v2
with:
name: image

- name: 'Arrange: Push the image to the local registry'
run: |
docker load < image.tar
docker tag local/kong-ingress-controller:ci localhost:32000/kong-ingress-controller:ci

- name: 'Test: Run integration tests'
run: |
env KIC_IMAGE=local/kong-ingress-controller:ci ./test/integration/test.sh
30 changes: 0 additions & 30 deletions .github/workflows/build.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Setup kustomize
uses: imranismail/setup-kustomize@v1
with:
kustomize-version: "3.8.1"
kustomize-version: "3.8.5"
- name: Verify manifest consistency
run: |
make verify-manifests
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,7 @@ kong-ingress-controller

# ignore vendor tree
vendor

# integration test residuals
kind
kubeconfig-test-cluster
6 changes: 4 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ patch](#submitting-a-patch) section.

## Environment

- Golang version >= 1.12 installed
- Golang version matching our [`Dockerfile`](./Dockerfile) installed
- Access to a k8s cluster, you can use Minikube or GKE
- make
- Docker (for building)

## Dependencies

The build uses dependencies are managed by [go modules](https://blog.golang.org/using-go-modules)
The build uses dependencies are managed by [go modules](https://blog.golang.org/using-go-modules)

## Running in dev mode

Expand Down Expand Up @@ -126,6 +126,8 @@ $ cd $GOPATH/src/github.com/kong/kubernetes-ingress-controller
$ make test
```

To run integration tests, see the [integration test readme](test/integration/README.md).

## Releasing

Makefile will produce a release binary, as shown above. To publish this
Expand Down
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ test:
go test -race ./...

.PHONY: lint
lint:
lint: verify-tidy
golangci-lint run ./...

.PHONY: build
Expand All @@ -40,6 +40,10 @@ verify-codegen:
update-codegen:
./hack/update-codegen.sh

.PHONY: verify-tidy
verify-tidy:
./hack/verify-tidy.sh

.PHONY: container
container:
docker build \
Expand All @@ -50,3 +54,7 @@ container:
.PHONY: run
run:
./hack/dev/start.sh ${DB} ${RUN_VERSION}

.PHONY: integration-test
integration-test: container
KIC_IMAGE="${IMAGE}:${TAG}" ./test/integration/test.sh
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ a specific setting with Kong Ingress Controller.
## Master branch builds

If you would like to use the latest and the greatest version of the controller,
you can use `latest` tag from the [master repository][bintray-master-builds]
you can use `latest` tag from the [kong-ingress-controller repository][bintray-builds]
hosted on Bintray:

```
docker pull kong-docker-kubernetes-ingress-controller.bintray.io/master:latest
docker pull kong-docker-kubernetes-ingress-controller.bintray.io/kong-ingress-controller:latest
```

## Seeking help
Expand Down Expand Up @@ -124,7 +124,7 @@ meeting invite and Zoom links to join the meeting.
[getting-started-guide]: docs/guides/getting-started.md
[badge-travis-image]: https://travis-ci.org/Kong/kubernetes-ingress-controller.svg?branch=master
[badge-travis-url]: https://travis-ci.org/Kong/kubernetes-ingress-controller
[bintray-master-builds]: https://bintray.com/kong/kubernetes-ingress-controller/master
[bintray-builds]: https://bintray.com/kong/kubernetes-ingress-controller/kong-ingress-controller
[kong-url]: https://konghq.com/
[kong-logo]: https://konghq.com/wp-content/uploads/2018/05/kong-logo-github-readme.png
[k4k8s-enterprise-setup]: https://github.com/Kong/kubernetes-ingress-controller/blob/master/docs/deployment/k4k8s-enterprise.md
Expand Down
4 changes: 2 additions & 2 deletions deploy/manifests/base/kong-ingress-dbless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
serviceAccountName: kong-serviceaccount
containers:
- name: proxy
image: kong:2.1
image: kong:2.2
env:
# servers
- name: KONG_PROXY_LISTEN
Expand All @@ -40,7 +40,7 @@ spec:
value: "off"
# runtime tweaks
- name: KONG_NGINX_WORKER_PROCESSES
value: "1"
value: "2"
# logging
- name: KONG_ADMIN_ACCESS_LOG
value: /dev/stdout
Expand Down
2 changes: 1 addition & 1 deletion deploy/manifests/enterprise-k8s/kong-enterprise-k8s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ spec:
template:
spec:
imagePullSecrets:
- name: kong-enterprise-k8s-docker
- name: kong-enterprise-edition-docker
containers:
- name: proxy
env:
Expand Down
4 changes: 2 additions & 2 deletions deploy/manifests/enterprise-k8s/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ patchesStrategicMerge:
- kong-enterprise-k8s.yaml
images:
- name: kong
newName: kong-docker-kong-enterprise-k8s.bintray.io/kong-enterprise-k8s
newTag: 2.0.4.1-alpine
newName: kong-docker-kong-enterprise-edition-docker.bintray.io/kong-enterprise-edition
newTag: 2.1.4.0-alpine
2 changes: 1 addition & 1 deletion deploy/manifests/postgres/kong-ingress-postgres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
spec:
initContainers:
- name: wait-for-migrations
image: kong:2.1
image: kong:2.2
command:
- "/bin/sh"
- "-c"
Expand Down
2 changes: 1 addition & 1 deletion deploy/manifests/postgres/migration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
command: [ "/bin/sh", "-c", "until nc -zv $KONG_PG_HOST $KONG_PG_PORT -w1; do echo 'waiting for db'; sleep 1; done" ]
containers:
- name: kong-migrations
image: kong:2.1
image: kong:2.2
env:
- name: KONG_PG_PASSWORD
value: kong
Expand Down
16 changes: 8 additions & 8 deletions deploy/single/all-in-one-dbless-k4k8s-enterprise.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,11 @@ spec:
spec:
containers:
- env:
- name: KONG_LICENSE_DATA
valueFrom:
secretKeyRef:
key: license
name: kong-enterprise-license
- name: KONG_PROXY_LISTEN
value: 0.0.0.0:8000, 0.0.0.0:8443 ssl http2
- name: KONG_PORT_MAPS
Expand All @@ -630,19 +635,14 @@ spec:
- name: KONG_DATABASE
value: "off"
- name: KONG_NGINX_WORKER_PROCESSES
value: "1"
value: "2"
- name: KONG_ADMIN_ACCESS_LOG
value: /dev/stdout
- name: KONG_ADMIN_ERROR_LOG
value: /dev/stderr
- name: KONG_PROXY_ERROR_LOG
value: /dev/stderr
- name: KONG_LICENSE_DATA
valueFrom:
secretKeyRef:
key: license
name: kong-enterprise-license
image: kong-docker-kong-enterprise-k8s.bintray.io/kong-enterprise-k8s:2.0.4.1-alpine
image: kong-docker-kong-enterprise-edition-docker.bintray.io/kong-enterprise-edition:2.1.4.0-alpine
lifecycle:
preStop:
exec:
Expand Down Expand Up @@ -726,5 +726,5 @@ spec:
successThreshold: 1
timeoutSeconds: 1
imagePullSecrets:
- name: kong-enterprise-k8s-docker
- name: kong-enterprise-edition-docker
serviceAccountName: kong-serviceaccount
4 changes: 2 additions & 2 deletions deploy/single/all-in-one-dbless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -630,14 +630,14 @@ spec:
- name: KONG_DATABASE
value: "off"
- name: KONG_NGINX_WORKER_PROCESSES
value: "1"
value: "2"
- name: KONG_ADMIN_ACCESS_LOG
value: /dev/stdout
- name: KONG_ADMIN_ERROR_LOG
value: /dev/stderr
- name: KONG_PROXY_ERROR_LOG
value: /dev/stderr
image: kong:2.1
image: kong:2.2
lifecycle:
preStop:
exec:
Expand Down
Loading