Skip to content

Commit 5dac7fc

Browse files
committed
chore: merging
2 parents cf684b6 + 535ab1d commit 5dac7fc

45 files changed

Lines changed: 641 additions & 160 deletions

Some content is hidden

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

.github/workflows/azure-nightly-build.yml

Lines changed: 0 additions & 60 deletions
This file was deleted.

.github/workflows/e2e_aws.yaml

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,16 @@ on:
1818
description: Git ref to checkout the cloud-api-adaptor repository. Defaults to main.
1919
required: false
2020
type: string
21-
oras:
22-
description: Whether the podvm_image is oras published
23-
default: false
21+
peerpod_ctrl_image:
22+
description: The peerpod-ctrl OCI image (including tag)
2423
required: false
25-
type: boolean
24+
default: ''
25+
type: string
26+
webhook_image:
27+
description: The peer-pods-webhook OCI image (including tag)
28+
required: false
29+
default: ''
30+
type: string
2631
cluster_type:
2732
description: Specify the cluster type. Accepted values are "onprem" or "eks".
2833
default: onprem
@@ -75,8 +80,10 @@ jobs:
7580
CAA_IMAGE: "${{ inputs.caa_image }}"
7681
CLUSTER_TYPE: "${{ inputs.cluster_type }}"
7782
CONTAINER_RUNTIME: "${{ inputs.container_runtime }}"
83+
PEERPOD_CTRL_IMAGE: "${{ inputs.peerpod_ctrl_image }}"
7884
PODVM_IMAGE: "${{ inputs.podvm_image }}"
7985
RESOURCES_BASENAME: "ci-caa-${{ github.run_id }}-${{ github.run_attempt }}"
86+
WEBHOOK_IMAGE: "${{ inputs.webhook_image }}"
8087
permissions:
8188
id-token: write # Required by aws-actions/configure-aws-credentials
8289
contents: read # Required by aws-actions/configure-aws-credentials
@@ -122,19 +129,7 @@ jobs:
122129
with:
123130
version: ${{ env.ORAS_VERSION }}
124131

125-
- name: Extract qcow2 from ${{ inputs.podvm_image }}
126-
if: ${{ !inputs.oras }}
127-
run: |
128-
# shellcheck disable=SC2001
129-
qcow2=$(echo "${PODVM_IMAGE}" | sed -e "s#.*/\(.*\):.*#\1.qcow2#")
130-
./hack/download-image.sh "${PODVM_IMAGE}" . -o "${qcow2}" --clean-up
131-
echo "PODVM_QCOW2=$(pwd)/${qcow2}" >> "$GITHUB_ENV"
132-
# Clean up docker images to make space
133-
docker system prune -a -f
134-
working-directory: src/cloud-api-adaptor/podvm
135-
136-
- name: Use oras to get qcow2 from ${{ inputs.podvm_image }}
137-
if: ${{ inputs.oras }}
132+
- name: Get qcow2 file from ${{ inputs.podvm_image }}
138133
run: |
139134
oras pull "${PODVM_IMAGE}"
140135
tar xvJpf podvm.tar.xz
@@ -173,7 +168,7 @@ jobs:
173168
echo "::endgroup::"
174169
175170
- name: Configure AWS credentials
176-
uses: aws-actions/configure-aws-credentials@ec61189d14ec14c8efccab744f656cffd0e33f37 # v6.1.0
171+
uses: aws-actions/configure-aws-credentials@d979d5b3a71173a29b74b5b88418bfda9437d885 # v6.1.1
177172
with:
178173
aws-region: us-east-1
179174
role-to-assume: ${{ secrets.AWS_IAM_ROLE_ARN }}

