From 047721bd207f22a6899a103c483e6123244d7906 Mon Sep 17 00:00:00 2001 From: nishantmunjal7 Date: Fri, 13 Sep 2024 21:12:15 +0530 Subject: [PATCH] handling nosuid flag --- .github/workflows/build-k3s-atlan.yaml | 42 ++++++++++++++++++++++++++ go.mod | 2 +- go.sum | 4 +-- 3 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/build-k3s-atlan.yaml diff --git a/.github/workflows/build-k3s-atlan.yaml b/.github/workflows/build-k3s-atlan.yaml new file mode 100644 index 000000000000..c0dbb38b5916 --- /dev/null +++ b/.github/workflows/build-k3s-atlan.yaml @@ -0,0 +1,42 @@ +name: Build K3s + +on: + push: + branches: + - test-branch + +permissions: + id-token: write # This is required for requesting the JWT + contents: read # This is required for actions/checkout + +jobs: + build: + name: Build + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - name: Checkout K3s + uses: actions/checkout@v4 + + - name: Build K3s binary + run: | + DOCKER_BUILDKIT=1 SKIP_IMAGE=1 SKIP_AIRGAP=1 SKIP_VALIDATE=1 GOCOVER=1 make + sha256sum dist/artifacts/k3s | sed 's|dist/artifacts/||' > dist/artifacts/k3s.sha256sum + + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v1.7.0 + with: + role-to-assume: arn:aws:iam::024630551114:role/gh-action-role + role-session-name: GitHub_to_AWS_via_FederatedOIDC + aws-region: us-east-1 + + - name: Upload K3s binary to S3 + run: | + aws s3 cp dist/artifacts/k3s s3://atlan-public/workflow-offline-agent/container/k3s --region eu-west-1 --acl public-read + aws s3 cp dist/artifacts/k3s.sha256sum s3://atlan-public/workflow-offline-agent/container/k3s.sha256sum --region eu-west-1 --acl public-read + + - name: "Upload K3s binary as artifact" + uses: actions/upload-artifact@v4 + with: + name: k3s + path: dist/artifacts/k3s* \ No newline at end of file diff --git a/go.mod b/go.mod index 2ab38ce029b0..f69cc7cff42e 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ replace ( github.com/golang/protobuf => github.com/golang/protobuf v1.5.4 github.com/googleapis/gax-go/v2 => github.com/googleapis/gax-go/v2 v2.12.0 github.com/open-policy-agent/opa => github.com/open-policy-agent/opa v0.59.0 // github.com/Microsoft/hcsshim using bad version v0.42.2 - github.com/opencontainers/runc => github.com/k3s-io/runc v1.1.12-k3s1 + github.com/opencontainers/runc => github.com/atlanhq/runc v1.1.12-k3s2 github.com/opencontainers/selinux => github.com/opencontainers/selinux v1.11.0 github.com/prometheus/client_golang => github.com/prometheus/client_golang v1.19.1 github.com/prometheus/common => github.com/prometheus/common v0.55.0 diff --git a/go.sum b/go.sum index a5ae4c3a14de..09da051825d3 100644 --- a/go.sum +++ b/go.sum @@ -297,6 +297,8 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPd github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/atlanhq/runc v1.1.12-k3s2 h1:002a0Slud6xXzG4J/zAstAyyKm+PLYWAvd+G1NcrEHE= +github.com/atlanhq/runc v1.1.12-k3s2/go.mod h1:S+lQwSfncpBha7XTy/5lBwWgm5+y5Ma/O44Ekby9FK8= github.com/avast/retry-go/v4 v4.6.0 h1:K9xNA+KeB8HHc2aWFuLb25Offp+0iVRXEvFx8IinRJA= github.com/avast/retry-go/v4 v4.6.0/go.mod h1:gvWlPhBVsvBbLkVGDg/KwvBv0bEkCOLRRSHKIr2PyOE= github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk= @@ -1004,8 +1006,6 @@ github.com/k3s-io/kubernetes/staging/src/k8s.io/mount-utils v1.31.0-k3s3 h1:8ZpG github.com/k3s-io/kubernetes/staging/src/k8s.io/mount-utils v1.31.0-k3s3/go.mod h1:p5r0u2M9KzooTgHDz4zRsUt02y4Yx7/5uPwgr0nSGqg= github.com/k3s-io/kubernetes/staging/src/k8s.io/pod-security-admission v1.31.0-k3s3 h1:LCZWmkBHHA3CZb5uEM7/ThQY2IKHHGFbV/rkAEK6m8s= github.com/k3s-io/kubernetes/staging/src/k8s.io/pod-security-admission v1.31.0-k3s3/go.mod h1:nOJes2FVv6qZXUU3CGubLnloPJVV4rZ+jm0bLRCKKOM= -github.com/k3s-io/runc v1.1.12-k3s1 h1:p2x48K2BbRdF8crLEB4xoJ1pdjSprlvNNGpYBBULHL4= -github.com/k3s-io/runc v1.1.12-k3s1/go.mod h1:S+lQwSfncpBha7XTy/5lBwWgm5+y5Ma/O44Ekby9FK8= github.com/k3s-io/spegel v0.0.23-0.20240516234953-f3d2c4072314 h1:TrZb/yM0OtBuifPXlKaOfcxpJqzakA8+KsoO4c69ZLM= github.com/k3s-io/spegel v0.0.23-0.20240516234953-f3d2c4072314/go.mod h1:bMHfSjj1+Zf5VITCZe/wLjuni6rYAj/DjPU/kIVnhfA= github.com/karrick/godirwalk v1.17.0 h1:b4kY7nqDdioR/6qnbHQyDvmA17u5G1cZ6J+CZXwSWoI=