Skip to content

Commit 5576107

Browse files
committed
move oci-distribution out of krustlet
Signed-off-by: Matthew Fisher <[email protected]>
1 parent 94ab1f0 commit 5576107

File tree

198 files changed

+807
-31702
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

198 files changed

+807
-31702
lines changed

.cargo/config

-5
This file was deleted.

.github/workflows/build.yml

+3-81
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
branches:
55
- main
66
pull_request: {}
7+
78
jobs:
89
build:
910
runs-on: ${{ matrix.config.os }}
@@ -61,7 +62,7 @@ jobs:
6162
cd /tmp
6263
git clone https://github.com/openssl/openssl
6364
cd openssl
64-
git checkout OpenSSL_1_1_1h
65+
git checkout OpenSSL_1_1_1l
6566
sudo mkdir -p $OPENSSL_DIR
6667
./Configure linux-aarch64 --prefix=$OPENSSL_DIR --openssldir=$OPENSSL_DIR shared
6768
make CC=aarch64-linux-gnu-gcc
@@ -71,6 +72,7 @@ jobs:
7172
run: |
7273
just build ${{ matrix.config.args }}
7374
just test
75+
7476
windows-build:
7577
runs-on: windows-latest
7678
defaults:
@@ -89,85 +91,6 @@ jobs:
8991
run: |
9092
just --justfile justfile-windows build
9193
just --justfile justfile-windows test
92-
windows-e2e:
93-
env:
94-
# Because we are on a shared build machine, we need to use a different directory than the default homedir
95-
KRUSTLET_DATA_DIR: ".krustlet"
96-
CONFIG_DIR: '.krustlet\config'
97-
runs-on: [self-hosted, windows, x64]
98-
steps:
99-
- uses: actions/checkout@v2
100-
- uses: engineerd/[email protected]
101-
with:
102-
name: just.exe
103-
url: "https://github.com/casey/just/releases/download/v0.9.4/just-v0.9.4-x86_64-pc-windows-msvc.zip"
104-
pathInArchive: just.exe
105-
- uses: engineerd/[email protected]
106-
with:
107-
name: kind.exe
108-
url: "https://kind.sigs.k8s.io/dl/v0.11.1/kind-windows-amd64"
109-
- name: Ensure Docker is running
110-
run: .\tests\windows\ensure-docker.ps1
111-
- name: Setup kind cluster
112-
run: kind create cluster --config .\tests\windows\kind-config.yaml --name kind-${{ github.run_id }}
113-
# Because Windows uses rustls, it can't use a bare IP address. This
114-
# switches the kubeconfig file to use localhost instead
115-
- name: Modify kubeconfig
116-
run: |
117-
kubectl config view -o jsonpath='{.clusters[?(@.name == \"kind-kind-${{ github.run_id }}\")].cluster.server}' | % {$_.replace("127.0.0.1", "localhost")} | % {kubectl config set clusters.kind-kind-${{ github.run_id }}.server $_}
118-
- name: Get NODE_IP
119-
run: |
120-
$addr = (Get-NetIPAddress -AddressFamily IPV4 -InterfaceAlias 'vEthernet (WSL)').IPAddress
121-
echo "KRUSTLET_NODE_IP=$addr" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
122-
- name: Run e2e tests (full)
123-
if: ${{ github.event_name == 'push' }}
124-
env:
125-
KRUSTLET_TEST_ENV: "ci"
126-
KRUSTLET_E2E_IMAGE_PULL_SECRET: ${{ secrets.KRUSTLET_E2E_IMAGE_PULL_SECRET }}
127-
KRUSTLET_NODE_IP: ${{ env.KRUSTLET_NODE_IP }}
128-
run: just --justfile justfile-windows test-e2e-standalone
129-
- name: Run e2e tests (PR)
130-
if: ${{ github.event_name == 'pull_request' }}
131-
run: just --justfile justfile-windows test-e2e-standalone
132-
- uses: actions/upload-artifact@v2
133-
if: ${{ always() }}
134-
with:
135-
name: e2e-logs-windows
136-
path: oneclick-logs/
137-
- name: Cleanup kind cluster
138-
if: ${{ always() }}
139-
run: kind delete cluster --name kind-${{ github.run_id }}
140-
e2e:
141-
runs-on: ubuntu-latest
142-
steps:
143-
- uses: actions/checkout@v2
144-
- uses: engineerd/[email protected]
145-
with:
146-
version: "v0.11.1"
147-
- uses: engineerd/[email protected]
148-
with:
149-
name: just
150-
url: https://github.com/casey/just/releases/download/v0.5.11/just-v0.5.11-x86_64-unknown-linux-musl.tar.gz
151-
pathInArchive: just
152-
- name: Get NODE_IP
153-
run: echo "KRUSTLET_NODE_IP=$(ip addr ls eth0 | awk '/inet / {split($2, ary, /\//); print ary[1]}')" >> $GITHUB_ENV
154-
- name: Apply RBAC rules for CSI tests
155-
run: kubectl apply -f tests/csi/rbac.yaml
156-
- name: Run e2e tests (full)
157-
if: ${{ github.event_name == 'push' }}
158-
env:
159-
KRUSTLET_TEST_ENV: "ci"
160-
KRUSTLET_E2E_IMAGE_PULL_SECRET: ${{ secrets.KRUSTLET_E2E_IMAGE_PULL_SECRET }}
161-
KRUSTLET_NODE_IP: ${{ env.KRUSTLET_NODE_IP }}
162-
run: just test-e2e-standalone
163-
- name: Run e2e tests (PR)
164-
if: ${{ github.event_name == 'pull_request' }}
165-
run: just test-e2e-standalone
166-
- uses: actions/upload-artifact@v2
167-
if: ${{ always() }}
168-
with:
169-
name: e2e-logs
170-
path: oneclick-logs/
17194
17295
cargo-deny:
17396
name: Run cargo deny
@@ -177,7 +100,6 @@ jobs:
177100
checks:
178101
- advisories
179102
- bans licenses sources
180-
181103
steps:
182104
- uses: actions/checkout@v2
183105
- uses: EmbarkStudios/cargo-deny-action@v1

