Update helm and kubernetes tests to use new dagger.#Secret definition

Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
This commit is contained in:
Tom Chauveau
2021-06-03 16:28:03 +02:00
parent ce65a65ede
commit 2c6e67cb7d
7 changed files with 42 additions and 54 deletions

View File

@@ -3,19 +3,12 @@ package kubernetes
import (
"encoding/yaml"
"dagger.io/dagger"
"dagger.io/file"
"dagger.io/kubernetes"
)
// We assume that a kinD cluster is running locally
// To deploy a local KinD cluster, follow this link : https://kind.sigs.k8s.io/docs/user/quick-start/
kubeconfig: dagger.#Artifact
// Retrive kubeconfig
config: file.#Read & {
filename: "config"
from: kubeconfig
}
kubeconfig: dagger.#Secret @dagger(input)
TestKubeApply: {
// Pod spec
@@ -34,9 +27,9 @@ TestKubeApply: {
// Apply deployment
apply: kubernetes.#Apply & {
kubeconfig: config.contents
namespace: "dagger-test"
manifest: yaml.Marshal(kubeSrc)
"kubeconfig": kubeconfig
namespace: "dagger-test"
manifest: yaml.Marshal(kubeSrc)
}
// Verify deployment