stdlib: kubernetes: rename #Apply to #Resources
Code convention: use nouns instead of verbs whenever possible. Reasoning: One can apply just about anything to Kubernetes via this: deployment, load balancer, RBAC policy, a custom CRD resource, etc. Upstream those are called resources: You give `kubectl apply` one or more manifests and it will create the corresponding resources. Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
parent
19db780de4
commit
a5e9ac8a0f
@ -36,7 +36,7 @@ cluster: eks.#KubeConfig & {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Example of a simple `kubectl apply` using a simple config
|
// Example of a simple `kubectl apply` using a simple config
|
||||||
kubeApply: kubernetes.#Apply & {
|
kubeApply: kubernetes.#Resources & {
|
||||||
manifest: yaml.Marshal(kubeSrc)
|
manifest: yaml.Marshal(kubeSrc)
|
||||||
namespace: "test"
|
namespace: "test"
|
||||||
kubeconfig: cluster.kubeconfig
|
kubeconfig: cluster.kubeconfig
|
||||||
|
@ -43,8 +43,8 @@ import (
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply a Kubernetes configuration
|
// Apply Kubernetes resources
|
||||||
#Apply: {
|
#Resources: {
|
||||||
|
|
||||||
// Kubernetes config to deploy
|
// Kubernetes config to deploy
|
||||||
source?: dagger.#Artifact @dagger(input)
|
source?: dagger.#Artifact @dagger(input)
|
||||||
|
@ -26,7 +26,7 @@ TestKubeApply: {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Apply deployment
|
// Apply deployment
|
||||||
apply: kubernetes.#Apply & {
|
apply: kubernetes.#Resources & {
|
||||||
"kubeconfig": kubeconfig
|
"kubeconfig": kubeconfig
|
||||||
namespace: "dagger-test"
|
namespace: "dagger-test"
|
||||||
manifest: yaml.Marshal(kubeSrc)
|
manifest: yaml.Marshal(kubeSrc)
|
||||||
|
Reference in New Issue
Block a user