Skip to content

Commit d7044a1

Browse files
authored
Merge branch 'main' into docs/nic-with-osm
2 parents 1c3c76a + 28eee73 commit d7044a1

File tree

375 files changed

+3839
-152340
lines changed

Some content is hidden

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

375 files changed

+3839
-152340
lines changed

.github/workflows/build-oss.yml

Lines changed: 33 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ on:
1212
tag:
1313
required: false
1414
type: string
15-
sha_long:
16-
required: false
17-
type: string
1815

1916
defaults:
2017
run:
@@ -23,12 +20,17 @@ defaults:
2320
jobs:
2421
build:
2522
runs-on: ubuntu-22.04
23+
permissions:
24+
contents: read # for docker/build-push-action to read repo content
25+
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
26+
id-token: write # for OIDC login to AWS ECR
27+
packages: write # for docker/build-push-action to push to GHCR
2628
outputs:
2729
version: ${{ steps.meta.outputs.version }}
2830
image_digest: ${{ steps.build-push.outputs.digest }}
2931
steps:
3032
- name: Checkout Repository
31-
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
33+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
3234
with:
3335
ref: ${{ inputs.tag != '' && format('refs/tags/v{0}', inputs.tag) || github.ref }}
3436
fetch-depth: 0
@@ -63,12 +65,17 @@ jobs:
6365
password: ${{ secrets.GITHUB_TOKEN }}
6466
if: github.event_name != 'pull_request'
6567

68+
- name: Configure AWS Credentials
69+
uses: aws-actions/configure-aws-credentials@e1e17a757e536f70e52b5a12b2e8d1d1c60e04ef # v2.0.0
70+
with:
71+
aws-region: us-east-1
72+
role-to-assume: ${{ secrets.AWS_ROLE_PUBLIC_ECR }}
73+
if: github.event_name != 'pull_request'
74+
6675
- name: Login to Public ECR
6776
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
6877
with:
6978
registry: public.ecr.aws
70-
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
71-
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
7279
if: github.event_name != 'pull_request'
7380

7481
- name: Login to Quay.io
@@ -89,8 +96,9 @@ jobs:
8996

9097
- name: Docker meta
9198
id: meta
92-
uses: docker/metadata-action@507c2f2dc502c992ad446e3d7a5dfbe311567a96 # v4.3.0
99+
uses: docker/metadata-action@c4ee3adeed93b1fa6a762f209fb01608c1a22f1e # v4.4.0
93100
with:
101+
context: ${{ inputs.tag != '' && 'git' || 'workflow' }}
94102
images: |
95103
name=nginx/nginx-ingress
96104
name=ghcr.io/nginxinc/kubernetes-ingress
@@ -111,7 +119,6 @@ jobs:
111119
org.opencontainers.image.description=NGINX Ingress Controller for Kubernetes
112120
org.opencontainers.image.documentation=https://docs.nginx.com/nginx-ingress-controller
113121
org.opencontainers.image.vendor=NGINX Inc <[email protected]>
114-
org.opencontainers.image.revision=${{ inputs.sha_long != '' && inputs.sha_long || github.sha }}
115122
io.artifacthub.package.readme-url=https://raw.githubusercontent.com/nginxinc/kubernetes-ingress/main/README.md
116123
io.artifacthub.package.logo-url=https://docs.nginx.com/nginx-ingress-controller/images/icons/NGINX-Ingress-Controller-product-icon.svg
117124
io.artifacthub.package.maintainers=[{"name":"NGINX Inc","email":"[email protected]"}]
@@ -123,7 +130,7 @@ jobs:
123130
id: build-push
124131
with:
125132
file: build/Dockerfile
126-
context: '.'
133+
context: "."
127134
cache-from: type=gha,scope=${{ inputs.image }}
128135
cache-to: type=gha,scope=${{ inputs.image }},mode=max
129136
target: goreleaser
@@ -141,36 +148,35 @@ jobs:
141148
IC_VERSION=${{ github.event_name == 'pull_request' && 'CI' || steps.meta.outputs.version }}
142149
143150
- name: Run Trivy vulnerability scanner
144-
uses: aquasecurity/trivy-action@1f0aa582c8c8f5f7639610d6d38baddfea4fdcee # 0.9.2
151+
uses: aquasecurity/trivy-action@e5f43133f6e8736992c9f3c1b3296e24b37e17f2 # 0.10.0
145152
continue-on-error: true
146153
with:
147154
image-ref: nginx/nginx-ingress:${{ steps.meta.outputs.version }}
148-
format: 'sarif'
149-
output: 'trivy-results-${{ inputs.image }}.sarif'
150-
ignore-unfixed: 'true'
155+
format: "sarif"
156+
output: "trivy-results-${{ inputs.image }}.sarif"
157+
ignore-unfixed: "true"
151158

