Skip to content

Commit 6c3dd67

Browse files
committed
# This is a combination of 26 commits.
# This is the 1st commit message: add ingress mtls test # This is the commit message #2: add std vs # This is the commit message #3: change vs host # This is the commit message #4: Update tls secret # This is the commit message #5: update certs with host # This is the commit message #6: modify get_cert # This is the commit message #7: Addind encoded cert # This is the commit message #8: Update secrets # This is the commit message #9: Add correct cert and SNI module # This is the commit message #10: Bump styfle/cancel-workflow-action from 0.8.0 to 0.9.0 (#1527) Bumps [styfle/cancel-workflow-action](https://github.com/styfle/cancel-workflow-action) from 0.8.0 to 0.9.0. - [Release notes](https://github.com/styfle/cancel-workflow-action/releases) - [Commits](styfle/cancel-workflow-action@0.8.0...89f242e) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> # This is the commit message #11: Remove patch version from Docker image for tests (#1534) # This is the commit message #12: Add tests for Ingress TLS termination # This is the commit message #13: Improve assertion of TLS errors in tests When NGINX terminates a TLS connection for a server with a missing/invalid TLS secret, we expect NGINX to reject the connection with the error TLSV1_UNRECOGNIZED_NAME In this commit we: * ensure the specific error * rename the assertion function to be more specific # This is the commit message #14: Bump k8s.io/client-go from 0.20.5 to 0.21.0 (#1530) Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.20.5 to 0.21.0. - [Release notes](https://github.com/kubernetes/client-go/releases) - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](kubernetes/client-go@v0.20.5...v0.21.0) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> # This is the commit message #15: Improve tests Dockerfile * Reorganize layers so that changes to the tests do not cause a full image rebuilt * Use .dockerignore to ignore cache folders * Convert spaces to tabs for consistency with the other Dockerfiles # This is the commit message #16: Upgrade kubernetes-python client to 12.0.1 (#1522) * Upgrade kubernetes-python client to 12.0.1 Co-authored-by: Venktesh Patel <[email protected]> # This is the commit message #17: Bump k8s.io/code-generator from 0.20.5 to 0.21.0 (#1531) Bumps [k8s.io/code-generator](https://github.com/kubernetes/code-generator) from 0.20.5 to 0.21.0. - [Release notes](https://github.com/kubernetes/code-generator/releases) - [Commits](kubernetes/code-generator@v0.20.5...v0.21.0) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> # This is the commit message #18: Test all images (#1533) * Test on all images * Update nightly to test all images * Run all test markers on debian plus also * Update .github/workflows/nightly.yml # This is the commit message #19: Add tests for default server # This is the commit message #20: Support running tests in kind # This is the commit message #21: Update badge for Fossa (#1546) # This is the commit message #22: Fix ensuring connection in tests * Add timeout for establishing a connection to prevent potential "hangs" of the test runs. The problem was noticeable when running tests in kind. * Increase the number of tries to make sure the Ingress Controller pod has enough time to get ready. When running tests in kind locally the number of tries sometimes was not enough. # This is the commit message #23: Ensure connection in Ingress TLS tests Ensure connection to NGINX before running tests. Without ensuring, sometimes the first connection to NGINX would hang (timeout). The problem is noticable when running tests in kind. # This is the commit message #24: Revert changes in nightly for now (#1547) # This is the commit message #25: Bump actions/cache from v2.1.4 to v2.1.5 (#1541) Bumps [actions/cache](https://github.com/actions/cache) from v2.1.4 to v2.1.5. - [Release notes](https://github.com/actions/cache/releases) - [Commits](actions/cache@v2.1.4...1a9e213) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> # This is the commit message #26: Create release workflow
1 parent 47beffc commit 6c3dd67

Some content is hidden

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

46 files changed

+1789
-3526
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
docs*
22
examples*
33
grafana
4+
tests/.pytest_cache
5+
tests/__pycache__

.github/workflows/cancel.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
runs-on: ubuntu-latest
3030
timeout-minutes: 3
3131
steps:
32-
- uses: styfle/cancel-workflow-action@0.8.0
32+
- uses: styfle/cancel-workflow-action@0.9.0
3333
with:
3434
workflow_id: 2012221,5339701,7611535
3535
access_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/edge.yml