.github/workflows/e2e_byom.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ on:
1313
caa_image:
1414
type: string
1515
required: true
16+
peerpod_ctrl_image:
17+
description: The peerpod-ctrl OCI image (including tag)
18+
required: false
19+
default: ''
20+
type: string
21+
webhook_image:
22+
description: The peer-pods-webhook OCI image (including tag)
23+
required: false
24+
default: ''
25+
type: string
1626
git_ref:
1727
default: 'main'
1828
description: Git ref to checkout the cloud-api-adaptor repository. Defaults to main.
@@ -36,6 +46,8 @@ jobs:
3646
env:
3747
CAA_IMAGE: "${{ inputs.caa_image }}"
3848
BYOM_PODVM_IMAGE: "${{ inputs.podvm_image }}"
49+
PEERPOD_CTRL_IMAGE: "${{ inputs.peerpod_ctrl_image }}"
50+
WEBHOOK_IMAGE: "${{ inputs.webhook_image }}"
3951
steps:
4052
- name: Checkout Code
4153
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

.github/workflows/e2e_docker.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ on:
2323
description: Name of the container runtime. Either containerd or crio.
2424
required: false
2525
type: string
26+
peerpod_ctrl_image:
27+
description: The peerpod-ctrl OCI image (including tag)
28+
required: false
29+
default: ''
30+
type: string
31+
webhook_image:
32+
description: The peer-pods-webhook OCI image (including tag)
33+
required: false
34+
default: ''
35+
type: string
2636
secrets:
2737
QUAY_PASSWORD:
2838
required: true
@@ -44,6 +54,8 @@ jobs:
4454
runs-on: ubuntu-22.04
4555
env:
4656
CAA_IMAGE: "${{ inputs.caa_image }}"
57+
PEERPOD_CTRL_IMAGE: "${{ inputs.peerpod_ctrl_image }}"
58+
WEBHOOK_IMAGE: "${{ inputs.webhook_image }}"
4759
steps:
4860
- name: Checkout Code
4961
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

.github/workflows/e2e_libvirt.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,16 @@ on:
2828
description: Name of the container runtime. Either containerd or crio.
2929
required: false
3030
type: string
31+
peerpod_ctrl_image:
32+
description: The peerpod-ctrl OCI image (including tag)
33+
required: false
34+
default: ''
35+
type: string
36+
webhook_image:
37+
description: The peer-pods-webhook OCI image (including tag)
38+
required: false
39+
default: ''
40+
type: string
3141
secrets:
3242
REGISTRY_CREDENTIAL_ENCODED:
3343
required: true
@@ -162,10 +172,12 @@ jobs:
162172
CLOUD_PROVIDER: libvirt
163173
CONTAINER_RUNTIME: ${{ inputs.container_runtime }}
164174
DEPLOY_KBS: "true"
175+
PEERPOD_CTRL_IMAGE: "${{ inputs.peerpod_ctrl_image }}"
165176
TEST_TEARDOWN: "no"
166177
TEST_PROVISION_FILE: ${{ github.workspace }}/src/cloud-api-adaptor/libvirt.properties
167178
TEST_PODVM_IMAGE: ${{ env.PODVM_QCOW2 }}
168179
TEST_E2E_TIMEOUT: "75m"
180+
WEBHOOK_IMAGE: "${{ inputs.webhook_image }}"
169181
run: |
170182
# Default: provision cluster and install CAA
171183
export TEST_PROVISION="yes"

.github/workflows/e2e_run_all.yaml

Lines changed: 64 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -185,35 +185,72 @@ jobs:
185185
secrets:
186186
QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }}
187187

