forked from containerd/containerd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request containerd#35 from katiewasnothere/merge_upstream_…
…main Update fork/master to upstream main
- Loading branch information
Showing
3,788 changed files
with
470,957 additions
and
111,894 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.github/ | ||
.dockerignore | ||
releases/ | ||
bin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// module empty-mod is an empty module that's used to help with containerd | ||
// having a circular dependency on itself through plugin modules. | ||
// | ||
// We use this module as a "replace" rule in containerd's go.mod, to prevent | ||
// relying on transitive dependencies (coming from older versions of containerd | ||
// defined on plugin go.mod). | ||
// | ||
// The replace rule forces go modules to consider the "current" version of | ||
// containerd to be the source of truth, helping us catch missing go.mod rules, | ||
// or version changes early. | ||
module empty-mod | ||
|
||
go 1.13 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: Bug report | ||
description: Create a bug report to help improve containerd | ||
labels: kind/bug | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
If you are reporting a new issue, make sure that we do not have any duplicates | ||
already open. You can ensure this by searching the issue list for this | ||
repository. If there is a duplicate, please close your issue and add a comment | ||
to the existing issue instead. | ||
Please have a look on the following tips before opening the issue: | ||
<details> | ||
* If containerd gets stuck on something and enables debug socket, `ctr pprof goroutines` | ||
dumps the golang stack of containerd, which is helpful! If containerd runs | ||
without debug socket, `kill -SIGUSR1 $(pidof containerd)` also dumps the stack | ||
as well. | ||
* If there is something about running containerd, like consuming more CPU resources, | ||
`ctr pprof` subcommands will help you to get some useful profiles. Enable debug | ||
socket makes life easier. | ||
* `ctr` can't be used for testing CRI configs, as it does not use CRI API. | ||
</details> | ||
- type: textarea | ||
attributes: | ||
label: Description | ||
description: | | ||
Briefly describe the problem you are having in a few paragraphs. | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: Steps to reproduce the issue | ||
value: | | ||
1. | ||
2. | ||
3. | ||
- type: textarea | ||
attributes: | ||
label: Describe the results you received and expected | ||
validations: | ||
required: true | ||
|
||
- type: input | ||
attributes: | ||
label: What version of containerd are you using? | ||
placeholder: $ containerd --version | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: Any other relevant information | ||
description: | | ||
runc version, CRI configuration, OS/Kernel version, etc. | ||
Use the following commands: | ||
$ runc --version | ||
$ crictl info (if you use Kubernetes) | ||
$ uname -a | ||
- type: textarea | ||
attributes: | ||
label: Show configuration if it is related to CRI plugin. | ||
placeholder: $ cat /etc/containerd/config.toml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
blank_issues_enabled: true | ||
contact_links: | ||
- name: Ask a question (GitHub Discussions) | ||
url: https://github.com/containerd/containerd/discussions | ||
about: | | ||
Please do not submit "a bug report" for asking a question. | ||
In most cases, GitHub Discussions is the best place to ask a question. | ||
If you are not sure whether you are going to report a bug or ask a question, | ||
please consider asking in GitHub Discussions first. | ||
- name: Chat with containerd users and developers | ||
url: https://slack.cncf.io/ | ||
about: CNCF slack has `#containerd` and `#containerd-dev` channels |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Feature request | ||
description: Suggest an idea for containerd | ||
labels: kind/feature | ||
body: | ||
- type: textarea | ||
attributes: | ||
label: What is the problem you're trying to solve | ||
description: | | ||
A clear and concise description of what the problem is. | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: Describe the solution you'd like | ||
description: | | ||
A clear and concise description of what you'd like to happen. | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: Additional context | ||
description: | | ||
Add any other context about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,165 @@ | ||
name: "Build volume test images" | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
push_to_project: | ||
description: "Project to build images for" | ||
required: true | ||
default: "ghcr.io/containerd" | ||
azure_windows_image_id: | ||
description: Windows image URN to deploy | ||
required: true | ||
default: MicrosoftWindowsServer:WindowsServer:2022-datacenter:20348.350.2111030009 | ||
azure_vm_size: | ||
description: Windows image builder VM size | ||
required: true | ||
default: Standard_D2s_v3 | ||
azure_location: | ||
description: The Azure region to deploy to | ||
required: true | ||
default: westeurope | ||
|
||
permissions: | ||
packages: write | ||
|
||
env: | ||
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUB_ID }} | ||
DEFAULT_ADMIN_USERNAME: azureuser | ||
SSH_OPTS: "-o ServerAliveInterval=20 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" | ||
AZURE_RESOURCE_GROUP: ctrd-test-image-build-${{ github.run_id }} | ||
|
||
jobs: | ||
images: | ||
name: "Build volume test images" | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: src/github.com/containerd/containerd | ||
|
||
steps: | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: '1.17.5' | ||
|
||
- uses: actions/checkout@v2 | ||
with: | ||
path: src/github.com/containerd/containerd | ||
|
||
- name: Set env | ||
shell: bash | ||
run: | | ||
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV | ||
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH | ||
- name: Install docker | ||
shell: bash | ||
run: | | ||
sudo apt update | ||
sudo apt install -y ca-certificates curl gnupg lsb-release | ||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg > /tmp/docker.gpg | ||
sudo gpg --yes --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg /tmp/docker.gpg | ||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | ||
sudo apt update | ||
sudo apt install -y docker-ce docker-ce-cli containerd.io jq | ||
sudo adduser $USER docker | ||
- name: Generate ssh key pair | ||
run: | | ||
mkdir -p $HOME/.ssh/ | ||
ssh-keygen -t rsa -b 4096 -C "ci@containerd.com" -f $HOME/.ssh/id_rsa -q -N "" | ||
echo "SSH_PUB_KEY=$(cat ~/.ssh/id_rsa.pub)" >> $GITHUB_ENV | ||
- name: Azure Login | ||
uses: azure/login@v1 | ||
with: | ||
creds: ${{ secrets.AZURE_CREDS }} | ||
|
||
- name: Create Azure Resource Group | ||
uses: azure/CLI@v1 | ||
with: | ||
inlinescript: | | ||
az group create -n ${{ env.AZURE_RESOURCE_GROUP }} -l ${{ github.event.inputs.azure_location }} --tags creationTimestamp=$(date +%Y-%m-%dT%T%z) | ||
- name: Create Windows Helper VM | ||
uses: azure/CLI@v1 | ||
with: | ||
inlinescript: | | ||
PASSWORD="$(/usr/bin/tr -dc "a-zA-Z0-9@#$%^&*()_+?><~\`;" < /dev/urandom | /usr/bin/head -c 24; echo '')" | ||
az vm create -n WinDockerHelper \ | ||
--admin-username ${{ env.DEFAULT_ADMIN_USERNAME }} \ | ||
--public-ip-sku Basic \ | ||
--admin-password "::add-mask::$PASSWORD" \ | ||
--image ${{ github.event.inputs.azure_windows_image_id }} \ | ||
-g ${{ env.AZURE_RESOURCE_GROUP }} \ | ||
--size ${{ github.event.inputs.azure_vm_size }} | ||
az vm open-port --resource-group ${{ env.AZURE_RESOURCE_GROUP }} --name WinDockerHelper --port 22 --priority 101 | ||
az vm open-port --resource-group ${{ env.AZURE_RESOURCE_GROUP }} --name WinDockerHelper --port 2376 --priority 102 | ||
- name: Prepare Windows image helper | ||
uses: azure/CLI@v1 | ||
with: | ||
inlinescript: | | ||
# Installs Windows features, opens SSH and Docker port | ||
az vm run-command invoke \ | ||
--command-id RunPowerShellScript \ | ||
-n WinDockerHelper \ | ||
-g ${{ env.AZURE_RESOURCE_GROUP }} \ | ||
--scripts @$GITHUB_WORKSPACE/src/github.com/containerd/containerd/script/setup/prepare_windows_docker_helper.ps1 | ||
# The prepare_windows_docker_helper.ps1 script reboots the server after enabling the Windows features | ||
# Give it a chance to reboot. Running another run-command via azure CLI should work even without this | ||
# sleep, but we want to avoid the possibility that it may run before the server reboots. | ||
sleep 30 | ||
# Enable SSH and import public key | ||
az vm run-command invoke \ | ||
--command-id RunPowerShellScript \ | ||
-n WinDockerHelper \ | ||
-g ${{ env.AZURE_RESOURCE_GROUP }} \ | ||
--scripts @$GITHUB_WORKSPACE/src/github.com/containerd/containerd/script/setup/enable_ssh_windows.ps1 \ | ||
--parameters 'SSHPublicKey=${{ env.SSH_PUB_KEY }}' | ||
- name: Get Windows Helper IPs | ||
uses: azure/CLI@v1 | ||
with: | ||
inlinescript: | | ||
VM_DETAILS=$(az vm show -d -g ${{ env.AZURE_RESOURCE_GROUP }} -n WinDockerHelper -o json) | ||
echo "PUBLIC_IP=$(echo $VM_DETAILS | jq -r .publicIps)" >> $GITHUB_ENV | ||
echo "PRIVATE_IP=$(echo $VM_DETAILS | jq -r .privateIps)" >> $GITHUB_ENV | ||
- name: Enable Docker TLS | ||
shell: bash | ||
run: | | ||
scp -i $HOME/.ssh/id_rsa ${{ env.SSH_OPTS }} $GITHUB_WORKSPACE/src/github.com/containerd/containerd/script/setup/enable_docker_tls_on_windows.ps1 azureuser@${{ env.PUBLIC_IP }}:/enable_docker_tls_on_windows.ps1 | ||
ssh -i $HOME/.ssh/id_rsa ${{ env.SSH_OPTS }} azureuser@${{ env.PUBLIC_IP }} "powershell.exe -command { C:/enable_docker_tls_on_windows.ps1 -IPAddresses ${{ env.PUBLIC_IP }},${{ env.PRIVATE_IP }} }" | ||
- name: Fetch client certificate and key | ||
shell: bash | ||
run: | | ||
mkdir -p $HOME/.docker | ||
scp -i $HOME/.ssh/id_rsa ${{ env.SSH_OPTS }} azureuser@${{ env.PUBLIC_IP }}:/Users/azureuser/.docker/ca.pem $HOME/.docker/ca.pem | ||
scp -i $HOME/.ssh/id_rsa ${{ env.SSH_OPTS }} azureuser@${{ env.PUBLIC_IP }}:/Users/azureuser/.docker/cert.pem $HOME/.docker/cert.pem | ||
scp -i $HOME/.ssh/id_rsa ${{ env.SSH_OPTS }} azureuser@${{ env.PUBLIC_IP }}:/Users/azureuser/.docker/key.pem $HOME/.docker/key.pem | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push images | ||
shell: bash | ||
run: | | ||
make -C $GITHUB_WORKSPACE/src/github.com/containerd/containerd/integration/images/volume-copy-up setup-buildx | ||
make -C $GITHUB_WORKSPACE/src/github.com/containerd/containerd/integration/images/volume-copy-up build-registry PROJ=${{ github.event.inputs.push_to_project }} REMOTE_DOCKER_URL=${{ env.PUBLIC_IP }}:2376 | ||
make -C $GITHUB_WORKSPACE/src/github.com/containerd/containerd/integration/images/volume-copy-up push-manifest PROJ=${{ github.event.inputs.push_to_project }} REMOTE_DOCKER_URL=${{ env.PUBLIC_IP }}:2376 | ||
make -C $GITHUB_WORKSPACE/src/github.com/containerd/containerd/integration/images/volume-ownership build-registry PROJ=${{ github.event.inputs.push_to_project }} REMOTE_DOCKER_URL=${{ env.PUBLIC_IP }}:2376 | ||
make -C $GITHUB_WORKSPACE/src/github.com/containerd/containerd/integration/images/volume-ownership push-manifest PROJ=${{ github.event.inputs.push_to_project }} REMOTE_DOCKER_URL=${{ env.PUBLIC_IP }}:2376 | ||
- name: Cleanup resources | ||
if: always() | ||
uses: azure/CLI@v1 | ||
with: | ||
inlinescript: | | ||
az group delete -g ${{ env.AZURE_RESOURCE_GROUP }} --yes |
Oops, something went wrong.