mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-15 22:53:43 +00:00
Merge pull request #10486 from kata-containers/topic/enable-AUTO_GENERATE_POLICY-for-qemu-coco-dev
workflows: Use AUTO_GENERATE_POLICY for qemu-coco-dev
This commit is contained in:
commit
71c4c2a514
1
.github/workflows/ci.yaml
vendored
1
.github/workflows/ci.yaml
vendored
@ -176,6 +176,7 @@ jobs:
|
|||||||
needs: [publish-kata-deploy-payload-amd64, build-and-publish-tee-confidential-unencrypted-image]
|
needs: [publish-kata-deploy-payload-amd64, build-and-publish-tee-confidential-unencrypted-image]
|
||||||
uses: ./.github/workflows/run-kata-coco-tests.yaml
|
uses: ./.github/workflows/run-kata-coco-tests.yaml
|
||||||
with:
|
with:
|
||||||
|
tarball-suffix: -${{ inputs.tag }}
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
repo: ${{ github.repository_owner }}/kata-deploy-ci
|
repo: ${{ github.repository_owner }}/kata-deploy-ci
|
||||||
tag: ${{ inputs.tag }}-amd64
|
tag: ${{ inputs.tag }}-amd64
|
||||||
|
15
.github/workflows/run-kata-coco-tests.yaml
vendored
15
.github/workflows/run-kata-coco-tests.yaml
vendored
@ -2,6 +2,9 @@ name: CI | Run kata coco tests
|
|||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
|
tarball-suffix:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
registry:
|
registry:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
@ -262,6 +265,7 @@ jobs:
|
|||||||
AUTHENTICATED_IMAGE_PASSWORD: ${{ secrets.AUTHENTICATED_IMAGE_PASSWORD }}
|
AUTHENTICATED_IMAGE_PASSWORD: ${{ secrets.AUTHENTICATED_IMAGE_PASSWORD }}
|
||||||
SNAPSHOTTER: ${{ matrix.snapshotter }}
|
SNAPSHOTTER: ${{ matrix.snapshotter }}
|
||||||
USING_NFD: "false"
|
USING_NFD: "false"
|
||||||
|
AUTO_GENERATE_POLICY: "yes"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
@ -274,6 +278,15 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
TARGET_BRANCH: ${{ inputs.target-branch }}
|
TARGET_BRANCH: ${{ inputs.target-branch }}
|
||||||
|
|
||||||
|
- name: get-kata-tarball
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: kata-static-tarball-amd64${{ inputs.tarball-suffix }}
|
||||||
|
path: kata-artifacts
|
||||||
|
|
||||||
|
- name: Install kata
|
||||||
|
run: bash tests/integration/kubernetes/gha-run.sh install-kata-tools kata-artifacts
|
||||||
|
|
||||||
- name: Download Azure CLI
|
- name: Download Azure CLI
|
||||||
run: bash tests/integration/kubernetes/gha-run.sh install-azure-cli
|
run: bash tests/integration/kubernetes/gha-run.sh install-azure-cli
|
||||||
|
|
||||||
@ -315,7 +328,7 @@ jobs:
|
|||||||
run: bash tests/integration/kubernetes/gha-run.sh install-kbs-client
|
run: bash tests/integration/kubernetes/gha-run.sh install-kbs-client
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
timeout-minutes: 60
|
timeout-minutes: 80
|
||||||
run: bash tests/integration/kubernetes/gha-run.sh run-tests
|
run: bash tests/integration/kubernetes/gha-run.sh run-tests
|
||||||
|
|
||||||
- name: Delete AKS cluster
|
- name: Delete AKS cluster
|
||||||
|
@ -653,7 +653,7 @@ sandbox_cgroup_only=@DEFSANDBOXCGROUPONLY@
|
|||||||
# - When running with pods, sandbox sizing information will only be available if using Kubernetes >= 1.23 and containerd >= 1.6. CRI-O
|
# - When running with pods, sandbox sizing information will only be available if using Kubernetes >= 1.23 and containerd >= 1.6. CRI-O
|
||||||
# does not yet support sandbox sizing annotations.
|
# does not yet support sandbox sizing annotations.
|
||||||
# - When running single containers using a tool like ctr, container sizing information will be available.
|
# - When running single containers using a tool like ctr, container sizing information will be available.
|
||||||
static_sandbox_resource_mgmt=@DEFSTATICRESOURCEMGMT@
|
static_sandbox_resource_mgmt=@DEFSTATICRESOURCEMGMT_TEE@
|
||||||
|
|
||||||
# If specified, sandbox_bind_mounts identifieds host paths to be mounted (ro) into the sandboxes shared path.
|
# If specified, sandbox_bind_mounts identifieds host paths to be mounted (ro) into the sandboxes shared path.
|
||||||
# This is only valid if filesystem sharing is utilized. The provided path(s) will be bindmounted into the shared fs directory.
|
# This is only valid if filesystem sharing is utilized. The provided path(s) will be bindmounted into the shared fs directory.
|
||||||
|
@ -84,7 +84,7 @@ auto_generate_policy_enabled() {
|
|||||||
adapt_common_policy_settings_for_tdx() {
|
adapt_common_policy_settings_for_tdx() {
|
||||||
local settings_dir=$1
|
local settings_dir=$1
|
||||||
|
|
||||||
info "Adapting common policy settings for TDX or SNP"
|
info "Adapting common policy settings for TDX, SNP, or the non-TEE development environment"
|
||||||
jq '.common.cpath = "/run/kata-containers" | .volumes.configMap.mount_point = "^$(cpath)/$(bundle-id)-[a-z0-9]{16}-"' "${settings_dir}/genpolicy-settings.json" > temp.json && sudo mv temp.json "${settings_dir}/genpolicy-settings.json"
|
jq '.common.cpath = "/run/kata-containers" | .volumes.configMap.mount_point = "^$(cpath)/$(bundle-id)-[a-z0-9]{16}-"' "${settings_dir}/genpolicy-settings.json" > temp.json && sudo mv temp.json "${settings_dir}/genpolicy-settings.json"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,7 +119,7 @@ adapt_common_policy_settings() {
|
|||||||
local settings_dir=$1
|
local settings_dir=$1
|
||||||
|
|
||||||
case "${KATA_HYPERVISOR}" in
|
case "${KATA_HYPERVISOR}" in
|
||||||
"qemu-tdx"|"qemu-snp")
|
"qemu-tdx"|"qemu-snp"|"qemu-coco-dev")
|
||||||
adapt_common_policy_settings_for_tdx "${settings_dir}"
|
adapt_common_policy_settings_for_tdx "${settings_dir}"
|
||||||
;;
|
;;
|
||||||
"qemu-sev")
|
"qemu-sev")
|
||||||
|
Loading…
Reference in New Issue
Block a user