Skip to content
This repository was archived by the owner on Jul 11, 2023. It is now read-only.

Commit 1da753b

Browse files
authored
Merge pull request #4884 from steeling/release-v1.2
release: sync release-v1.2 branch
2 parents 4f204dd + 3a7c924 commit 1da753b

File tree

461 files changed

+17267
-13592
lines changed

Some content is hidden

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

461 files changed

+17267
-13592
lines changed

.env.example

+11-6
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export CTR_REGISTRY=localhost:5000
1111
# mandatory: Password to the container registry to use. Leave blank if no authentication is required.
1212
# For Azure Container Registry (ACR), the following command may be used: az acr credential show -n <your_registry_name> --query "passwords[0].value" | tr -d '"'
1313
# For the local registry stood up with `make kind-up`, this can be left blank.
14+
# USE_PRIVATE_REGISTRY=true must be set in addition for this password to be used when pulling images.
1415
export CTR_REGISTRY_PASSWORD=
1516
#---------------------------------------------------------------------------------
1617

@@ -24,10 +25,6 @@ export CTR_REGISTRY_PASSWORD=
2425
# Default: osm-system
2526
export K8S_NAMESPACE=osm-system
2627

27-
# optional: name of Kubernetes contexts that OSM will be deployed in multicluster mode
28-
# export ALPHA_CLUSTER=alpha
29-
# export BETA_CLUSTER=beta
30-
3128
# optional: Kubernetes namespace where bookbuyer app will be installed.
3229
# This cannot be the default namespace because it has to be a namespace that can be deleted.
3330
# Default: bookbuyer
@@ -58,6 +55,10 @@ export BOOKWAREHOUSE_NAMESPACE=bookwarehouse
5855
# Default: acr-creds
5956
# export CTR_REGISTRY_CREDS_NAME=acr-creds
6057

58+
# optional: Whether to enable permissive mode, defaults to true.
59+
# Default: true
60+
# export PERMISSIVE_MODE=false
61+
6162
# optional: A tag for the containers used to version the container images in the registry
6263
# Default: latest
6364
# export CTR_TAG=latest
@@ -91,8 +92,8 @@ export BOOKWAREHOUSE_NAMESPACE=bookwarehouse
9192
# export ENABLE_DEBUG_SERVER=true
9293

9394
# optional: ENABLE_EGRESS (true/false)
94-
# Default: false
95-
# export ENABLE_EGRESS=true
95+
# Default: true
96+
# export ENABLE_EGRESS=false
9697

9798
# optional: ENABLE_RECONCILER (true/false)
9899
# Default: false
@@ -183,6 +184,10 @@ export BOOKWAREHOUSE_NAMESPACE=bookwarehouse
183184
# Default: true
184185
#export PUBLISH_IMAGES=true
185186

187+
### optional: The local proxy mode for the control plane
188+
# Default: Localhost
189+
# export LOCAL_PROXY_MODE=Localhost
190+
186191
# See ./demo/deploy-vault.sh script on an example of how to deploy Hashicorp Vault
187192
# to your Kubernetes cluster.
188193
#--------------------------------------------------------------------------------

.github/workflows/codeql-analysis.yml

-13
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,6 @@ jobs:
3636
steps:
3737
- name: Checkout repository
3838
uses: actions/checkout@v2
39-
- name: Restore Module Cache
40-
uses: actions/cache@v2
41-
with:
42-
path: ~/go/pkg/mod
43-
key: ${{ runner.os }}-gomod2-${{ hashFiles('**/go.sum') }}
44-
restore-keys: |
45-
${{ runner.os }}-gomod2-
46-
- name: Restore Build Cache
47-
uses: actions/cache@v2
48-
with:
49-
path: ~/.cache/go-build
50-
key: ${{ runner.os }}-gobuild-${{ hashFiles('**/*.go') }}
51-
5239
# Initializes the CodeQL tools for scanning.
5340
- name: Initialize CodeQL
5441
uses: github/codeql-action/init@v1

.github/workflows/main.yml

