gentle-umbrella-55872
05/18/2024, 6:53 PMmicroscopic-river-74022
05/18/2024, 6:53 PMmicroscopic-river-74022
05/18/2024, 6:53 PMkubectl apply
command, you would use a Deploy
action of type kubernetes
. Here's an example:
yaml
kind: Deploy
name: tikv
type: kubernetes
description: Deploy a TiDB cluster
spec:
manifests:
- apiVersion: v1
kind: Namespace
metadata:
name: tikv
- apiVersion: apps/v1
kind: Deployment
metadata:
name: tidb-cluster
namespace: tikv
spec:
# ... rest of the tidb-cluster.yaml content goes here ...
In this example, you would replace the # ... rest of the tidb-cluster.yaml content goes here ...
comment with the actual content of the tidb-cluster.yaml
file you're applying.
Please note that Garden does not currently support fetching Kubernetes manifests from URLs directly in the garden.yml
file. You would need to download the tidb-cluster.yaml
file and include its content in the garden.yml
file.
For more information on how to use Garden with Kubernetes, you can refer to the Garden documentation ().
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------microscopic-river-74022
05/18/2024, 6:53 PMgentle-umbrella-55872
05/18/2024, 6:54 PMmicroscopic-river-74022
05/18/2024, 6:54 PMmicroscopic-river-74022
05/18/2024, 6:54 PMgarden.yml
file. You would need to download the manifest file and include its content in the garden.yml
file.
However, Garden does support referencing a remote git repository URL in the repositoryUrl
field for certain module types and actions. This URL must point to a git server and contain a hash suffix pointing to a specific branch or tag. For example:
yaml
modules:
- repositoryUrl: "git+<https://github.com/org/repo.git#v2.0">
In this case, Garden will import the repository source code into this module, but read the module's config from the local garden.yml
file. You can find more information about this in the Garden documentation ().
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------microscopic-river-74022
05/18/2024, 6:54 PMbig-solstice-45894
05/19/2024, 4:42 PMgentle-umbrella-55872
05/19/2024, 6:24 PMbig-solstice-45894
05/19/2024, 6:35 PMgentle-umbrella-55872
05/20/2024, 8:19 AMsh
Failed to apply Kubernetes manifests. This is the output of the kubectl command:
Warning: resource customresourcedefinitions/tidbclusters.pingcap.com is missing the kubectl.kubernetes.io/last-applied-configuration annotation which is required by kubectl apply. kubectl apply should only be used on resources created declaratively by either kubectl create --save-config or kubectl apply. The missing annotation will be patched automatically.
The CustomResourceDefinition "tidbclusters.pingcap.com" is invalid: metadata.annotations: Too long: must have at most 262144 bytes
Also i tired to seperate the large into multiple smaller files, but there is still one very large left wich will still trigger the same error (https://github.com/pingcap/tidb-operator/blob/master/manifests/crd/v1/pingcap.com_tidbclusters.yaml)gentle-umbrella-55872
05/20/2024, 8:39 AMts
args.push("--server-side=true")
after line 122 in https://github.com/garden-io/garden/blob/main/core/src/plugins/kubernetes/kubectl.ts#L122 it's working 😅