Update documentation

Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
This commit is contained in:
Tom Chauveau 2021-09-22 19:11:35 +02:00
parent 56083ed3d0
commit 7991991a3c
No known key found for this signature in database
GPG Key ID: 3C9847D981AAC1BF
5 changed files with 14 additions and 11 deletions

View File

@ -37,7 +37,7 @@ Apply Kubernetes resources
|*url* | `*null \| string` |Kubernetes manifest url to deploy remote configuration | |*url* | `*null \| string` |Kubernetes manifest url to deploy remote configuration |
|*namespace* | `*"default" \| string` |Kubernetes Namespace to deploy to | |*namespace* | `*"default" \| string` |Kubernetes Namespace to deploy to |
|*version* | `*"v1.19.9" \| string` |Version of kubectl client | |*version* | `*"v1.19.9" \| string` |Version of kubectl client |
|*kubeconfig* | `string` |Kube config file | |*kubeconfig* | `dagger.#Secret` |Kube config file |
### kubernetes.#Resources Outputs ### kubernetes.#Resources Outputs

View File

@ -19,12 +19,15 @@ Install a Helm chart
| Name | Type | Description | | Name | Type | Description |
| ------------- |:-------------: |:-------------: | | ------------- |:-------------: |:-------------: |
|*name* | `string` |Helm deployment name | |*name* | `string` |Helm deployment name |
|*chart* | `*null \| string` |Helm chart to install from repository |
|*repository* | `*null \| string` |Helm chart repository |
|*values* | `*null \| string` |Helm values (either a YAML string or a Cue structure) |
|*namespace* | `string` |Kubernetes Namespace to deploy to | |*namespace* | `string` |Kubernetes Namespace to deploy to |
|*action* | `*"installOrUpgrade" \| "install" \| "upgrade"` |Helm action to apply | |*action* | `*"installOrUpgrade" \| "install" \| "upgrade"` |Helm action to apply |
|*timeout* | `*"5m" \| string` |time to wait for any individual Kubernetes operation (like Jobs for hooks) | |*timeout* | `*"5m" \| string` |time to wait for any individual Kubernetes operation (like Jobs for hooks) |
|*wait* | `*true \| bool` |if set, will wait until all Pods, PVCs, Services, and minimum number of Pods of a Deployment, StatefulSet, or ReplicaSet are in a ready state before marking the release as successful. It will wait for as long as timeout | |*wait* | `*true \| bool` |if set, will wait until all Pods, PVCs, Services, and minimum number of Pods of a Deployment, StatefulSet, or ReplicaSet are in a ready state before marking the release as successful. It will wait for as long as timeout |
|*atomic* | `*true \| bool` |if set, installation process purges chart on fail. The wait option will be set automatically if atomic is used | |*atomic* | `*true \| bool` |if set, installation process purges chart on fail. The wait option will be set automatically if atomic is used |
|*kubeconfig* | `string` |Kube config file | |*kubeconfig* | `dagger.#Secret` |Kube config file |
|*version* | `*"3.5.2" \| string` |Helm version | |*version* | `*"3.5.2" \| string` |Helm version |
|*kubectlVersion* | `*"v1.19.9" \| string` |Kubectl version | |*kubectlVersion* | `*"v1.19.9" \| string` |Kubectl version |

View File

@ -22,10 +22,10 @@ import (
chart: dagger.#Input & {*null | string} chart: dagger.#Input & {*null | string}
// Helm chart repository // Helm chart repository
repository: dagger.#Input & {string} repository: dagger.#Input & {*null | string}
// Helm values (either a YAML string or a Cue structure) // Helm values (either a YAML string or a Cue structure)
values: dagger.#Input & {string} values: dagger.#Input & {*null | string}
// Kubernetes Namespace to deploy to // Kubernetes Namespace to deploy to
namespace: dagger.#Input & {string} namespace: dagger.#Input & {string}
@ -95,13 +95,13 @@ import (
} }
}, },
if chart != _|_ { if chart != null {
op.#WriteFile & { op.#WriteFile & {
dest: "/helm/chart" dest: "/helm/chart"
content: chart content: chart
} }
}, },
if (values & string) != _|_ { if values != null {
op.#WriteFile & { op.#WriteFile & {
dest: "/helm/values.yaml" dest: "/helm/values.yaml"
content: values content: values
@ -121,7 +121,7 @@ import (
KUBECONFIG: "/kubeconfig" KUBECONFIG: "/kubeconfig"
KUBE_NAMESPACE: namespace KUBE_NAMESPACE: namespace
if repository != _|_ { if repository != null {
HELM_REPO: repository HELM_REPO: repository
} }
HELM_NAME: name HELM_NAME: name
@ -131,7 +131,7 @@ import (
HELM_ATOMIC: strconv.FormatBool(atomic) HELM_ATOMIC: strconv.FormatBool(atomic)
} }
mount: { mount: {
if chartSource != _|_ && chart == _|_ { if chartSource != null && chart == null {
"/helm/chart": from: chartSource "/helm/chart": from: chartSource
} }
if (kubeconfig & dagger.#Secret) != _|_ { if (kubeconfig & dagger.#Secret) != _|_ {

View File

@ -7,9 +7,9 @@ import (
// We assume that a kinD cluster is running locally // 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/ // To deploy a local KinD cluster, follow this link : https://kind.sigs.k8s.io/docs/user/quick-start/
TestKubeconfig: string @dagger(input) TestKubeconfig: dagger.#Input & {string}
TestChartSource: dagger.#Artifact @dagger(input) TestChartSource: dagger.#Input & {dagger.#Artifact}
// Deploy user local chart // Deploy user local chart
TestHelmSimpleChart: { TestHelmSimpleChart: {

View File

@ -95,7 +95,7 @@ import (
dest: "/kubeconfig" dest: "/kubeconfig"
content: kubeconfig content: kubeconfig
mode: 0o600 mode: 0o600
}, }
}, },
if manifest != null { if manifest != null {