+63-136
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
- "docs/**"
99
- "**.md"
1010
- "scripts/cleanup/**"
11+
- "CODEOWNERS"
12+
- "OWNERS"
1113
pull_request:
1214
branches:
1315
- main
@@ -16,6 +18,8 @@ on:
1618
- "docs/**"
1719
- "**.md"
1820
- "scripts/cleanup/**"
21+
- "CODEOWNERS"
22+
- "OWNERS"
1923
env:
2024
CI_WAIT_FOR_OK_SECONDS: 60
2125
CI_MAX_ITERATIONS_THRESHOLD: 60
@@ -40,10 +44,11 @@ jobs:
4044
steps:
4145
- name: Checkout
4246
uses: actions/checkout@v2
43-
- name: Setup Go 1.17
44-
uses: actions/setup-go@v2
47+
- name: Setup Go
48+
uses: actions/setup-go@v3
4549
with:
46-
go-version: 1.17
50+
go-version-file: go.mod
51+
cache: true
4752
- name: go build deps
4853
run: make embed-files-test
4954
- name: golangci-lint
@@ -58,10 +63,11 @@ jobs:
5863
steps:
5964
- name: Checkout
6065
uses: actions/checkout@v2
61-
- name: Setup Go 1.17
62-
uses: actions/setup-go@v2
66+
- name: Setup Go
67+
uses: actions/setup-go@v3
6368
with:
64-
go-version: 1.17
69+
go-version-file: go.mod
70+
cache: true
6571
- name: go mod tidy
6672
run: make go-mod-tidy
6773
- name: Codegen checks
@@ -73,10 +79,11 @@ jobs:
7379
steps:
7480
- name: Checkout
7581
uses: actions/checkout@v2
76-
- name: Setup Go 1.17
77-
uses: actions/setup-go@v2
82+
- name: Setup Go
83+
uses: actions/setup-go@v3
7884
with:
79-
go-version: 1.17
85+
go-version-file: go.mod
86+
cache: true
8087
- name: go mod tidy
8188
run: make go-mod-tidy
8289
- name: gomock checks
@@ -97,22 +104,11 @@ jobs:
97104
steps:
98105
- name: Checkout
99106
uses: actions/checkout@v2
100-
- name: Restore Module Cache
101-
uses: actions/cache@v2
107+
- name: Setup Go
108+
uses: actions/setup-go@v3
102109
with:
103-
path: ~/go/pkg/mod
104-
key: ${{ runner.os }}-gomod2-${{ hashFiles('**/go.sum') }}
105-
restore-keys: |
106-
${{ runner.os }}-gomod2-
107-
- name: Restore Build Cache
108-
uses: actions/cache@v2
109-
with:
110-
path: ~/.cache/go-build
111-
key: ${{ runner.os }}-gobuild-${{ hashFiles('**/*.go') }}
112-
- name: Setup Go 1.17
113-
uses: actions/setup-go@v2
114-
with:
115-
go-version: 1.17
110+
go-version-file: go.mod
111+
cache: true
116112
- name: Go Build
117113
run: make build-ci
118114

@@ -123,22 +119,11 @@ jobs:
123119
steps:
124120
- name: Checkout
125121
uses: actions/checkout@v2
126-
- name: Restore Module Cache
127-
uses: actions/cache@v2
128-
with:
129-
path: ~/go/pkg/mod
130-
key: ${{ runner.os }}-gomod2-${{ hashFiles('**/go.sum') }}
131-
restore-keys: |
132-
${{ runner.os }}-gomod2-
133-
- name: Restore Build Cache
134-
uses: actions/cache@v2
122+
- name: Setup Go
123+
uses: actions/setup-go@v3
135124
with:
136-
path: ~/.cache/go-build
137-
key: ${{ runner.os }}-gobuild-${{ hashFiles('**/*.go') }}
138-
- name: Setup Go 1.17
139-
uses: actions/setup-go@v2
140-
with:
141-
go-version: 1.17
125+
go-version-file: go.mod
126+
cache: true
142127
- name: go mod tidy
143128
run: make go-mod-tidy
144129
- name: Test
@@ -149,35 +134,6 @@ jobs:
149134
with:
150135
flags: unittests
151136

