tests(stdlib/k8s/helm): test basic helm chart
tests(stdlib/k8s/helm): add verification style(tests/): rename helper into verify to confirm that deployments works Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
This commit is contained in:
@@ -13,11 +13,11 @@ import (
|
||||
// Helm deployment name
|
||||
name: string
|
||||
|
||||
// Helm chart to install
|
||||
chart: dagger.#Artifact
|
||||
// Helm chart to install from source
|
||||
chartSource: dagger.#Artifact
|
||||
|
||||
// Helm chart to install inlined
|
||||
chartInline?: string
|
||||
// Helm chart to install from repository
|
||||
chart?: string
|
||||
|
||||
// Helm chart repository (defaults to stable)
|
||||
repository: *"https://charts.helm.sh/stable" | string
|
||||
@@ -89,12 +89,18 @@ import (
|
||||
content: kubeconfig
|
||||
mode: 0o600
|
||||
},
|
||||
if chartInline != _|_ {
|
||||
if chart != _|_ {
|
||||
op.#WriteFile & {
|
||||
dest: "/helm/chart"
|
||||
content: chart
|
||||
}
|
||||
},
|
||||
if (values & string) != _|_ {
|
||||
op.#WriteFile & {
|
||||
dest: "/helm/values.yaml"
|
||||
content: values
|
||||
}
|
||||
},
|
||||
op.#Exec & {
|
||||
always: true
|
||||
args: [
|
||||
@@ -117,11 +123,8 @@ import (
|
||||
HELM_ATOMIC: strconv.FormatBool(atomic)
|
||||
}
|
||||
mount: {
|
||||
if (values & string) != _|_ {
|
||||
"/helm/values.yaml": values
|
||||
}
|
||||
if chartInline == _|_ {
|
||||
"/helm/chart": from: chart
|
||||
if chartSource != _|_ && chart == _|_ {
|
||||
"/helm/chart": from: chartSource
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user