188+
# Build and push the peerpod-ctrl image (per-arch)
189+
peerpod_ctrl_image_amd64:
190+
uses: ./.github/workflows/peerpod-ctrl_build_and_push.yaml
191+
with:
192+
registry: ${{ inputs.registry }}
193+
image_tags: ${{ inputs.caa_image_tag }}
194+
git_ref: ${{ inputs.git_ref }}
195+
arch: linux/amd64
196+
runner: ubuntu-24.04
197+
permissions:
198+
contents: read
199+
packages: write # Required to publish the image to ghcr
200+
secrets:
201+
QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }}
202+
203+
peerpod_ctrl_image_s390x:
204+
uses: ./.github/workflows/peerpod-ctrl_build_and_push.yaml
205+
with:
206+
registry: ${{ inputs.registry }}
207+
image_tags: ${{ inputs.caa_image_tag }}
208+
git_ref: ${{ inputs.git_ref }}
209+
arch: linux/s390x
210+
runner: ubuntu-24.04-s390x
211+
permissions:
212+
contents: read
213+
packages: write # Required to publish the image to ghcr
214+
secrets:
215+
QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }}
216+
217+
# Build and push the webhook image
218+
webhook_image:
219+
uses: ./.github/workflows/webhook_image.yaml
220+
with:
221+
registry: ${{ inputs.registry }}
222+
image_tags: ${{ inputs.caa_image_tag }}
223+
git_ref: ${{ inputs.git_ref }}
224+
permissions:
225+
contents: read
226+
packages: write # Required to publish the image to ghcr
227+
secrets:
228+
QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }}
229+
188230
# Run AWS e2e tests if pull request labeled 'test_e2e_aws'
189231
aws:
190232
name: aws
191233
if: |
192234
github.event_name == 'schedule' ||
193235
github.event_name == 'workflow_dispatch' ||
194236
contains(github.event.pull_request.labels.*.name, 'test_e2e_aws')
195-
needs: [podvm, caa_image_amd64]
237+
needs: [podvm_ubuntu_amd64, caa_image_amd64, peerpod_ctrl_image_amd64, webhook_image]
196238
strategy:
197239
fail-fast: false
198240
matrix:
199241
container_runtime:
200242
- crio
201-
os:
202-
- ubuntu
203-
provider:
204-
- generic
205-
arch:
206-
- amd64
207243
permissions:
208244
id-token: write # Required by aws-actions/configure-aws-credentials
209245
contents: read # Required by aws-actions/configure-aws-credentials
210246
uses: ./.github/workflows/e2e_aws.yaml
211247
with:
212248
caa_image: ${{ inputs.registry }}/cloud-api-adaptor:${{ inputs.caa_image_tag }}-dev-amd64
213249
container_runtime: ${{ matrix.container_runtime }}
214-
podvm_image: ${{ inputs.registry }}/podvm-${{ matrix.provider }}-${{ matrix.os }}-${{ matrix.arch }}:${{ inputs.podvm_image_tag }}
250+
podvm_image: ${{ needs.podvm_ubuntu_amd64.outputs.qcow2_oras_image }}
215251
git_ref: ${{ inputs.git_ref }}
216-
oras: false
252+
peerpod_ctrl_image: ${{ inputs.registry }}/peerpod-ctrl:${{ inputs.caa_image_tag }}-amd64
253+
webhook_image: ${{ inputs.registry }}/peer-pods-webhook:${{ inputs.caa_image_tag }}
217254
secrets:
218255
AWS_IAM_ROLE_ARN: ${{ secrets.AWS_IAM_ROLE_ARN }}
219256

@@ -241,13 +278,15 @@ jobs:
241278
github.event_name == 'workflow_dispatch' ||
242279
contains(github.event.pull_request.labels.*.name, 'test_e2e_libvirt') ||
243280
contains(github.event.pull_request.labels.*.name, 'test_e2e_libvirt_amd64')
244-
needs: [podvm_mkosi_amd64, libvirt_e2e_arch_prep, caa_image_amd64]
281+
needs: [podvm_mkosi_amd64, libvirt_e2e_arch_prep, caa_image_amd64, peerpod_ctrl_image_amd64, webhook_image]
245282
uses: ./.github/workflows/e2e_libvirt.yaml
246283
with:
247284
runner: ubuntu-24.04
248285
caa_image: ${{ inputs.registry }}/cloud-api-adaptor:${{ inputs.caa_image_tag }}-dev-amd64
249286
podvm_image: ${{ needs.podvm_mkosi_amd64.outputs.qcow2_oras_image }}
250287
git_ref: ${{ inputs.git_ref }}
288+
peerpod_ctrl_image: ${{ inputs.registry }}/peerpod-ctrl:${{ inputs.caa_image_tag }}-amd64
289+
webhook_image: ${{ inputs.registry }}/peer-pods-webhook:${{ inputs.caa_image_tag }}
251290
secrets:
252291
REGISTRY_CREDENTIAL_ENCODED: ${{ secrets.REGISTRY_CREDENTIAL_ENCODED }}
253292

