mirror of
https://github.com/imjasonh/krust
synced 2026-07-08 14:55:35 +00:00
implement resolve and apply
Signed-off-by: Jason Hall <jason@chainguard.dev>
This commit is contained in:
parent
3b1b7ab2ec
commit
1ed99cbe07
18 changed files with 877 additions and 11 deletions
32
tests/testdata/resolve_basic.txt
vendored
Normal file
32
tests/testdata/resolve_basic.txt
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# Test basic resolve with single YAML file and single krust:// reference
|
||||
|
||||
-- Cargo.toml --
|
||||
[package]
|
||||
name = "test-app"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
|
||||
-- src/main.rs --
|
||||
fn main() {
|
||||
println!("Hello from test-app!");
|
||||
}
|
||||
|
||||
-- deployment.yaml --
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: test-pod
|
||||
spec:
|
||||
containers:
|
||||
- name: app
|
||||
image: krust://.
|
||||
|
||||
# Resolve should build and replace reference
|
||||
env KRUST_REPO=ttl.sh/test
|
||||
exec ./krust resolve -f deployment.yaml
|
||||
stdout 'ttl.sh/test/test-app@sha256:'
|
||||
! stdout 'krust://'
|
||||
stderr 'Found 1 unique krust:// reference'
|
||||
stderr 'Building image for: krust://.'
|
||||
Loading…
Add table
Add a link
Reference in a new issue