152159
- name: Upload Trivy scan results to GitHub Security tab
153-
uses: github/codeql-action/upload-sarif@04df1262e6247151b5ac09cd2c303ac36ad3f62b # v2.2.9
160+
uses: github/codeql-action/upload-sarif@f3feb00acb00f31a6f60280e6ace9ca31d91c76a # v2.3.2
154161
continue-on-error: true
155162
with:
156-
sarif_file: 'trivy-results-${{ inputs.image }}.sarif'
163+
sarif_file: "trivy-results-${{ inputs.image }}.sarif"
157164

158165
- name: Upload Scan Results
159166
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
160167
continue-on-error: true
161168
with:
162-
name: 'trivy-results-${{ inputs.image }}.sarif'
163-
path: 'trivy-results-${{ inputs.image }}.sarif'
169+
name: "trivy-results-${{ inputs.image }}.sarif"
170+
path: "trivy-results-${{ inputs.image }}.sarif"
164171
if: always()
165172

166173
send-notification:
167-
name: Send Notification
168-
needs: build
169-
uses: ./.github/workflows/updates-notification.yml
170-
with:
171-
sha_long: ${{ inputs.sha_long }}
172-
tag: ${{ inputs.tag }}
173-
version: ${{ needs.build.outputs.version }}
174-
image_digest: ${{ needs.build.outputs.image_digest }}
175-
secrets: inherit
176-
if: ${{ inputs.tag != '' }}
174+
name: Send Notification
175+
needs: build
176+
uses: ./.github/workflows/updates-notification.yml
177+
with:
178+
tag: ${{ inputs.tag }}
179+
version: ${{ needs.build.outputs.version }}
180+
image_digest: ${{ needs.build.outputs.image_digest }}
181+
secrets: inherit
182+
if: ${{ inputs.tag != '' }}

.github/workflows/build-plus.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@ jobs:
2828
permissions:
2929
contents: read # for docker/build-push-action to read repo content
3030
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
31+
id-token: write # for OIDC login to AWS
3132
runs-on: ubuntu-22.04
3233
steps:
3334
- name: Checkout Repository
34-
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
35+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
3536
with:
3637
fetch-depth: 0
3738

@@ -58,17 +59,22 @@ jobs:
5859
password: ${{ secrets.GCR_JSON_KEY }}
5960
if: github.event_name != 'pull_request'
6061

62+
- name: Configure AWS Credentials
63+
uses: aws-actions/configure-aws-credentials@e1e17a757e536f70e52b5a12b2e8d1d1c60e04ef # v2.0.0
64+
with:
65+
aws-region: us-east-1
66+
role-to-assume: ${{ secrets.AWS_ROLE_MARKETPLACE }}
67+
if: startsWith(github.ref, 'refs/tags/') && contains(inputs.target, 'aws')
68+
6169
- name: Login to ECR
6270
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
6371
with:
6472
registry: 709825985650.dkr.ecr.us-east-1.amazonaws.com
65-
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
66-
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
67-
if: startsWith(github.ref, 'refs/tags/')
73+
if: startsWith(github.ref, 'refs/tags/') && contains(inputs.target, 'aws')
6874

6975
- name: Docker meta
7076
id: meta
71-
uses: docker/metadata-action@507c2f2dc502c992ad446e3d7a5dfbe311567a96 # v4.3.0
77+
uses: docker/metadata-action@c4ee3adeed93b1fa6a762f209fb01608c1a22f1e # v4.4.0
7278
with:
7379
images: |
7480
name=gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic${{ contains(inputs.nap_modules, 'dos') && '-dos' || '' }}${{ contains(inputs.nap_modules, 'waf') && '-nap' || '' }}/nginx-plus-ingress
@@ -146,7 +152,7 @@ jobs:
146152
${{ inputs.nap_modules != '' && contains(inputs.image, 'ubi') && format('"rhel_license={0}"', secrets.RHEL_LICENSE) || '' }}
147153
148154
- name: Run Trivy vulnerability scanner
149-
uses: aquasecurity/trivy-action@1f0aa582c8c8f5f7639610d6d38baddfea4fdcee # 0.9.2
155+
uses: aquasecurity/trivy-action@e5f43133f6e8736992c9f3c1b3296e24b37e17f2 # 0.10.0
150156
continue-on-error: true
151157
with:
152158
image-ref: docker.io/${{ inputs.image }}:${{ steps.meta.outputs.version }}
@@ -155,7 +161,7 @@ jobs:
155161
ignore-unfixed: 'true'
156162