@@ -259,13 +298,15 @@ jobs:
259298
github.event_name == 'workflow_dispatch' ||
260299
contains(github.event.pull_request.labels.*.name, 'test_e2e_libvirt') ||
261300
contains(github.event.pull_request.labels.*.name, 'test_e2e_libvirt_s390x')
262-
needs: [podvm_mkosi_s390x, libvirt_e2e_arch_prep, caa_image_s390x]
301+
needs: [podvm_mkosi_s390x, libvirt_e2e_arch_prep, caa_image_s390x, peerpod_ctrl_image_s390x, webhook_image]
263302
uses: ./.github/workflows/e2e_libvirt.yaml
264303
with:
265304
runner: s390x-large
266305
caa_image: ${{ inputs.registry }}/cloud-api-adaptor:${{ inputs.caa_image_tag }}-dev-s390x
267306
podvm_image: ${{ needs.podvm_mkosi_s390x.outputs.qcow2_oras_image }}
268307
git_ref: ${{ inputs.git_ref }}
308+
peerpod_ctrl_image: ${{ inputs.registry }}/peerpod-ctrl:${{ inputs.caa_image_tag }}-s390x
309+
webhook_image: ${{ inputs.registry }}/peer-pods-webhook:${{ inputs.caa_image_tag }}
269310
secrets:
270311
REGISTRY_CREDENTIAL_ENCODED: ${{ secrets.REGISTRY_CREDENTIAL_ENCODED }}
271312

@@ -277,13 +318,15 @@ jobs:
277318
github.event_name == 'workflow_dispatch' ||
278319
contains(github.event.pull_request.labels.*.name, 'test_e2e_libvirt') ||
279320
contains(github.event.pull_request.labels.*.name, 'test_e2e_libvirt_amd64')
280-
needs: [podvm_ubuntu_amd64, libvirt_e2e_arch_prep, caa_image_amd64]
321+
needs: [podvm_ubuntu_amd64, libvirt_e2e_arch_prep, caa_image_amd64, peerpod_ctrl_image_amd64, webhook_image]
281322
uses: ./.github/workflows/e2e_libvirt.yaml
282323
with:
283324
runner: ubuntu-24.04
284325
caa_image: ${{ inputs.registry }}/cloud-api-adaptor:${{ inputs.caa_image_tag }}-amd64-dev
285326
podvm_image: ${{ needs.podvm_ubuntu_amd64.outputs.qcow2_oras_image }}
286327
git_ref: ${{ inputs.git_ref }}
328+
peerpod_ctrl_image: ${{ inputs.registry }}/peerpod-ctrl:${{ inputs.caa_image_tag }}-amd64
329+
webhook_image: ${{ inputs.registry }}/peer-pods-webhook:${{ inputs.caa_image_tag }}
287330
secrets:
288331
REGISTRY_CREDENTIAL_ENCODED: ${{ secrets.REGISTRY_CREDENTIAL_ENCODED }}
289332

