Skip to content

Commit

Permalink
Merge branch 'master' into rebalancefix
Browse files Browse the repository at this point in the history
  • Loading branch information
bharathguvvala committed Nov 14, 2024
2 parents 0f4c0df + 6f138cf commit 30d242e
Show file tree
Hide file tree
Showing 656 changed files with 93,964 additions and 16,710 deletions.
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ updates:

- package-ecosystem: docker
directory: /cluster/images/
target-branch: "release-1.10"
target-branch: "release-1.11"
schedule:
interval: weekly

- package-ecosystem: docker
directory: /cluster/images/
target-branch: "release-1.9"
target-branch: "release-1.10"
schedule:
interval: weekly

- package-ecosystem: docker
directory: /cluster/images/
target-branch: "release-1.8"
target-branch: "release-1.9"
schedule:
interval: weekly
69 changes: 69 additions & 0 deletions .github/workflows/ci-image-scanning-on-schedule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: image-scanning-on-schedule
on:
schedule:
# Run this workflow "At 00:00 UTC on Sunday"
- cron: '0 0 * * 0'
permissions:
contents: read
jobs:
use-trivy-to-scan-image:
permissions:
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
name: image-scanning
if: ${{ github.repository == 'karmada-io/karmada' }}
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
target:
- karmada-controller-manager
- karmada-scheduler
- karmada-descheduler
- karmada-webhook
- karmada-agent
- karmada-scheduler-estimator
- karmada-interpreter-webhook-example
- karmada-aggregated-apiserver
- karmada-search
- karmada-operator
- karmada-metrics-adapter
karmada-version: [ release-1.11, release-1.10, release-1.9 ]
steps:
- name: checkout code
uses: actions/checkout@v4
with:
ref: ${{ matrix.karmada-version }}
- name: install Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- id: gen_git_info
run: |
echo "ref=$(git rev-parse --symbolic-full-name HEAD)" >> "$GITHUB_OUTPUT"
echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
- name: Build images from Dockerfile
run: |
export VERSION=${{ matrix.karmada-version }}
export REGISTRY="docker.io/karmada"
make image-${{ matrix.target }}
- name: Run Trivy vulnerability scanner
uses: aquasecurity/[email protected]
with:
image-ref: 'docker.io/karmada/${{ matrix.target }}:${{ matrix.karmada-version }}'
format: 'sarif'
ignore-unfixed: true
vuln-type: 'os,library'
output: '${{ matrix.target }}:${{ matrix.karmada-version }}.trivy-results.sarif'
- name: display scan results
uses: aquasecurity/[email protected]
with:
image-ref: 'docker.io/karmada/${{ matrix.target }}:${{ matrix.karmada-version }}'
format: 'table'
ignore-unfixed: true
vuln-type: 'os,library'
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: '${{ matrix.target }}:${{ matrix.karmada-version }}.trivy-results.sarif'
ref: ${{steps.gen_git_info.outputs.ref}}
sha: ${{steps.gen_git_info.outputs.sha}}
124 changes: 62 additions & 62 deletions .github/workflows/ci-image-scanning.yaml
Original file line number Diff line number Diff line change
@@ -1,62 +1,62 @@
name: image-scanning
on:
push:
# Exclude branches created by Dependabot to avoid triggering current workflow
# for PRs initiated by Dependabot.
branches-ignore:
- 'dependabot/**'
permissions:
contents: read
jobs:
use-trivy-to-scan-image:
permissions:
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
name: image-scanning
if: ${{ github.repository == 'karmada-io/karmada' }}
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
target:
- karmada-controller-manager
- karmada-scheduler
- karmada-descheduler
- karmada-webhook
- karmada-agent
- karmada-scheduler-estimator
- karmada-interpreter-webhook-example
- karmada-aggregated-apiserver
- karmada-search
- karmada-operator
- karmada-metrics-adapter
steps:
- name: checkout code
uses: actions/checkout@v4
- name: install Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build an image from Dockerfile
run: |
export VERSION="latest"
export REGISTRY="docker.io/karmada"
make image-${{ matrix.target }}
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@0.24.0
with:
image-ref: 'docker.io/karmada/${{ matrix.target }}:latest'
format: 'sarif'
ignore-unfixed: true
vuln-type: 'os,library'
output: 'trivy-results.sarif'
- name: display scan results
uses: aquasecurity/trivy-action@0.24.0
with:
image-ref: 'docker.io/karmada/${{ matrix.target }}:latest'
format: 'table'
ignore-unfixed: true
vuln-type: 'os,library'
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: 'trivy-results.sarif'
name: image-scanning
on:
push:
# Exclude branches created by Dependabot to avoid triggering current workflow
# for PRs initiated by Dependabot.
branches-ignore:
- 'dependabot/**'
permissions:
contents: read
jobs:
use-trivy-to-scan-image:
permissions:
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
name: image-scanning
if: ${{ github.repository == 'karmada-io/karmada' }}
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
target:
- karmada-controller-manager
- karmada-scheduler
- karmada-descheduler
- karmada-webhook
- karmada-agent
- karmada-scheduler-estimator
- karmada-interpreter-webhook-example
- karmada-aggregated-apiserver
- karmada-search
- karmada-operator
- karmada-metrics-adapter
steps:
- name: checkout code
uses: actions/checkout@v4
- name: install Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build an image from Dockerfile
run: |
export VERSION="latest"
export REGISTRY="docker.io/karmada"
make image-${{ matrix.target }}
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@0.28.0
with:
image-ref: 'docker.io/karmada/${{ matrix.target }}:latest'
format: 'sarif'
ignore-unfixed: true
vuln-type: 'os,library'
output: 'trivy-results.sarif'
- name: display scan results
uses: aquasecurity/trivy-action@0.28.0
with:
image-ref: 'docker.io/karmada/${{ matrix.target }}:latest'
format: 'table'
ignore-unfixed: true
vuln-type: 'os,library'
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: 'trivy-results.sarif'
4 changes: 2 additions & 2 deletions .github/workflows/ci-schedule-compatibility.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ jobs:
max-parallel: 5
fail-fast: false
matrix:
kubeapiserver-version: [ v1.23.4, v1.24.2, v1.25.0, v1.26.0, v1.27.3, v1.28.0, v1.29.0, v1.30.0 ]
karmada-version: [ master, release-1.10, release-1.9, release-1.8 ]
kubeapiserver-version: [ v1.23.4, v1.24.2, v1.25.0, v1.26.0, v1.27.3, v1.28.0, v1.29.0, v1.30.0, v1.31.0 ]
karmada-version: [ master, release-1.11, release-1.10, release-1.9 ]
env:
KARMADA_APISERVER_VERSION: ${{ matrix.kubeapiserver-version }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-schedule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
max-parallel: 5
fail-fast: false
matrix:
k8s: [ v1.23.4, v1.24.2, v1.25.0, v1.26.0, v1.27.3, v1.28.0, v1.29.0, v1.30.0 ]
k8s: [ v1.23.4, v1.24.2, v1.25.0, v1.26.0, v1.27.3, v1.28.0, v1.29.0, v1.30.0, v1.31.0 ]
steps:
# Free up disk space on Ubuntu
- name: Free Disk Space (Ubuntu)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:
# Here support the latest three minor releases of Kubernetes, this can be considered to be roughly
# the same as the End of Life of the Kubernetes release: https://kubernetes.io/releases/
# Please remember to update the CI Schedule Workflow when we add a new version.
k8s: [ v1.28.0, v1.29.0, v1.30.0 ]
k8s: [ v1.29.0, v1.30.0, v1.31.0 ]
steps:
# Free up disk space on Ubuntu
- name: Free Disk Space (Ubuntu)
Expand Down
47 changes: 44 additions & 3 deletions .github/workflows/cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
# Here support the latest three minor releases of Kubernetes, this can be considered to be roughly
# the same as the End of Life of the Kubernetes release: https://kubernetes.io/releases/
# Please remember to update the CI Schedule Workflow when we add a new version.
k8s: [ v1.28.0, v1.29.0, v1.30.0 ]
k8s: [ v1.29.0, v1.30.0, v1.31.0 ]
steps:
- name: checkout code
uses: actions/checkout@v4
Expand All @@ -36,7 +36,6 @@ jobs:
uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: run karmadactl init test
run: |
export CLUSTER_VERSION=kindest/node:${{ matrix.k8s }}
Expand All @@ -48,7 +47,7 @@ jobs:
export KUBECONFIG=${HOME}/karmada/karmada-apiserver.config
GO111MODULE=on go install github.com/onsi/ginkgo/v2/ginkgo
ginkgo -v --race --trace -p --focus="[BasicPropagation] propagation testing deployment propagation testing" ./test/e2e/
- name: export logs
- name: export logs
if: always()
run: |
export ARTIFACTS_PATH=${{ github.workspace }}/karmadactl-test-logs/${{ matrix.k8s }}/
Expand All @@ -63,3 +62,45 @@ jobs:
name: karmadactl_test_logs_${{ matrix.k8s }}
path: ${{ github.workspace }}/karmadactl-test-logs/${{ matrix.k8s }}/

init-config:
name: init with config file
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
# Latest three minor releases of Kubernetes
k8s: [ v1.29.0, v1.30.0, v1.31.0 ]
steps:
- name: checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: install Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: run karmadactl init with config file test
run: |
export CLUSTER_VERSION=kindest/node:${{ matrix.k8s }}
# Run custom test for workload configuration deployment
hack/cli-testing-init-with-config.sh
# run a single e2e
export KUBECONFIG=${HOME}/karmada/karmada-apiserver.config
GO111MODULE=on go install github.com/onsi/ginkgo/v2/ginkgo
ginkgo -v --race --trace -p --focus="[BasicPropagation] propagation testing deployment propagation testing" ./test/e2e/
- name: export logs for config test
if: always()
run: |
export ARTIFACTS_PATH=${{ github.workspace }}/karmadactl-test-logs/${{ matrix.k8s }}/config
mkdir -p $ARTIFACTS_PATH
mkdir -p $ARTIFACTS_PATH/karmada-host
kind export logs --name=karmada-host $ARTIFACTS_PATH/karmada-host
- name: upload config test logs
if: always()
uses: actions/upload-artifact@v4
with:
name: karmadactl_config_test_logs_${{ matrix.k8s }}
path: ${{ github.workspace }}/karmadactl-test-logs/${{ matrix.k8s }}/config/
2 changes: 1 addition & 1 deletion .github/workflows/dockerhub-latest-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
with:
go-version-file: go.mod
- name: Install Cosign
uses: sigstore/cosign-installer@v3.6.0
uses: sigstore/cosign-installer@v3.7.0
with:
cosign-release: 'v2.2.3'
- name: install QEMU
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dockerhub-released-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
with:
go-version-file: go.mod
- name: Install Cosign
uses: sigstore/cosign-installer@v3.6.0
uses: sigstore/cosign-installer@v3.7.0
with:
cosign-release: 'v2.2.3'
- name: install QEMU
Expand Down
Loading

0 comments on commit 30d242e

Please sign in to comment.