Lines changed: 77 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
env:
7272
GOFLAGS: '-gcflags=-trimpath=${{ github.workspace }} -asmflags=-trimpath=${{ github.workspace }}'
7373
- name: Store Artifacts in Cache
74-
uses: actions/[email protected].4
74+
uses: actions/[email protected].5
7575
with:
7676
path: ${{ github.workspace }}/nginx-ingress
7777
key: nginx-ingress-${{ github.run_id }}-${{ github.run_number }}
@@ -100,65 +100,76 @@ jobs:
100100
matrix:
101101
include:
102102
- os: ubuntu-20.04
103-
image: nginx-ingress
103+
image: debian
104104
tag: ${{ github.sha }}
105105
marker: 'ingresses'
106106
type: oss
107+
ic-type: nginx-ingress
107108
- os: ubuntu-20.04
108-
image: nginx-ingress
109+
image: alpine
109110
tag: ${{ github.sha }}
110111
marker: 'vsr'
111112
type: oss
113+
ic-type: nginx-ingress
112114
- os: ubuntu-20.04
113-
image: nginx-ingress
115+
image: opentracing
114116
tag: ${{ github.sha }}
115117
marker: 'vs'
116118
type: oss
119+
ic-type: nginx-ingress
117120
- os: ubuntu-20.04
118-
image: nginx-ingress
121+
image: openshift
119122
tag: ${{ github.sha }}
120123
marker: 'ts'
121124
type: oss
125+
ic-type: nginx-ingress
122126
- os: ubuntu-20.04
123-
image: nginx-ingress
127+
image: debian
124128
tag: ${{ github.sha }}
125129
marker: 'policies'
126130
type: oss
131+
ic-type: nginx-ingress
127132
- os: ubuntu-20.04
128-
image: nginx-plus-ingress
133+
image: openshift-plus
129134
tag: ${{ github.sha }}
130135
marker: 'ingresses'
131136
type: plus
137+
ic-type: nginx-plus-ingress
132138
- os: ubuntu-20.04
133-
image: nginx-plus-ingress
139+
image: debian-plus
134140
tag: ${{ github.sha }}
135141
marker: 'vsr'
136142
type: plus
143+
ic-type: nginx-plus-ingress
137144
- os: ubuntu-20.04
138-
image: nginx-plus-ingress
145+
image: debian-plus
139146
tag: ${{ github.sha }}
140147
marker: 'vs'
141148
type: plus
149+
ic-type: nginx-plus-ingress
142150
- os: ubuntu-20.04
143-
image: nginx-plus-ingress
151+
image: opentracing-plus
144152
tag: ${{ github.sha }}
145153
marker: 'ts'
146154
type: plus
155+
ic-type: nginx-plus-ingress
147156
- os: ubuntu-20.04
148-
image: nginx-plus-ingress
157+
image: debian-plus
149158
tag: ${{ github.sha }}
150159
marker: 'policies'
151160
type: plus
161+
ic-type: nginx-plus-ingress
152162
- os: ubuntu-20.04
153-
image: nginx-plus-ingress
163+
image: debian-plus-ap
154164
tag: ${{ github.sha }}-ap
155165
marker: 'appprotect'
156166
type: plus-ap
167+
ic-type: nginx-plus-ingress
157168
steps:
158169
- name: Checkout Repository
159170
uses: actions/checkout@v2
160171
- name: Fetch Cached Artifacts
161-
uses: actions/[email protected].4
172+
uses: actions/[email protected].5
162173
with:
163174
path: ${{ github.workspace }}/nginx-ingress
164175
key: nginx-ingress-${{ github.run_id }}-${{ github.run_number }}
@@ -167,7 +178,7 @@ jobs:
167178
with:
168179
driver-opts: network=host
169180
- name: Cache Docker layers
170-
uses: actions/[email protected].4
181+
uses: actions/[email protected].5
171182
with:
172183
path: /tmp/.buildx-cache
173184
key: ${{ runner.os }}-buildx-${{ github.sha }}
@@ -184,7 +195,7 @@ jobs:
184195
tags: ${{ matrix.image }}:${{ matrix.tag }}
185196
load: true
186197
build-args: |
187-
BUILD_OS=debian
198+
BUILD_OS=${{ matrix.image }}
188199
if: matrix.type == 'oss'
189200
- name: Build Plus Docker Image ${{ matrix.image }}
190201
uses: docker/build-push-action@v2
@@ -200,24 +211,23 @@ jobs:
200211
"nginx-repo.crt=${{ secrets.KIC_NGINX_CRT }}"
201212
"nginx-repo.key=${{ secrets.KIC_NGINX_KEY }}"
202213
build-args: |
203-
BUILD_OS=debian-plus
214+
BUILD_OS=${{ matrix.image }}
204215
PLUS=-plus
205216
if: matrix.type == 'plus'
206217
- name: Build AP Docker Image ${{ matrix.image }}
207218
uses: docker/build-push-action@v2
208219
with:
209220
file: build/Dockerfile
210221
context: '.'
211-
cache-from: type=local,src=/tmp/.buildx-cache
212-
cache-to: type=local,dest=/tmp/.buildx-cache
213222
target: local
214223
tags: ${{ matrix.image }}:${{ matrix.tag }}
215224
load: true
216225
secrets: |
217226
"nginx-repo.crt=${{ secrets.KIC_NGINX_AP_CRT }}"
218227
"nginx-repo.key=${{ secrets.KIC_NGINX_AP_KEY }}"
228+
"rhel_license=${{ secrets.KIC_RHEL_LICENSE }}"
219229
build-args: |
220-
BUILD_OS=debian-plus-ap
230+
BUILD_OS=${{ matrix.image }}
221231
PLUS=-plus
222232
if: matrix.type == 'plus-ap'
223233
- name: Build Test-Runner Container
@@ -244,7 +254,7 @@ jobs:
244254
kind create cluster --name ${{ github.run_id }} --image=kindest/node:v${{ env.K8S_VERSION }} --config kind-config.yaml --kubeconfig kube-${{ github.run_id }} --wait ${{ env.K8S_TIMEOUT }}
245255
kind load docker-image ${{ matrix.image }}:${{ matrix.tag }} --name ${{ github.run_id }}
246256
echo ::set-output name=cluster_ip::$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${{ github.run_id }}-control-plane)
247-
echo ::set-output name=cluster::$(echo 'nginx-${{ matrix.type }}-${{ matrix.marker }}')
257+
echo ::set-output name=cluster::$(echo 'nginx-${{ matrix.image }}-${{ matrix.marker }}')
248258
- name: Setup Kubeconfig
249259
run: |
250260
sed -i 's|server:.*|server: https://${{ steps.k8s.outputs.cluster_ip }}:6443|' kube-${{ github.run_id }}
@@ -259,7 +269,7 @@ jobs:
259269
--context=kind-${{ github.run_id }} \
260270
--image=${{ matrix.image }}:${{ matrix.tag }} \
261271
--image-pull-policy=Never \
262-
--ic-type=${{ matrix.image }} \
272+
--ic-type=${{ matrix.ic-type }} \
263273
--service=nodeport --node-ip=${{ steps.k8s.outputs.cluster_ip }} \
264274
--html=tests-${{ steps.k8s.outputs.cluster }}.html \
265275
--self-contained-html \
@@ -273,6 +283,48 @@ jobs:
273283
path: ${{ github.workspace }}/tests/tests-${{ steps.k8s.outputs.cluster }}.html
274284
if: always()
275285

