Skip to content

Commit da9e2d5

Browse files
authored
Merge branch 'main' into 2158-private-images-without-global-access
2 parents 46ef0f6 + d4e7d3c commit da9e2d5

File tree

203 files changed

+9085
-7135
lines changed

Some content is hidden

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

203 files changed

+9085
-7135
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Global
22

3-
* @chen-keinan
3+
* @simar7

.github/dependabot.yml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,31 @@
1-
# To get started with Dependabot version updates, you'll need to specify which
2-
# package ecosystems to update and where the package manifests are located.
3-
# Please see the documentation for all configuration options:
4-
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5-
1+
---
62
version: 2
73
updates:
8-
- package-ecosystem: github-actions
4+
- package-ecosystem: gomod
95
directory: /
106
schedule:
117
interval: weekly
12-
- package-ecosystem: gomod
8+
groups:
9+
k8s:
10+
patterns:
11+
- "*k8s*"
12+
testcontainers:
13+
patterns:
14+
- github.com/testcontainers/*
15+
common:
16+
patterns:
17+
- "*"
18+
golang:
19+
patterns:
20+
- go*
21+
aqua:
22+
patterns:
23+
- "*aquasecurity*"
24+
- package-ecosystem: github-actions
1325
directory: /
1426
schedule:
15-
interval: weekly
27+
interval: monthly
28+
groups:
29+
github-actions:
30+
patterns:
31+
- "*"

.github/workflows/build.yaml

Lines changed: 46 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@ on:
2222
- LICENSE
2323
- NOTICE
2424
env:
25-
KIND_VERSION: v0.17.0
26-
KIND_IMAGE: kindest/node:v1.21.1@sha256:69860bda5563ac81e3c0057d654b5253219618a22ec3a346306239bba8cfa1a6
27-
GO_VERSION: '1.22'
25+
KIND_VERSION: v0.24.0
26+
KIND_IMAGE: kindest/node:v1.31.2
2827
permissions: {}
2928
concurrency:
3029
group: ${{ github.workflow }}-${{ github.ref }}
@@ -39,18 +38,16 @@ jobs:
3938
- name: Setup Go
4039
uses: actions/setup-go@v5
4140
with:
42-
go-version: ${{ env.GO_VERSION }}
41+
go-version-file: go.mod
4342
- name: Install tools
44-
uses: aquaproj/aqua-installer@v3.0.1
43+
uses: aquaproj/aqua-installer@v4.0.0
4544
with:
4645
aqua_version: v1.25.0
4746
- name: Verify Go code
48-
uses: golangci/golangci-lint-action@v6.0.1
47+
uses: golangci/golangci-lint-action@v8.0.0
4948
with:
5049
args: --verbose
51-
version: v1.57.2
52-
skip-pkg-cache: true
53-
skip-build-cache: true
50+
version: v2.1
5451
- name: Verify YAML code
5552
uses: ibiqlik/action-yamllint@v3
5653
- name: Vendor Go modules
@@ -63,20 +60,31 @@ jobs:
6360
name: Run tests
6461
runs-on: ubuntu-latest
6562
steps:
63+
- name: Maximize build space
64+
uses: AdityaGarg8/remove-unwanted-software@v5
65+
with:
66+
remove-android: 'true'
67+
remove-dotnet: 'true'
68+
remove-haskell: 'true'
69+
remove-codeql: 'true'
70+
remove-docker-images: 'true'
71+
remove-large-packages: 'true'
72+
remove-cached-tools: 'true'
73+
remove-swapfile: 'true'
6674
- name: Checkout code
6775
uses: actions/checkout@v4
6876
- name: Setup Go
6977
uses: actions/setup-go@v5
7078
with:
71-
go-version: ${{ env.GO_VERSION }}
79+
go-version-file: go.mod
7280
- name: Install tools
73-
uses: aquaproj/aqua-installer@v3.0.1
81+
uses: aquaproj/aqua-installer@v4.0.0
7482
with:
7583
aqua_version: v1.25.0
7684
- name: Run unit tests
7785
run: mage test:unit
7886
- name: Upload code coverage
79-
uses: codecov/codecov-action@v4
87+
uses: codecov/codecov-action@v5
8088
with:
8189
files: ./coverage.txt
8290
operator-envtest:
@@ -91,44 +99,49 @@ jobs:
9199
- name: Setup Go
92100
uses: actions/setup-go@v5
93101
with:
94-
go-version: ${{ env.GO_VERSION }}
102+
go-version-file: go.mod
95103
- name: Install tools
96-
uses: aquaproj/aqua-installer@v3.0.1
104+
uses: aquaproj/aqua-installer@v4.0.0
97105
with:
98106
aqua_version: v1.25.0
99107
- name: Run envtest
100108
run: mage test:envtest
101109
- name: Upload code coverage
102-
uses: codecov/codecov-action@v4
110+
uses: codecov/codecov-action@v5
103111
with:
104112
files: ./coverage.txt
105113
itest-trivy-operator:
106114
name: Run integration tests
107115
needs:
108116
- operator-envtest
109117
runs-on: ubuntu-latest
110-
timeout-minutes: 15
118+
timeout-minutes: 30
111119
steps:
112120
- name: Checkout code
113121
uses: actions/checkout@v4
122+
114123
- name: Setup Go
115124
uses: actions/setup-go@v5
116125
with:
117-
go-version: ${{ env.GO_VERSION }}
126+
go-version-file: go.mod
127+
118128
- name: Install tools
119-
uses: aquaproj/aqua-installer@v3.0.1
129+
uses: aquaproj/aqua-installer@v4.0.0
120130
with:
121131
aqua_version: v1.25.0
132+
122133
- name: Setup Kubernetes cluster (KIND)
123-
uses: engineerd/setup-kind@v0.5.0
134+
uses: engineerd/setup-kind@v0.6.2
124135
with:
125136
version: ${{ env.KIND_VERSION }}
126137
image: ${{ env.KIND_IMAGE }}
138+
127139
- name: Test connection to Kubernetes cluster
128140
run: |
129141
kubectl cluster-info
130142
kubectl wait --for=condition=Ready nodes --all --timeout=300s
131143
kubectl describe node
144+
132145
- name: Run integration tests
133146
run: |
134147
kubectl create -k deploy/static
@@ -137,10 +150,12 @@ jobs:
137150
KUBECONFIG: /home/runner/.kube/config
138151
OPERATOR_NAMESPACE: trivy-system
139152
OPERATOR_TARGET_NAMESPACES: default
153+
140154
- name: Upload code coverage
141-
uses: codecov/codecov-action@v4
155+
uses: codecov/codecov-action@v5
142156
with:
143157
files: ./itest/trivy-operator/coverage.txt
158+
144159
e2e-testing:
145160
name: Run end to end testing
146161
needs:
@@ -161,12 +176,12 @@ jobs:
161176
- name: Setup Go
162177
uses: actions/setup-go@v5
163178
with:
164-
go-version: ${{ env.GO_VERSION }}
179+
go-version-file: go.mod
165180
- name: Release snapshot
166181
uses: goreleaser/goreleaser-action@v6
167182
with:
168-
version: v1.7.0
169-
args: release -f=goreleaser-e2e.yaml --snapshot --skip-publish --rm-dist
183+
version: v2.4.8
184+
args: release -f=goreleaser-e2e.yaml --snapshot --skip=publish --clean
170185
- name: Install kind and create cluster
171186
run: >
172187
curl -Lo ./kind https://kind.sigs.k8s.io/dl/${{ env.KIND_VERSION
@@ -188,10 +203,10 @@ jobs:
188203
kubectl describe node
189204
- name: Load operator image to cluster
190205
run: >
191-
docker tag ghcr.io/aquasecurity/trivy-operator:${{ github.sha }}-amd64
192-
ghcr.io/aquasecurity/trivy-operator:e2e
206+
docker tag mirror.gcr.io/aquasec/trivy-operator:${{ github.sha }}-amd64
207+
mirror.gcr.io/aquasec/trivy-operator:e2e
193208
194-
docker save -o trivy-operator.tar ghcr.io/aquasecurity/trivy-operator:e2e
209+
docker save -o trivy-operator.tar mirror.gcr.io/aquasec/trivy-operator:e2e
195210
196211
kind load image-archive trivy-operator.tar
197212
- name: Init E2E tests (Install kuttl & helm)
@@ -265,6 +280,11 @@ jobs:
265280
run: >
266281
./bin/kuttl test --start-kind=false --config tests/e2e/config/cluster-scan.yaml
267282
283+
- name: The job has failed - print the logs
284+
if: ${{ failure() }}
285+
run: >
286+
kubectl logs -n trivy-system deployment/trivy-operator
287+
268288
- name: Delete kind cluster
269289
run: |
270290
kind delete cluster

.github/workflows/chart-testing.yaml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,14 @@ on:
1414
env:
1515
KIND_VERSION: v0.17.0
1616
KIND_IMAGE: kindest/node:v1.21.1@sha256:69860bda5563ac81e3c0057d654b5253219618a22ec3a346306239bba8cfa1a6
17-
GO_VERSION: '1.22'
1817
permissions: {}
1918
concurrency:
2019
group: ${{ github.workflow }}-${{ github.ref }}
2120
cancel-in-progress: true
2221
jobs:
2322
chart-testing:
2423
name: Run chart testing
25-
runs-on: ubuntu-latest
24+
runs-on: ubuntu-22.04
2625
env:
2726
DOCKER_CLI_EXPERIMENTAL: enabled
2827
steps:
@@ -38,12 +37,13 @@ jobs:
3837
- name: Setup Go
3938
uses: actions/setup-go@v5
4039
with:
41-
go-version: ${{ env.GO_VERSION }}
40+
go-version-file: go.mod
4241
- name: Release snapshot
4342
uses: goreleaser/goreleaser-action@v6
4443
with:
45-
version: v1.7.0
46-
args: release -f=goreleaser-e2e.yaml --snapshot --skip-publish --rm-dist
44+
version: v2.4.8
45+
args: release -f=goreleaser-e2e.yaml --snapshot --skip=publish --clean
46+
4747
- name: Install kind and create cluster
4848
run: |
4949
curl -Lo ./kind https://kind.sigs.k8s.io/dl/${{ env.KIND_VERSION }}/kind-linux-amd64
@@ -69,19 +69,23 @@ jobs:
6969
cmd: yq -i '.appVersion = "ct"' ./deploy/helm/Chart.yaml
7070
- name: Load operator image to cluster
7171
run: >
72-
docker tag ghcr.io/aquasecurity/trivy-operator:${{ github.sha }}-amd64
73-
ghcr.io/aquasecurity/trivy-operator:ct
72+
docker tag mirror.gcr.io/aquasec/trivy-operator:${{ github.sha }}-amd64
73+
mirror.gcr.io/aquasec/trivy-operator:ct
7474
75-
docker save -o trivy-operator.tar ghcr.io/aquasecurity/trivy-operator:ct
75+
docker save -o trivy-operator.tar mirror.gcr.io/aquasec/trivy-operator:ct
7676
7777
kind load image-archive trivy-operator.tar
78+
7879
- name: Set up python
79-
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
80+
uses: actions/setup-python@v5.6.0
8081
with:
81-
python-version: 3.7
82+
python-version: '3.x'
83+
check-latest: true
84+
8285
- name: Setup chart-testing
8386
id: lint
84-
uses: helm/chart-testing-action@v2.6.1
87+
uses: helm/chart-testing-action@v2.7.0
88+
8589
- name: Run chart-testing
8690
run: ct lint-and-install --validate-maintainers=false --charts deploy/helm
8791
- name: Delete kind cluster

.github/workflows/private-registries.yaml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,14 @@ on:
2424
env:
2525
KIND_VERSION: v0.17.0
2626
KIND_IMAGE: kindest/node:v1.21.1@sha256:69860bda5563ac81e3c0057d654b5253219618a22ec3a346306239bba8cfa1a6
27-
GO_VERSION: '1.22'
2827
permissions: {}
2928
concurrency:
3029
group: ${{ github.workflow }}-${{ github.ref }}
3130
cancel-in-progress: true
3231
jobs:
3332
private-registry-testing:
3433
name: private registry testing
35-
runs-on: ubuntu-latest
34+
runs-on: ubuntu-22.04
3635
env:
3736
DOCKER_CLI_EXPERIMENTAL: enabled
3837
steps:
@@ -48,12 +47,12 @@ jobs:
4847
- name: Setup Go
4948
uses: actions/setup-go@v5
5049
with:
51-
go-version: ${{ env.GO_VERSION }}
50+
go-version-file: go.mod
5251
- name: Release snapshot
5352
uses: goreleaser/goreleaser-action@v6
5453
with:
55-
version: v1.7.0
56-
args: release -f=goreleaser-e2e.yaml --snapshot --skip-publish --rm-dist
54+
version: v2.4.8
55+
args: release -f=goreleaser-e2e.yaml --snapshot --skip=publish --clean
5756
- name: Install kind and create cluster
5857
run: >
5958
curl -Lo ./kind https://kind.sigs.k8s.io/dl/${{ env.KIND_VERSION
@@ -83,10 +82,10 @@ jobs:
8382
-n private
8483
- name: Load operator image to cluster
8584
run: >
86-
docker tag ghcr.io/aquasecurity/trivy-operator:${{ github.sha }}-amd64
87-
ghcr.io/aquasecurity/trivy-operator:e2e
85+
docker tag mirror.gcr.io/aquasec/trivy-operator:${{ github.sha }}-amd64
86+
mirror.gcr.io/aquasec/trivy-operator:e2e
8887
89-
docker save -o trivy-operator.tar ghcr.io/aquasecurity/trivy-operator:e2e
88+
docker save -o trivy-operator.tar mirror.gcr.io/aquasec/trivy-operator:e2e
9089
9190
kind load image-archive trivy-operator.tar
9291
- name: Init E2E tests (Install kuttl & helm)

.github/workflows/publish-docs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
fetch-depth: 0
3737
ref: ${{ github.event.inputs.ref }}
3838
persist-credentials: true
39-
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
39+
- uses: actions/setup-python@5db1cf9a59fb97c40a68accab29236f0da7e94db
4040
with:
4141
python-version: 3.x
4242
- run: |

.github/workflows/publish-helm-chart.yaml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,31 @@ jobs:
2626
- uses: actions/checkout@v4
2727
with:
2828
fetch-depth: 0
29+
2930
- name: Install Helm
30-
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0
31+
uses: azure/setup-helm@b9e51907a09c216f16ebe8536097933489208112 # v4.3.0
3132
with:
3233
version: v3.14.2
34+
3335
- name: Set up python
34-
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
36+
uses: actions/setup-python@v5.6.0
3537
with:
36-
python-version: 3.7
38+
python-version: '3.x'
39+
check-latest: true
40+
3741
- name: Setup Chart Linting
3842
id: lint
39-
uses: helm/chart-testing-action@v2.6.1
43+
uses: helm/chart-testing-action@v2.7.0
44+
4045
- name: Setup Kubernetes cluster (KIND)
41-
uses: helm/kind-action@v1.10.0 # v1.5.0
46+
uses: helm/kind-action@v1.12.0 # v1.5.0
4247
with:
4348
version: ${{ env.KIND_VERSION }}
4449
node_image: ${{ env.KIND_IMAGE }}
50+
4551
- name: Run chart-testing
4652
run: ct lint-and-install --validate-maintainers=false --charts deploy/helm
53+
4754
- name: Install chart-releaser
4855
run: |
4956
wget https://github.com/helm/chart-releaser/releases/download/v1.3.0/chart-releaser_1.3.0_linux_amd64.tar.gz
@@ -76,7 +83,7 @@ jobs:
7683

7784
# OCI registry as helm repository (helm 3.8+)
7885
- name: Login to GHCR
79-
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
86+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
8087
with:
8188
registry: ghcr.io
8289
username: ${{ github.actor }}

0 commit comments

Comments
 (0)