152-
scenarios_tests:
153-
name: Test various Envoy + SMI configuration scenarios
154-
runs-on: ubuntu-latest
155-
needs: build
156-
steps:
157-
- name: Checkout
158-
uses: actions/checkout@v2
159-
- name: Restore Module Cache
160-
uses: actions/cache@v2
161-
with:
162-
path: ~/go/pkg/mod
163-
key: ${{ runner.os }}-gomod2-${{ hashFiles('**/go.sum') }}
164-
restore-keys: |
165-
${{ runner.os }}-gomod2-
166-
- name: Restore Build Cache
167-
uses: actions/cache@v2
168-
with:
169-
path: ~/.cache/go-build
170-
key: ${{ runner.os }}-gobuild-${{ hashFiles('**/*.go') }}
171-
- name: Setup Go 1.17
172-
uses: actions/setup-go@v2
173-
with:
174-
go-version: 1.17
175-
- name: Test
176-
run: |
177-
touch .env
178-
make kind-up
179-
go test -v ./tests/scenarios/...
180-
181137
imagescan:
182138
name: Scan images for security vulnerabilities
183139
runs-on: ubuntu-latest
@@ -202,73 +158,59 @@ jobs:
202158
needs: build
203159
strategy:
204160
matrix:
161+
k8s_version: [""]
162+
focus: [""]
205163
bucket: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
164+
include:
165+
- k8s_version: v1.22.9
166+
focus: "Test traffic flowing from client to server with a Kubernetes Service for the Source: HTTP"
167+
bucket: ".*"
168+
- k8s_version: v1.23.6
169+
focus: "Test traffic flowing from client to server with a Kubernetes Service for the Source: HTTP"
170+
bucket: ".*"
171+
- k8s_version: v1.24.1
172+
focus: "Test traffic flowing from client to server with a Kubernetes Service for the Source: HTTP"
173+
bucket: ".*"
206174
env:
207175
CTR_TAG: ${{ github.sha }}
208176
CTR_REGISTRY: "localhost:5000" # unused for kind, but currently required in framework
209177
steps:
210178
- name: Checkout
211179
uses: actions/checkout@v2
212-
- name: Restore Module Cache
213-
uses: actions/cache@v2
214-
with:
215-
path: ~/go/pkg/mod
216-
key: ${{ runner.os }}-gomod2-${{ hashFiles('**/go.sum') }}
217-
restore-keys: |
218-
${{ runner.os }}-gomod2-
219-
- name: Restore Build Cache
220-
uses: actions/cache@v2
180+
- name: Setup Go
181+
uses: actions/setup-go@v3
221182
with:
222-
path: ~/.cache/go-build
223-
key: ${{ runner.os }}-gobuild-${{ hashFiles('**/*.go') }}
224-
- name: Setup Go 1.17
225-
uses: actions/setup-go@v2
226-
with:
227-
go-version: 1.17
183+
go-version-file: go.mod
184+
cache: true
228185
- name: Build test dependencies
229186
env:
230187
DOCKER_BUILDX_OUTPUT: type=docker
231188
run: make docker-build-osm build-osm docker-build-tcp-echo-server
232-
# PR Tests
233-
- name: Run PR tests
234-
id: pr_test
235-
if: ${{ github.event_name == 'pull_request' }}
189+
- name: Run tests
190+
id: test
236191
env:
237192
K8S_NAMESPACE: "osm-system"
238-
run: go test ./tests/e2e -test.v -ginkgo.v -ginkgo.progress -installType=KindCluster -test.timeout 0 -test.failfast -ginkgo.failFast -ginkgo.focus='\[Bucket ${{ matrix.bucket }}\]'
193+
run: go test ./tests/e2e -test.v -ginkgo.v -ginkgo.progress -installType=KindCluster -kindClusterVersion='${{ matrix.k8s_version }}' -test.timeout 0 -test.failfast -ginkgo.failFast -ginkgo.focus='\[Bucket ${{ matrix.bucket }}\].*${{ matrix.focus }}'
239194
continue-on-error: true
240-
- name: Upload PR test logs
241-
if: ${{ steps.pr_test.conclusion != 'skipped' }}
242-
uses: actions/upload-artifact@v2
243-
with:
244-
name: pr_test_logs_bucket_${{ matrix.bucket }}
245-
path: /tmp/test**/*
246-
- name: Check continue PR tests
247-
if: ${{ steps.pr_test.conclusion != 'skipped' && steps.pr_test.outcome == 'failure'}}
248-
run: exit 1
249-
- name: Clean PR tests
250-
if: ${{ steps.pr_test.conclusion != 'skipped' }}
251-
run: rm -rf /tmp/test*
252-
253-
# Push Tests
254-
- name: Run Push tests
255-
id: push_test
256-
if: ${{ github.event_name == 'push' }}
257-
env:
258-
K8S_NAMESPACE: "osm-system"
259-
run: go test ./tests/e2e -test.v -ginkgo.v -ginkgo.progress -installType=KindCluster -test.timeout 0 -test.failfast -ginkgo.failFast -ginkgo.focus='\[Bucket ${{ matrix.bucket }}\]'
260-
continue-on-error: true
261-
- name: Upload Push test logs
262-
if: ${{ steps.push_test.conclusion != 'skipped' }}
195+
- name: Set Logs name
196+
if: ${{ steps.test.conclusion != 'skipped' }}
197+
run: |
198+
if [[ -n "${{ matrix.k8s_version }}" ]]; then
199+
echo "ARTIFACT_NAME=test_logs_k8s_version_${{ matrix.k8s_version }}" >> $GITHUB_ENV
200+
else
201+
echo "ARTIFACT_NAME=test_logs_bucket_${{ matrix.bucket }}" >> $GITHUB_ENV
202+
fi
203+
- name: Upload test logs
204+
if: ${{ steps.test.conclusion != 'skipped' }}
263205
uses: actions/upload-artifact@v2
264206
with:
265-
name: push_test_logs_bucket_${{ matrix.bucket }}
207+
name: ${{ env.ARTIFACT_NAME }}
266208
path: /tmp/test**/*
267-
- name: Check continue Push tests
268-
if: ${{ steps.push_test.conclusion != 'skipped' && steps.push_test.outcome == 'failure'}}
209+
- name: Check continue tests
210+
if: ${{ steps.test.conclusion != 'skipped' && steps.test.outcome == 'failure'}}
269211
run: exit 1
270-
- name: Clean Push tests logs
271-
if: ${{ steps.push_test.conclusion != 'skipped' }}
212+
- name: Clean tests
213+
if: ${{ steps.test.conclusion != 'skipped' }}
272214
run: rm -rf /tmp/test*
273215

