Skip to content

Commit ae12e8b

Browse files
authored
chore: backport kubefleet/main to Azure/fleet (#1332)
2 parents dba83bf + 950f653 commit ae12e8b

33 files changed

Lines changed: 160 additions & 94 deletions

‎.github/.copilot/breadcrumbs/2025-01-06-2200-workgenerator-controller-interface-refactor.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ The resource snapshot resolver is now fully aligned with the interface refactori
189189
### What Was Done
190190
1. **Fixed Missing Imports**: Added required imports to `binding_resolver.go`
191191
- Added `"fmt"` import for error formatting
192-
- Added `"github.com/kubefleet-dev/kubefleet/pkg/scheduler/queue"` import for `queue.PlacementKey` type
192+
- Added `"go.goms.io/fleet/pkg/scheduler/queue"` import for `queue.PlacementKey` type
193193

194194
2. **Compilation Success**: Fixed all compilation errors
195195
- No more "undefined: queue" errors
@@ -204,7 +204,7 @@ The resource snapshot resolver is now fully aligned with the interface refactori
204204
### File Changes Made
205205
- `/Users/ryanzhang/Workspace/github/kubefleet/pkg/utils/controller/binding_resolver.go`
206206
- Added missing `"fmt"` import
207-
- Added missing `"github.com/kubefleet-dev/kubefleet/pkg/scheduler/queue"` import
207+
- Added missing `"go.goms.io/fleet/pkg/scheduler/queue"` import
208208

209209
### Status
210210
✅ **ALL CONTROLLER UTILITY TESTS PASSING**: No test failures found

‎.github/actionlint.yaml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
self-hosted-runner:
2+
labels:
3+
- oracle-vm-16cpu-64gb-x86-64
4+
- 1ES.Pool=1es-aks-fleet-pool-ubuntu
5+
- 1ES.Pool=1es-aks-fleet-pool-ubuntu-arm64

‎.github/workflows/build-publish-mcr.yml‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,20 @@ jobs:
3737
# set the image version
3838
RELEASE_TAG=${{ inputs.releaseTag }}
3939
if [ -z "$RELEASE_TAG" ]; then
40-
RELEASE_TAG=`git describe --tags $(git rev-list --tags --max-count=1)`
40+
RELEASE_TAG=$(git describe --tags "$(git rev-list --tags --max-count=1)")
4141
echo "The user input release tag is empty, will use the latest tag $RELEASE_TAG."
4242
fi
43-
echo "release_tag=$RELEASE_TAG" >> $GITHUB_OUTPUT
43+
echo "release_tag=$RELEASE_TAG" >> "$GITHUB_OUTPUT"
4444
4545
# Strip 'v' prefix from RELEASE_TAG for helm chart version
4646
ARC_HELMCHART_VERSION="${RELEASE_TAG#v}"
47-
echo "arc_helmchart_version=$ARC_HELMCHART_VERSION" >> $GITHUB_OUTPUT
47+
echo "arc_helmchart_version=$ARC_HELMCHART_VERSION" >> "$GITHUB_OUTPUT"
4848
echo "Using Arc Helm Chart version: $ARC_HELMCHART_VERSION"
4949
5050
# Fetch the latest fleet-networking version
5151
# NOTE: The fleet-networking image must be cut and pushed to MCR first before retrieving this version
5252
FLEET_NETWORKING_VERSION="${FLEET_NETWORKING_VERSION:-$(curl "https://api.github.com/repos/Azure/fleet-networking/tags" | jq -r '.[0].name')}"
53-
echo "fleet_networking_version=$FLEET_NETWORKING_VERSION" >> $GITHUB_OUTPUT
53+
echo "fleet_networking_version=$FLEET_NETWORKING_VERSION" >> "$GITHUB_OUTPUT"
5454
echo "Using Fleet Networking version: $FLEET_NETWORKING_VERSION"
5555
5656
# NOTE: As exporting a variable from a secret is not possible, the shared variable registry obtained
@@ -150,9 +150,9 @@ jobs:
150150
run: |
151151
sudo groupadd docker || true
152152
echo "Adding $USER to the docker group"
153-
sudo usermod -aG docker $USER
153+
sudo usermod -aG docker "$USER"
154154
newgrp docker
155-
sudo setfacl --modify user:$USER:rw /var/run/docker.sock
155+
sudo setfacl --modify "user:$USER:rw" /var/run/docker.sock
156156
- name: 'Login the ACR'
157157
# Note (chenyu1): must not use root privileges; the system seems to have some trouble
158158
# retrieving credentials when sudo is used.

‎.github/workflows/chart.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
group: helm-chart-publish-gh-pages
4040
cancel-in-progress: false
4141
steps:
42-
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
42+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
4343
with:
4444
submodules: true
4545
fetch-depth: 0
@@ -56,7 +56,7 @@ jobs:
5656
runs-on: ubuntu-latest
5757
steps:
5858
- name: Checkout code
59-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
59+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
6060

6161
- name: Login to GitHub Container Registry
6262
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0

‎.github/workflows/ci.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,17 @@ jobs:
4141
go-version: ${{ env.GO_VERSION }}
4242

4343
- name: Check out code into the Go module directory
44-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
44+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
4545

4646
- name: Set up Ginkgo CLI
4747
run: |
4848
go install github.com/onsi/ginkgo/v2/ginkgo@v2.23.4
4949
5050
- name: Prepare necessary environment variables
5151
run: |
52-
echo "CGO_ENABLED=1" >> $GITHUB_ENV
52+
echo "CGO_ENABLED=1" >> "$GITHUB_ENV"
5353
KUBEBUILDER_ASSETS=$(make --silent kubebuilder-assets-path)
54-
echo "KUBEBUILDER_ASSETS="$KUBEBUILDER_ASSETS"" >> $GITHUB_ENV
54+
echo "KUBEBUILDER_ASSETS=$KUBEBUILDER_ASSETS" >> "$GITHUB_ENV"
5555
5656
# Certain tests that require special setup (e.g., those that should be run with Ginkgo CLI only) will
5757
# be skipped in this step.
@@ -116,7 +116,7 @@ jobs:
116116
go-version: ${{ env.GO_VERSION }}
117117

118118
- name: Check out code into the Go module directory
119-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
119+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
120120

121121
- name: Move Docker data directory to /mnt
122122
# The default storage device on GitHub-hosted runners is running low during e2e tests.

‎.github/workflows/code-lint.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
go-version: ${{ env.GO_VERSION }}
4343

4444
- name: Checkout
45-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
45+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
4646
with:
4747
submodules: true
4848

@@ -63,7 +63,7 @@ jobs:
6363
go-version: ${{ env.GO_VERSION }}
6464

6565
- name: Check out code into the Go module directory
66-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
66+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
6767

6868
- name: golangci-lint
6969
run: make lint
@@ -76,7 +76,7 @@ jobs:
7676

7777
steps:
7878
- name: Check out code
79-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
79+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
8080

8181
- name: Set up Helm
8282
uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2 # v5

‎.github/workflows/codeql-analysis.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838

3939
steps:
4040
- name: Checkout repository
41-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
41+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
4242

4343
# Initializes the CodeQL tools for scanning.
4444
- name: Initialize CodeQL

‎.github/workflows/codespell.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
with:
1717
egress-policy: audit
1818

19-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4.1.7
19+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v4.1.7
2020
- uses: codespell-project/actions-codespell@8f01853be192eb0f849a5c7d721450e7a467c579 # master
2121
with:
2222
check_filenames: true

‎.github/workflows/markdown-lint.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
markdown-link-check:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
13+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
1414
- uses: tcort/github-action-markdown-link-check@e7c7a18363c842693fadde5d41a3bd3573a7a225 # v1
1515
with:
1616
# this will only show errors in the output

‎.github/workflows/publish-image.yml‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ on:
44
push:
55
branches:
66
- main
7-
create:
8-
# Publish semver tags as releases.
97
tags: [ 'v*.*.*' ]
108

119
permissions:
@@ -23,19 +21,19 @@ env:
2321

2422
jobs:
2523
export-registry:
26-
runs-on: ubuntu-20.04
24+
runs-on: ubuntu-latest
2725
outputs:
2826
registry: ${{ steps.export.outputs.registry }}
2927
steps:
3028
- id: export
3129
run: |
3230
# registry must be in lowercase
33-
echo "registry=$(echo "${{ env.REGISTRY }}/${{ github.repository }}" | tr [:upper:] [:lower:])" >> $GITHUB_OUTPUT
31+
echo "registry=$(echo "${{ env.REGISTRY }}/${{ github.repository }}" | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT"
3432
publish-images:
3533
needs: export-registry
3634
env:
3735
REGISTRY: ${{ needs.export-registry.outputs.registry }}
38-
runs-on: ubuntu-20.04
36+
runs-on: ubuntu-latest
3937
steps:
4038
- uses: actions/checkout@v6
4139
with:
@@ -44,9 +42,11 @@ jobs:
4442
- name: Set image version for a new release
4543
if: startsWith(github.ref, 'refs/tags/')
4644
run: |
47-
echo "HUB_AGENT_IMAGE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
48-
echo "MEMBER_AGENT_IMAGE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
49-
echo "REFRESH_TOKEN_IMAGE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
45+
{
46+
echo "HUB_AGENT_IMAGE_VERSION=${GITHUB_REF#refs/tags/}"
47+
echo "MEMBER_AGENT_IMAGE_VERSION=${GITHUB_REF#refs/tags/}"
48+
echo "REFRESH_TOKEN_IMAGE_VERSION=${GITHUB_REF#refs/tags/}"
49+
} >> "$GITHUB_ENV"
5050
- name: Login to ${{ env.REGISTRY }}
5151
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef
5252
with:

0 commit comments

Comments
 (0)