Skip to content

Commit

Permalink
Merge branch 'master' into xinhl/kversion
Browse files Browse the repository at this point in the history
  • Loading branch information
fseldow authored Jan 24, 2025
2 parents 37b89ed + fface89 commit fd45d9f
Show file tree
Hide file tree
Showing 320 changed files with 79,296 additions and 19,070 deletions.
26 changes: 21 additions & 5 deletions .github/README-RENOVATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,21 @@ In summary, this package rule is saying it will apply auto-update without `autom

Combining these 2 package rules together is actually asking Renovate not to update `major` and `minor`, but just `patch`, `pin` and `digest`.

We configured auto-merge patch version for components `moby-runc` and `moby-containerd`. Please search `"matchPackageNames": ["moby-runc", "moby-containerd"]` in `renovate.json` for an example.

As of 01/23/2025, the PR merging policy is as follows.
| Components | Major | Minor | Patch |
| -------- | ------ | ------ | ------ |
| Runc, Containerd | Manual | Manual | Auto |
| Others | Manual | Manual | Manual |

The update of `Runc` and `Containerd` is owned by Node SIG and we have sufficient confidence to auto-merge it with our tests and PR gates. Thus it's set to `auto-merge`.
For other components, we are still relying on the owner teams to approve and merge. If there is a need to auto-merge a component, it's always configurable.

---

For more context to anyone who is interested, let's walk through a real example. Feel free to skip reading this if it has nothing to do with your task.

### (Optional context) Why not updating minor?
Using azure-cni as an example, if we enable auto updating `minor`, we will see the following PRs created by Renovate automatically at of Sep 12, 2024.
- PR1: containernetworking/azure-cni minor v1.5.32 -> v1.6.6
Expand Down Expand Up @@ -101,9 +115,10 @@ For example,
{
"matchPackageNames": ["moby-runc", "moby-containerd"],
"assignees": ["devinwong", "anujmaheshwari1", "cameronmeissner", "AlisonB319", "lilypan26", "djsly", "jason1028kr", "UtheMan", "zachary-bailey", "ganeshkumarashok"]
"reviewers": ["devinwong", "anujmaheshwari1", "cameronmeissner", "AlisonB319", "lilypan26", "djsly", "jason1028kr", "UtheMan", "zachary-bailey", "ganeshkumarashok"]
},
```
In this block, it is saying that if the package name, that a PR is updating, is one of the defined values, then assign this PR to these Github IDs.
In this block, it is saying that if the package name, that a PR is updating, is one of the defined values, then assign this PR to these Github IDs. The values in `reviewers` are the same group of people to allow them to self-approve the PR. Unfortunately JSON doesn't support variable in value so we have to provide the value strings twice for both `assignees` and `reviewers`

### Additional string operation to specific component
```
Expand Down Expand Up @@ -293,7 +308,7 @@ Depending on what kind of component you are going to onboard.
]
}
```
Please make sure you set the `renovateTag` correctly, where `registry` is always `https://mcr.microsoft.com` now, and the `name` doesn't have a leading slash `/`. As of Sept 2024, The container Images in `components.json` are all hosted in MCR and MCR is the only registry enabled in the current Renovate configuration file `renovate.json`. If there is demand for other container images registry, it will be necessary to double check if it will just work.
Please make sure you set the `renovateTag` correctly, where `registry` is always `https://mcr.microsoft.com` now, and the `name` doesn't have a leading slash `/`. As of Jan 2025, The container Images in `components.json` are all hosted in MCR and MCR is the only registry enabled in the current Renovate configuration file `renovate.json`. If there is demand for other container images registry, it will be necessary to double check if it will just work.

Fore more details, you can refer to Readme-components linked at the beginning of this document.

