Update kubernetes testing policy to test deployment from url
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
This commit is contained in:
parent
97cd00332a
commit
c05f7d50d4
@ -16,7 +16,9 @@ Kubectl client
|
||||
|
||||
### kubernetes.#Kubectl Inputs
|
||||
|
||||
_No input._
|
||||
| Name | Type | Description |
|
||||
| ------------- |:-------------: |:-------------: |
|
||||
|*version* | `*"v1.19.9" \| string` |Kubectl version |
|
||||
|
||||
### kubernetes.#Kubectl Outputs
|
||||
|
||||
@ -28,11 +30,14 @@ Apply Kubernetes resources
|
||||
|
||||
### kubernetes.#Resources Inputs
|
||||
|
||||
| Name | Type | Description |
|
||||
| ------------- |:-------------: |:-------------: |
|
||||
|*namespace* | `*"default" \| string` |Kubernetes Namespace to deploy to |
|
||||
|*version* | `*"v1.19.9" \| string` |Version of kubectl client |
|
||||
|*kubeconfig* | `string` |Kube config file |
|
||||
| Name | Type | Description |
|
||||
| ------------- |:-------------: |:-------------: |
|
||||
|*source* | `dagger.#Artifact` |Kubernetes config to deploy |
|
||||
|*manifest* | `*null \| string` |Kubernetes manifest to deploy inlined in a string |
|
||||
|*url* | `*null \| string` |Kubernetes manifest url to deploy remote configuration |
|
||||
|*namespace* | `*"default" \| string` |Kubernetes Namespace to deploy to |
|
||||
|*version* | `*"v1.19.9" \| string` |Version of kubectl client |
|
||||
|*kubeconfig* | `string` |Kube config file |
|
||||
|
||||
### kubernetes.#Resources Outputs
|
||||
|
||||
|
@ -29,7 +29,7 @@ TestKubeApply: {
|
||||
}
|
||||
|
||||
// Apply deployment
|
||||
apply: #Resources & {
|
||||
resources: #Resources & {
|
||||
kubeconfig: TestKubeconfig
|
||||
namespace: "dagger-test"
|
||||
manifest: yaml.Marshal(kubeSrc)
|
||||
@ -38,6 +38,24 @@ TestKubeApply: {
|
||||
// Verify deployment
|
||||
verify: #VerifyApply & {
|
||||
podname: kubeSrc.metadata.name
|
||||
namespace: apply.namespace
|
||||
namespace: resources.namespace
|
||||
}
|
||||
}
|
||||
|
||||
TestLinkApply: {
|
||||
// Podname from hello-world-pod
|
||||
_podname: "hello-world"
|
||||
|
||||
// Apply deployment
|
||||
resources: #Resources & {
|
||||
kubeconfig: TestKubeconfig
|
||||
namespace: "dagger-test"
|
||||
url: "https://raw.githubusercontent.com/mstrzele/intro-to-k8s/master/hello-world-pod.yaml"
|
||||
}
|
||||
|
||||
// Verify deployment
|
||||
verify: #VerifyApply & {
|
||||
podname: _podname
|
||||
namespace: resources.namespace
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user