157163
- name: Upload Trivy scan results to GitHub Security tab
158-
uses: github/codeql-action/upload-sarif@04df1262e6247151b5ac09cd2c303ac36ad3f62b # v2.2.9
164+
uses: github/codeql-action/upload-sarif@f3feb00acb00f31a6f60280e6ace9ca31d91c76a # v2.3.2
159165
continue-on-error: true
160166
with:
161167
sarif_file: 'trivy-results-${{ inputs.image }}.sarif'

.github/workflows/ci.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
k8s_latest: ${{ steps.vars.outputs.k8s_latest }}
3636
steps:
3737
- name: Checkout Repository
38-
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
38+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
3939
- name: Output Variables
4040
id: vars
4141
run: |
@@ -65,15 +65,15 @@ jobs:
6565
needs: checks
6666
steps:
6767
- name: Checkout Repository
68-
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
68+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
6969
- name: Setup Golang Environment
7070
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
7171
with:
7272
go-version-file: go.mod
7373
- name: Run Tests
7474
run: make cover
7575
- name: Upload coverage to Codecov
76-
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1
76+
uses: codecov/codecov-action@894ff025c7b54547a9a2a1e9f228beae737ad3c2 # v3.1.3
7777
with:
7878
files: ./coverage.txt
7979

@@ -89,7 +89,7 @@ jobs:
8989
needs: [checks, unit-tests]
9090
steps:
9191
- name: Checkout Repository
92-
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
92+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
9393
with:
9494
fetch-depth: 0
9595