.github/workflows/daily_security.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/[email protected]
12-
- uses: actions-rs/audit-check@v1.2.0
12+
- uses: actions-rs/audit-check@v1
1313
with:
1414
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

-137
Original file line numberDiff line numberDiff line change
@@ -1,150 +1,13 @@
11
name: release
22
on:
33
push:
4-
branches:
5-
- main
64
tags:
75
- "v*"
86
jobs:
9-
build:
10-
name: build release assets
11-
runs-on: ${{ matrix.config.os }}
12-
env: ${{ matrix.config.env }}
13-
strategy:
14-
matrix:
15-
config:
16-
- {
17-
os: "ubuntu-latest",
18-
arch: "amd64",
19-
args: "--release",
20-
targetDir: "target/release",
21-
extension: "",
22-
env: {},
23-
}
24-
- {
25-
os: "ubuntu-latest",
26-
arch: "aarch64",
27-
args: "--release --target aarch64-unknown-linux-gnu",
28-
targetDir: "target/aarch64-unknown-linux-gnu/release",
29-
extension: "",
30-
env: { OPENSSL_DIR: "/usr/local/openssl-aarch64" },
31-
}
32-
- {
33-
os: "macos-latest",
34-
arch: "amd64",
35-
args: "--release",
36-
targetDir: "target/release",
37-
extension: "",
38-
env: {},
39-
}
40-
- {
41-
os: "windows-latest",
42-
arch: "amd64",
43-
args: "--release --no-default-features --features rustls-tls",
44-
targetDir: "target/release",
45-
extension: ".exe",
46-
env: {},
47-
}
48-
steps:
49-
- uses: actions/checkout@v2
50-
51-
- name: set the release version (tag)
52-
if: startsWith(github.ref, 'refs/tags/v')
53-
shell: bash
54-
run: echo "RELEASE_VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
55-
56-
- name: set the release version (main)
57-
if: github.ref == 'refs/heads/main'
58-
shell: bash
59-
run: echo "RELEASE_VERSION=canary" >> $GITHUB_ENV
60-
61-
- name: lowercase the runner OS name
62-
shell: bash
63-
run: |
64-
OS=$(echo "${{ runner.os }}" | tr '[:upper:]' '[:lower:]')
65-
echo "RUNNER_OS=${OS}" >> $GITHUB_ENV
66-
67-
# hack(bacongobbler): install rustfmt to work around darwin toolchain issues
68-
- name: "(macOS) install dev tools"
69-
if: runner.os == 'macOS'
70-
run: |
71-
rustup component add rustfmt --toolchain stable-x86_64-apple-darwin
72-
rustup component add clippy --toolchain stable-x86_64-apple-darwin
73-
rustup update stable
74-
75-
- name: setup for cross-compile builds
76-
if: matrix.config.arch == 'aarch64'
77-
run: |
78-
sudo apt install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
79-
cd /tmp
80-
git clone https://github.com/openssl/openssl
81-
cd openssl
82-
git checkout OpenSSL_1_1_1h
83-
sudo mkdir -p $OPENSSL_DIR
84-
./Configure linux-aarch64 --prefix=$OPENSSL_DIR --openssldir=$OPENSSL_DIR shared
85-
make CC=aarch64-linux-gnu-gcc
86-
sudo make install
87-
rustup target add aarch64-unknown-linux-gnu
88-
89-
- name: build release
90-
uses: actions-rs/cargo@v1
91-
with:
92-
command: build
93-
args: ${{ matrix.config.args }}
94-
95-
- name: package release assets
96-
shell: bash
97-
run: |
98-
mkdir _dist
99-
cp README.md LICENSE ${{ matrix.config.targetDir }}/krustlet-wasi${{ matrix.config.extension }} _dist/
100-
cd _dist
101-
tar czf krustlet-${{ env.RELEASE_VERSION }}-${{ env.RUNNER_OS }}-${{ matrix.config.arch }}.tar.gz README.md LICENSE krustlet-wasi${{ matrix.config.extension }}
102-
103-
- uses: actions/upload-artifact@v1
104-
with:
105-
name: krustlet
106-
path: _dist/krustlet-${{ env.RELEASE_VERSION }}-${{ env.RUNNER_OS }}-${{ matrix.config.arch }}.tar.gz
1077
publish:
108-
name: publish release assets
109-
runs-on: ubuntu-latest
110-
needs: build
111-
steps:
112-
- name: set the release version
113-
if: startsWith(github.ref, 'refs/tags/v')
114-
run: echo "RELEASE_VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
115-
- name: set the release version
116-
if: github.ref == 'refs/heads/main'
117-
run: echo "RELEASE_VERSION=canary" >> $GITHUB_ENV
118-
- name: download release assets
119-
uses: actions/download-artifact@v1
120-
with:
121-
name: krustlet
122-
- name: generate checksums
123-
run: |
124-
cd krustlet
125-
sha256sum * > checksums-${{ env.RELEASE_VERSION }}.txt
126-
- name: upload to azure
127-
uses: bacongobbler/azure-blob-storage-upload@main
128-
with:
129-
source_dir: krustlet
130-
container_name: releases
131-
connection_string: ${{ secrets.AzureStorageConnectionString }}
132-
sync: false
133-
crates:
1348
name: publish to crates.io
1359
runs-on: ubuntu-latest
136-
needs: publish
137-
if: startsWith(github.ref, 'refs/tags/v')
13810
steps:
13911
- uses: actions/checkout@v2
140-
# OCI distribution needs to go first because kubelet has a dependency on it
14112
- name: publish oci-distribution to crates.io
142-
working-directory: ./crates/oci-distribution
143-
run: cargo publish --token ${{ secrets.CargoToken }}
144-
continue-on-error: true
145-
- name: wait for oci-distribution to be published
146-
run: sleep 60
147-
- name: publish kubelet to crates.io
148-
working-directory: ./crates/kubelet
14913
run: cargo publish --token ${{ secrets.CargoToken }}
150-
continue-on-error: true

.github/workflows/test_binaries.yaml

-55
This file was deleted.

CONTRIBUTING.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ attest that you have the right to contribute that code. This is done with the
1111

1212
## Pull Request Management
1313

14-
All code that is contributed to Krustlet must go through the Pull Request (PR)
15-
process. To contribute a PR, fork this project, create a new branch, make
16-
changes on that branch, and then use GitHub to open a pull request with your
17-
changes.
14+
All code that is contributed to oci-distribution must go through the Pull
15+
Request (PR) process. To contribute a PR, fork this project, create a new
16+
branch, make changes on that branch, and then use GitHub to open a pull request
17+
with your changes.
1818

1919
Every PR must be reviewed by at least one Core Maintainer of the project. Once
2020
a PR has been marked "Approved" by a Core Maintainer (and no other core

0 commit comments

Comments
 (0)