Expand Down Expand Up @@ -324,9 +339,10 @@ There is an example for packages `moby-runc` and `moby-containred`
{
"matchPackageNames": ["moby-runc", "moby-containerd"],
"assignees": ["devinwong"]
"reviewers": ["devinwong"]
},
```
You can follow this example to create a block and fill in the matchPackageNames with your **GitHub ID** to assign to yourself, assuming you are the owner. Note that the packageName here must be the exact name that you can find in your datasource. For example, in the datasource PMC which hosts `moby-runc` and `moby-containerd`, we are running `apt-get install moby-runc moby-containerd`. So this is the correct package name.
You can follow this example to create a block and fill in the matchPackageNames with your **GitHub ID** to assign and set reviewer to yourself, assuming you are the owner. Note that the packageName here must be the exact name that you can find in your datasource. For example, in the datasource PMC which hosts `moby-runc` and `moby-containerd`, we are running `apt-get install moby-runc moby-containerd`. So this is the correct package name.

Another example is for a container image `mcr.microsoft.com/oss/kubernetes/kube-proxy`. In this case you should fill in the matchPackageNames with packageName `oss/kubernetes/kube-proxy`. Note there is no leading slash `/`.

Expand All @@ -343,9 +359,9 @@ If your GitHub ID is placed in the `assignees` array, you are responsible for th
## What components are onboarded to Renovate for auto-update and what are not yet?
In general, if a component has the `"renovateTag": "<DO_NOT_UPDATE>"`, it means it's not monitored by Renovate and won't be updated automatically.

As of 11/12/2024,
As of 01/23/2025,
- All the container images are onboarded to Renovate for auto-update.
- PMC hosted packages, namely `runc` and `containerd`, are onboarded for auto-update.
- PMC hosted packages, namely `runc` and `containerd`, are configured as auto-merge patch version.
- OCI artifacts hosted on MAR(aka MCR) such as `kubernetes-binaries`, `azure-acr-credential-provider` and `containerd-wasm-shims` are onboarded for auto-update.
- Acs-mirror hosted packages/binaries, namely `cni-plugins`, `azure-cni`, `cri-tools`, etc., are NOT onboarded for auto-update yet. There are plans to move the acs-mirror hosted packages to MCR OCI which will be downloaded by Oras. We will wait for this transition to be completed to understand the details how to manage them.

Expand Down
13 changes: 9 additions & 4 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@
},
{
"matchPackageNames": ["moby-runc", "moby-containerd"],
"matchUpdateTypes": [
"patch"
],
"automerge": true,
"enabled": true,
"assignees": ["devinwong", "anujmaheshwari1", "cameronmeissner", "AlisonB319", "lilypan26", "djsly", "jason1028kr", "UtheMan", "zachary-bailey", "ganeshkumarashok"],
"reviewers": ["devinwong", "anujmaheshwari1", "cameronmeissner", "AlisonB319", "lilypan26", "djsly", "jason1028kr", "UtheMan", "zachary-bailey", "ganeshkumarashok"]
},
Expand All @@ -93,15 +98,15 @@
"assignees": ["mainred"],
"reviewers": ["mainred"]
},
{
"matchPackageNames": ["moby-runc", "moby-containerd"],
"extractVersion": "^v?(?<version>.+)$"
},
{
"matchDatasources": ["docker"],
"matchPackageNames": ["oss/binaries/kubernetes/kubernetes-node", "oss/binaries/kubernetes/azure-acr-credential-provider", "oss/binaries/deislabs/containerd-wasm-shims"],
"extractVersion": "^(?P<version>.*?)-[^-]*-[^-]*$"
},
{
"matchPackageNames": ["moby-runc", "moby-containerd"],
"extractVersion": "^v?(?<version>.+)$"
},
{
"matchPackageNames": ["aks/aks-gpu-cuda", "aks/aks-gpu-grid"],
"versioning": "regex:^(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)-(?<prerelease>\\d{14})$",
Expand Down
18 changes: 10 additions & 8 deletions .pipelines/.vsts-vhd-builder-release-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ pr:
pool:
name: $(AZURE_POOL_NAME)

# Some templates use POOL_NAME instead of AZURE_POOL_NAME, so set POOL_NAME here just in case.
variables:
VHD_BUILD_ID: $(Build.BuildId)
LOCATION: $(PACKER_BUILD_LOCATION)
POOL_NAME: $(AZURE_POOL_NAME)
isPR: $[eq(variables['Build.Reason'], 'PullRequest')]
isNotPR: $[ne(variables['Build.Reason'], 'PullRequest')]

parameters:
- name: build2019containerd
displayName: Build 2019 containerd
Expand Down Expand Up @@ -60,12 +68,6 @@ parameters:
type: boolean
default: False

# Some templates use POOL_NAME instead of AZURE_POOL_NAME, so set POOL_NAME here just in case.
variables:
VHD_BUILD_ID: $(Build.BuildId)
LOCATION: $(PACKER_BUILD_LOCATION)
POOL_NAME: $(AZURE_POOL_NAME)

# Use variable group "ab-windows-ame-tenant" and link it to the pipeline "AKS Windows VHD Build"
# Use variable group "ab-windows-ame-tenant" and link it to the pipeline "AKS Windows VHD Build - PR check-in gate"
# Use variable group "ab-windows-ms-tenant" and link it to the pipeline "[TEST All VHDs] AKS Windows VHD Build - Msft Tenant"
Expand All @@ -89,7 +91,7 @@ stages:
imageName: windows-2022-containerd
windowsSku: 2022-containerd
hyperVGeneration: V1
build: ${{ parameters.build2022containerd }}
build: ${{ and(eq(parameters.build2022containerd, true), eq(variables.isNotPR, true)) }}
vhddebug: ${{ parameters.vhddebug }}
dryrun: ${{ parameters.dryrun }}

Expand All @@ -111,7 +113,7 @@ stages:
imageName: windows-23H2
windowsSku: 23H2
hyperVGeneration: V1
build: ${{ parameters.build23H2 }}
build: ${{ and(eq(parameters.build23H2, true), eq(variables.isNotPR, true)) }}
vhddebug: ${{ parameters.vhddebug }}
dryrun: ${{ parameters.dryrun }}

Expand Down
16 changes: 16 additions & 0 deletions e2e/scenario_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -974,6 +974,22 @@ func Test_Ubuntu2204_ContainerdURL(t *testing.T) {
})
}

func Test_Ubuntu2204_ContainerdURL_Scriptless(t *testing.T) {
RunScenario(t, &Scenario{
Description: "tests that a node using the Ubuntu 2204 VHD with the ContainerdPackageURL override the provided URL and not the components.json containerd version",
Config: Config{
Cluster: ClusterKubenet,
VHD: config.VHDUbuntu2204Gen2Containerd,
AKSNodeConfigMutator: func(config *aksnodeconfigv1.Configuration) {
config.ContainerdConfig.ContainerdPackageUrl = "https://packages.microsoft.com/ubuntu/22.04/prod/pool/main/m/moby-containerd/moby-containerd_1.6.9+azure-ubuntu22.04u1_amd64.deb"
},
Validator: func(ctx context.Context, s *Scenario) {
ValidateInstalledPackageVersion(ctx, s, "containerd", "1.6.9")
},
},
})
}

func Test_Ubuntu2204_ContainerdHasCurrentVersion(t *testing.T) {
RunScenario(t, &Scenario{
Description: "tests that a node using an Ubuntu2204 VHD and the ContainerdVersion override bootstraps with the correct components.json containerd version and ignores the override",
Expand Down
4 changes: 2 additions & 2 deletions parts/linux/cloud-init/artifacts/components.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@
"multiArchVersionsV2": [
{
"renovateTag": "registry=https://mcr.microsoft.com, name=oss/v2/kubernetes/coredns",
"latestVersion": "v1.11.3-4"
"latestVersion": "v1.12.0-1"
},
{
"renovateTag": "registry=https://mcr.microsoft.com, name=oss/v2/kubernetes/coredns",
"latestVersion": "v1.9.4-4"
"latestVersion": "v1.9.4-5"
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion parts/linux/cloud-init/artifacts/cse_main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ fi


if [[ "${SHOULD_CONFIGURE_CUSTOM_CA_TRUST}" == "true" ]]; then
configureCustomCaCertificate || exit $ERR_UPDATE_CA_CERTS
logs_to_events "AKS.CSE.configureCustomCaCertificate" configureCustomCaCertificate || exit $ERR_UPDATE_CA_CERTS
fi

if [[ -n "${OUTBOUND_COMMAND}" ]]; then
Expand Down
Loading

0 comments on commit fd45d9f

Please sign in to comment.