This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
dagger/tests/stdlib/kubernetes/kustomize/kustomize.cue
Tom Chauveau 253c1ce3f7 feat(kubernetes): add kustomize generation to kubernetes stdlib package
test(kubernetes): add test for kustomize

Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-04-30 19:46:32 +02:00

33 lines
523 B
CUE

package kustomize
import (
"encoding/yaml"
"dagger.io/dagger"
"dagger.io/kubernetes/kustomize"
)
TestKustomize: {
testdata: dagger.#Artifact
// Run Kustomize
kustom: kustomize.#Kustomize & {
source: testdata
kustomization: yaml.Marshal({
resources: ["deployment.yaml", "pod.yaml"]
images: [{
name: "nginx"
newTag: "v1"
}]
replicas: [{
name: "nginx-deployment"
count: 2
}]
})
}
// Verify kustomization generation
verify: #VerifyKustomize & {
source: kustom
}
}