274216
integration-tresor:
@@ -278,34 +220,19 @@ jobs:
278220
steps:
279221
- name: Checkout
280222
uses: actions/checkout@v2
281-
282-
- name: Restore Module Cache
283-
uses: actions/cache@v2
284-
with:
285-
path: ~/go/pkg/mod
286-
key: ${{ runner.os }}-gomod2-${{ hashFiles('**/go.sum') }}
287-
restore-keys: |
288-
${{ runner.os }}-gomod2-
289-
290-
- name: Restore Build Cache
291-
uses: actions/cache@v2
292-
with:
293-
path: ~/.cache/go-build
294-
key: ${{ runner.os }}-gobuild-${{ hashFiles('**/*.go') }}
295-
296-
- name: Setup Go 1.17
297-
uses: actions/setup-go@v2
223+
- name: Setup Go
224+
uses: actions/setup-go@v3
298225
with:
299-
go-version: 1.17
300-
id: go
301-
226+
go-version-file: go.mod
227+
cache: true
302228
- name: Run Simulation w/ Tresor, SMI policies, egress disabled and reconciler disabled
303229
env:
304230
CERT_MANAGER: "tresor"
305231
BOOKSTORE_SVC: "bookstore"
306232
BOOKTHIEF_EXPECTED_RESPONSE_CODE: "0"
307233
ENABLE_EGRESS: "false"
308234
ENABLE_RECONCILER: "false"
235+
PERMISSIVE_MODE: "false"
309236
DEPLOY_TRAFFIC_SPLIT: "true"
310237
CTR_TAG: ${{ github.sha }}
311238
USE_PRIVATE_REGISTRY: "false"

.github/workflows/nightly-noinstall.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,11 @@ jobs:
5050
run: |
5151
kubectl version
5252
kubectl get nodes
53-
- name: Setup Go 1.17
54-
uses: actions/setup-go@v2
53+
- name: Setup Go
54+
uses: actions/setup-go@v3
5555
with:
56-
go-version: 1.17
56+
go-version-file: go.mod
57+
cache: true
5758
- name: Install OSM via OSM CLI
5859
run: |
5960
make build-osm

0 commit comments

Comments
 (0)