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/helm/helm.cue
Guillaume de Rouville ce41d25c52 Revert kubernetes/helm packages and tests from secret to str type, needed for docs
Signed-off-by: Guillaume de Rouville <guillaume.derouville@gmail.com>
2021-06-17 03:16:28 +02:00

55 lines
1.1 KiB
CUE

package main
import (
"dagger.io/dagger"
"dagger.io/kubernetes/helm"
"dagger.io/random"
)
// 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: string @dagger(input)
// Deploy user local chart
TestHelmSimpleChart: {
suffix: random.#String & {
seed: "simple"
}
// Deploy chart
deploy: helm.#Chart & {
name: "dagger-test-helm-simple-chart-\(suffix.out)"
namespace: "dagger-test"
"kubeconfig": kubeconfig
chartSource: dagger.#Artifact
}
// Verify deployment
verify: #VerifyHelm & {
chartName: deploy.name
namespace: deploy.namespace
}
}
// Deploy remote chart
TestHelmRepoChart: {
suffix: random.#String & {
seed: "repo"
}
// Deploy chart
deploy: helm.#Chart & {
name: "dagger-test-helm-repository-\(suffix.out)"
namespace: "dagger-test"
"kubeconfig": kubeconfig
repository: "https://charts.bitnami.com/bitnami"
chart: "redis"
}
// Verify deployment
verify: #VerifyHelm & {
chartName: deploy.name
namespace: deploy.namespace
}
}