how can I reference external manifest files when u...
# 🤖|ask-kapa
s
@microscopic-river-74022 how can I reference external manifest files when using kubernetes deploy?
m
Please stand by @swift-spring-8620 as I search the knowledge base. I normally take about 20 seconds or so. :wave:
---------------------- When using the
kubernetes
Deploy action in Garden, you can reference external manifest files in your project structure. This is done via the
spec.files
directive in your Garden configuration. Here's an example of how you can do this:
Copy code
yaml
kind: Deploy
type: kubernetes
name: api
spec:
 files:
 - ./manifests/Deployment.yaml
 - ./manifests/Ingress.yaml
 - ./manifests/Service.yaml
You can also use glob patterns to reference all files in a directory:
Copy code
yaml
kind: Deploy
type: kubernetes
name: api
spec:
 files:
 - ./manifests/*
If your manifests are in a parent directory relative to the action config file, you need to set the
source.path
field for your action since Garden cannot include files from parent directories. Here's an example:
Copy code
yaml
kind: Deploy
type: kubernetes
name: api
source:
 path: ../ # <--- Garden will now treat the parent directory as the action source path
spec:
 files:
 - ./manifests/Deployment.yaml # <--- Reference the manifests relative to the source path
 - ./manifests/Ingress.yaml
For more information, you can refer to the Garden documentation (). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
message has been deleted
s
@microscopic-river-74022 What if the manifest file is hosted on GitHub and not my local machine?
m
Let me check the knowledge base for you. One moment! :books:
---------------------- Hmm, I don't know enough to give you a confident answer yet. The provided knowledge sources do not contain information about referencing a Kubernetes manifest file hosted on GitHub. They only cover referencing local manifest files in the project structure. For more detailed information, you might want to check the official Garden documentation () or their GitHub repository (). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
message has been deleted
2 Views