Skip to content

Commit

Permalink
Hotfix docker CRI support (#1349)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff-mccoy authored Feb 10, 2023
1 parent b3d8067 commit 42250fd
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 7 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/test-minikube.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Test Minikube (Docker) Cluster
on:
pull_request:
paths-ignore:
- "**.md"
- "**.jpg"
- "**.png"
- "**.gif"
- "**.svg"
- "adr/**"
- "docs/**"
- "package.json"
- "package-lock.json"
- "CODEOWNERS"

# Abort prior jobs in the same workflow / PR
concurrency:
group: e2e-minikube-${{ github.ref }}
cancel-in-progress: true

jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup golang
uses: ./.github/actions/golang

- name: Setup NodeJS
uses: ./.github/actions/node

- name: Build binary and zarf packages
uses: ./.github/actions/packages

- name: Setup Minikube
run: minikube start --driver=docker

- name: Run tests
run: make test-e2e ARCH=amd64

- name: Save logs
if: always()
uses: ./.github/actions/save-logs
4 changes: 2 additions & 2 deletions examples/flux-test/podinfo-source.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ metadata:
spec:
interval: 30s
ref:
tag: 6.1.6
# Currently the Zarf Agent can only mutate urls that end in ".git"
tag: 6.3.3
# Currently the Zarf Agent can only mutate urls that are proper URIs (i.e. ssh://host/repo.git)
url: https://github.com/stefanprodan/podinfo.git
2 changes: 1 addition & 1 deletion examples/flux-test/zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ components:
repos:
- https://github.com/stefanprodan/podinfo.git
images:
- ghcr.io/stefanprodan/podinfo:6.1.6
- ghcr.io/stefanprodan/podinfo:6.3.3
6 changes: 3 additions & 3 deletions src/injector/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ fn start_seed_registry() {
// on Content-Length, we respond the same as a GET
accept!(
request,
"application/vnd.oci.image.manifest.v1+json" => {
"application/vnd.docker.distribution.manifest.v2+json" => {
handle_get_manifest(&root)
},
"*/*" => Response::empty_406()
Expand All @@ -130,7 +130,7 @@ fn start_seed_registry() {
// on Content-Length, we respond the same as a GET
accept!(
request,
"application/vnd.oci.image.manifest.v1+json" => {
"application/vnd.docker.distribution.manifest.v2+json" => {
handle_get_manifest(&root)
},
"*/*" => Response::empty_406()
Expand Down Expand Up @@ -164,7 +164,7 @@ fn handle_get_manifest(root: &Path) -> Response {
.unwrap()
.to_owned();
let file = File::open(&root.join("blobs").join("sha256").join(&sha_manifest)).unwrap();
Response::from_file("application/vnd.oci.image.manifest.v1+json", file)
Response::from_file("application/vnd.docker.distribution.manifest.v2+json", file)
.with_additional_header(
"Docker-Content-Digest",
format!("sha256:{}", sha_manifest.to_owned()),
Expand Down
2 changes: 1 addition & 1 deletion zarf-config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
agent_image = 'agent:local'

# Tag for the zarf injector binary to use
injector_version = 'pr-948-e699899'
injector_version = '2023-02-09'

0 comments on commit 42250fd

Please sign in to comment.