286+
build:
287+
name: Build Docker Images
288+
runs-on: ubuntu-20.04
289+
needs: [binary, unit-tests]
290+
if:
291+
github.event.pull_request.head.repo.full_name == 'nginxinc/kubernetes-ingress' ||
292+
github.event_name == 'push'
293+
steps:
294+
- name: Checkout Repository
295+
uses: actions/checkout@v2
296+
- name: Fetch Cached Artifacts
297+
uses: actions/[email protected]
298+
with:
299+
path: ${{ github.workspace }}/nginx-ingress
300+
key: nginx-ingress-${{ github.run_id }}-${{ github.run_number }}
301+
- name: Docker Buildx
302+
uses: docker/setup-buildx-action@v1
303+
with:
304+
driver-opts: network=host
305+
- name: Cache Docker layers
306+
uses: actions/[email protected]
307+
with:
308+
path: /tmp/.buildx-cache
309+
key: ${{ runner.os }}-buildx-${{ github.sha }}
310+
restore-keys: |
311+
${{ runner.os }}-buildx-
312+
- name: Build AP Docker Image ${{ matrix.image }}
313+
uses: docker/build-push-action@v2
314+
with:
315+
file: build/DockerfileWithAppProtectForPlusForOpenShift
316+
context: '.'
317+
cache-from: type=local,src=/tmp/.buildx-cache
318+
cache-to: type=local,dest=/tmp/.buildx-cache
319+
target: local
320+
tags: nginx-plus-ingress-ap-openshift:${{ github.sha }}
321+
secrets: |
322+
"nginx-repo.crt=${{ secrets.KIC_NGINX_AP_CRT }}"
323+
"nginx-repo.key=${{ secrets.KIC_NGINX_AP_KEY }}"
324+
"rhel_license=${{ secrets.KIC_RHEL_LICENSE }}"
325+
build-args: |
326+
PLUS=-plus
327+
276328
helm-tests:
277329
name: Helm Tests
278330
runs-on: ${{ matrix.os }}
@@ -299,7 +351,7 @@ jobs:
299351
- name: Checkout Repository
300352
uses: actions/checkout@v2
301353
- name: Fetch Cached Artifacts
302-
uses: actions/[email protected].4
354+
uses: actions/[email protected].5
303355
with:
304356
path: ${{ github.workspace }}/nginx-ingress
305357
key: nginx-ingress-${{ github.run_id }}-${{ github.run_number }}
@@ -308,7 +360,7 @@ jobs:
308360
with:
309361
driver-opts: network=host
310362
- name: Docker build cache
311-
uses: actions/[email protected].4
363+
uses: actions/[email protected].5
312364
with:
313365
path: /tmp/.buildx-cache
314366
key: ${{ runner.os }}-buildx-${{ github.sha }}
@@ -412,7 +464,7 @@ jobs:
412464
run: |
413465
echo "::set-output name=sha::$(echo ${GITHUB_SHA} | cut -c1-7)"
414466
- name: Fetch Cached Artifacts
415-
uses: actions/[email protected].4
467+
uses: actions/[email protected].5
416468
with:
417469
path: ${{ github.workspace }}/nginx-ingress
418470
key: nginx-ingress-${{ github.run_id }}-${{ github.run_number }}
@@ -421,7 +473,7 @@ jobs:
421473
with:
422474
driver-opts: network=host
423475
- name: Cache Docker layers
424-
uses: actions/[email protected].4
476+
uses: actions/[email protected].5
425477
with:
426478
path: /tmp/.buildx-cache
427479
key: ${{ runner.os }}-buildx-${{ github.sha }}

0 commit comments

Comments
 (0)