@@ -295,13 +338,15 @@ jobs:
295338
github.event_name == 'workflow_dispatch' ||
296339
contains(github.event.pull_request.labels.*.name, 'test_e2e_libvirt') ||
297340
contains(github.event.pull_request.labels.*.name, 'test_e2e_libvirt_s390x')
298-
needs: [podvm_ubuntu_s390x, libvirt_e2e_arch_prep, caa_image_s390x]
341+
needs: [podvm_ubuntu_s390x, libvirt_e2e_arch_prep, caa_image_s390x, peerpod_ctrl_image_s390x, webhook_image]
299342
uses: ./.github/workflows/e2e_libvirt.yaml
300343
with:
301344
runner: s390x-large
302345
caa_image: ${{ inputs.registry }}/cloud-api-adaptor:${{ inputs.caa_image_tag }}-s390x-dev
303346
podvm_image: ${{ needs.podvm_ubuntu_s390x.outputs.qcow2_oras_image }}
304347
git_ref: ${{ inputs.git_ref }}
348+
peerpod_ctrl_image: ${{ inputs.registry }}/peerpod-ctrl:${{ inputs.caa_image_tag }}-s390x
349+
webhook_image: ${{ inputs.registry }}/peer-pods-webhook:${{ inputs.caa_image_tag }}
305350
secrets:
306351
REGISTRY_CREDENTIAL_ENCODED: ${{ secrets.REGISTRY_CREDENTIAL_ENCODED }}
307352

@@ -312,7 +357,7 @@ jobs:
312357
github.event_name == 'schedule' ||
313358
github.event_name == 'workflow_dispatch' ||
314359
contains(github.event.pull_request.labels.*.name, 'test_e2e_docker')
315-
needs: [podvm_mkosi_amd64, caa_image_amd64]
360+
needs: [podvm_mkosi_amd64, caa_image_amd64, peerpod_ctrl_image_amd64, webhook_image]
316361
strategy:
317362
fail-fast: false
318363
matrix:
@@ -330,6 +375,8 @@ jobs:
330375
container_runtime: ${{ matrix.container_runtime }}
331376
podvm_image: ${{ needs.podvm_mkosi_amd64.outputs.docker_oci_image }}
332377
git_ref: ${{ inputs.git_ref }}
378+
peerpod_ctrl_image: ${{ inputs.registry }}/peerpod-ctrl:${{ inputs.caa_image_tag }}-amd64
379+
webhook_image: ${{ inputs.registry }}/peer-pods-webhook:${{ inputs.caa_image_tag }}
333380
secrets:
334381
QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }}
335382

@@ -340,9 +387,11 @@ jobs:
340387
github.event_name == 'schedule' ||
341388
github.event_name == 'workflow_dispatch' ||
342389
contains(github.event.pull_request.labels.*.name, 'test_e2e_byom')
343-
needs: [podvm_ubuntu_amd64, caa_image_amd64]
390+
needs: [podvm_ubuntu_amd64, caa_image_amd64, peerpod_ctrl_image_amd64, webhook_image]
344391
uses: ./.github/workflows/e2e_byom.yaml
345392
with:
346393
caa_image: ${{ inputs.registry }}/cloud-api-adaptor:${{ inputs.caa_image_tag }}-dev-amd64
347394
podvm_image: ${{ needs.podvm_ubuntu_amd64.outputs.byom_e2e_image }}
348395
git_ref: ${{ inputs.git_ref }}
396+
peerpod_ctrl_image: ${{ inputs.registry }}/peerpod-ctrl:${{ inputs.caa_image_tag }}-amd64
397+
webhook_image: ${{ inputs.registry }}/peer-pods-webhook:${{ inputs.caa_image_tag }}

.github/workflows/lib-codeql.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ jobs:
2525
check-latest: true
2626

2727
- name: Initialize CodeQL
28-
uses: github/codeql-action/init@e46ed2cbd01164d986452f91f178727624ae40d7 # v4.35.3
28+
uses: github/codeql-action/init@68bde559dea0fdcac2102bfdf6230c5f70eb485e # v4.35.4
2929
with:
3030
languages: 'go'
3131

3232
- name: Perform CodeQL Analysis
33-
uses: github/codeql-action/analyze@e46ed2cbd01164d986452f91f178727624ae40d7 # v4.35.3
33+
uses: github/codeql-action/analyze@68bde559dea0fdcac2102bfdf6230c5f70eb485e # v4.35.4
3434
with:
3535
category: "/language:go"

0 commit comments

Comments
 (0)