@@ -142,7 +142,7 @@ jobs:
142142
type: plus
143143
steps:
144144
- name: Checkout Repository
145-
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
145+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
146146
- name: Fetch Cached Artifacts
147147
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
148148
with:
@@ -232,12 +232,12 @@ jobs:
232232
{\"image\": \"debian-plus-nap\", \"marker\": \"appprotect\"}], \
233233
\"k8s\": [\"${{ needs.checks.outputs.k8s_latest }}\"]}" >> $GITHUB_OUTPUT
234234
else
235-
echo "matrix={\"k8s\": [\"1.22.15\", \"1.23.13\", \"1.24.7\", \"1.25.3\", \"${{ needs.checks.outputs.k8s_latest }}\"], \
235+
echo "matrix={\"k8s\": [\"1.22.17\", \"1.23.17\", \"1.24.12\", \"1.25.8\", \"1.26.3\", \"${{ needs.checks.outputs.k8s_latest }}\"], \
236236
\"images\": [{\"image\": \"debian\"}, {\"image\": \"debian-plus\"}]}" >> $GITHUB_OUTPUT
237237
fi
238238
239239
- name: Checkout Repository
240-
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
240+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
241241
- name: Docker Buildx
242242
uses: docker/setup-buildx-action@4b4e9c3e2d4531116a6f8ba8e71fc6e2cb6e6c8c # v2.5.0
243243
- name: Build Test-Runner Container
@@ -260,7 +260,7 @@ jobs:
260260
matrix: ${{ fromJSON(needs.setup-matrix.outputs.matrix) }}
261261
steps:
262262
- name: Checkout Repository
263-
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
263+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
264264
- name: Run Smoke Tests
265265
id: smoke-tests
266266
uses: ./.github/actions/smoke-tests
@@ -340,7 +340,7 @@ jobs:
340340
if: ${{ github.event_name == 'push' }}
341341
steps:
342342
- name: Checkout Repository
343-
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
343+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
344344
with:
345345
path: kic
346346

@@ -369,7 +369,7 @@ jobs:
369369
helm push ${{ steps.package.outputs.path }} oci://registry-1.docker.io/nginxcharts
370370
371371
- name: Checkout Repository
372-
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
372+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
373373
with:
374374
repository: nginxinc/helm-charts
375375
fetch-depth: 1

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ jobs:
3232

3333
steps:
3434
- name: Checkout repository
35-
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
35+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
3636

3737
# Initializes the CodeQL tools for scanning.
3838
- name: Initialize CodeQL
39-
uses: github/codeql-action/init@04df1262e6247151b5ac09cd2c303ac36ad3f62b # v2.2.9
39+
uses: github/codeql-action/init@f3feb00acb00f31a6f60280e6ace9ca31d91c76a # v2.3.2
4040
with:
4141
languages: ${{ matrix.language }}
4242
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -47,7 +47,7 @@ jobs:
4747
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
4848
# If this step fails, then you should remove it and run the build manually (see below)
4949
- name: Autobuild
50-
uses: github/codeql-action/autobuild@04df1262e6247151b5ac09cd2c303ac36ad3f62b # v2.2.9
50+
uses: github/codeql-action/autobuild@f3feb00acb00f31a6f60280e6ace9ca31d91c76a # v2.3.2
5151

5252
# ℹ️ Command-line programs to run using the OS shell.
5353
# 📚 https://git.io/JvXDl
@@ -61,4 +61,4 @@ jobs:
6161
# make release
6262

6363
- name: Perform CodeQL Analysis
64-
uses: github/codeql-action/analyze@04df1262e6247151b5ac09cd2c303ac36ad3f62b # v2.2.9
64+
uses: github/codeql-action/analyze@f3feb00acb00f31a6f60280e6ace9ca31d91c76a # v2.3.2

.github/workflows/dockerhub-description.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ jobs:
1717
runs-on: ubuntu-22.04
1818
if: ${{ github.event.repository.fork == false }}
1919
steps:
20-
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
20+
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
2121

2222
- name: Modify readme for DockerHub
2323
run: |
2424
sed -i '3,4d' README.md
2525
2626
- name: Docker Hub Description
27-
uses: peter-evans/dockerhub-description@202973a37c8a723405c0c5f0a71b6d99db470dae # v3.3.0
27+
uses: peter-evans/dockerhub-description@579f64ca0abced29dbbc44ab4c6a0b9e33ab3588 # v3.4.1
2828
with:
2929
username: ${{ secrets.DOCKER_USERNAME }}
3030
password: ${{ secrets.DOCKER_PASSWORD }}

.github/workflows/draft-release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212
runs-on: ubuntu-22.04
1313
steps:
1414
- name: Checkout Repository
15-
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
15+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
1616

1717
- name: Create/Update Draft
18-
uses: lucacome/draft-release@e1aa7cbd04dbd6baa6c06add5f84e271b21e45ea # v0.1.1
18+
uses: lucacome/draft-release@b79be3ff634f771230b2b6ee9f47308c5793671a # v0.2.0
1919
with:
2020
minor-label: 'enhancement'
2121
major-label: 'change'

.github/workflows/fossa.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
if: ${{ github.event.repository.fork == false }}
2525
steps:
2626
- name: Checkout Repository
27-
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
27+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
2828
- name: Scan
2929
uses: fossas/fossa-action@f61a4c0c263690f2ddb54b9822a719c25a7b608f # v1.3.1
3030
with:

.github/workflows/issues.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
echo "text=$text" >> $GITHUB_OUTPUT
1919
- name: Check if Issue author is Org member
2020
id: membercheck
21-
uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
21+
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
2222
with:
2323
github-token: ${{ secrets.GITHUB_TOKEN }}
2424
script: |
@@ -36,7 +36,7 @@ jobs:
3636
}
3737
return member
3838
- name: Send message
39-
uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
39+
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
4040
if: steps.membercheck.outputs.result == 'false'
4141
with:
4242
github-token: ${{secrets.GITHUB_TOKEN}}

.github/workflows/lint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
runs-on: ubuntu-22.04
2929
steps:
3030
- name: Checkout Repository
31-
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
31+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
3232
- name: Setup Golang Environment
3333
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
3434
with:
@@ -43,7 +43,7 @@ jobs:
4343
runs-on: ubuntu-22.04
4444
steps:
4545
- name: Checkout Repository
46-
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
46+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
4747
- uses: reviewdog/action-actionlint@42de1e3a0f52d5f8b8390894de87bc603844e530 # v1.37.0
4848
with:
4949
actionlint_flags: -shellcheck ""
@@ -53,6 +53,6 @@ jobs:
5353
runs-on: ubuntu-22.04
5454
steps:
5555
- name: Checkout Repository
56-
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
56+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
5757
- name: Lint chart
5858
run: helm lint deployments/helm-chart

.github/workflows/notifications.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
if: ${{ github.event.workflow_run.conclusion == 'failure' && github.event.repository.fork == false }}
2222
steps:
2323
- name: Data
24-
uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
24+
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
2525
continue-on-error: true
2626
id: data
2727
with:

0 commit comments

Comments
 (0)