gifted-addition-77467
11/01/2023, 8:01 PM${environment.namespace}
Example below...
Kind: Build
name: web
type: container
...
...
---
Kind: Deploy
type: Kubernetes
name: web
source:
path: ../manifets
spec:
files:
- deployment.yaml
---
# deployment yaml in manifests dir
apiVersion: apps/v1
Kind: Deployment
....
...
spec
image: ${actions.build.web.outputs.deploymentImageId} #literally prints this
image: ${environment.namespace} #this interpolates just fine
brief-restaurant-63679
11/01/2023, 9:38 PMyaml
Kind: Deploy
type: Kubernetes
name: web
source:
path: ../manifets
depedencies: [build.web] # <--- Add this
That being said, Garden should throw a proper error here. I'll bring that up with the team!
And just FYI, we had a small bug around the source.path
field which has been fixed but not released yet.
It should work fine in your case but I'd recommend you update the Garden CLI to the latest release once it's out, probably a few days from now.gifted-addition-77467
11/01/2023, 9:45 PMswift-garage-61180
11/02/2023, 10:41 AMbrief-restaurant-63679
11/02/2023, 10:54 AMgarden deploy -l4
(that is set the log level to debug) then you can the rendered manifest in the logs before it's applied.astonishing-tomato-18259
11/02/2023, 10:57 AMswift-garage-61180
11/02/2023, 10:57 AMgarden deploy
?brief-restaurant-63679
11/02/2023, 10:58 AMgifted-addition-77467
11/02/2023, 3:10 PM${actions.build.web.outputs.deploymentImageId}
in the output.
If I try and use a different variable like this one ${environment.namespace}
in the manifest it works just fineastonishing-tomato-18259
11/02/2023, 3:12 PM$$
? Wondering if you might be running into this bug?
https://github.com/garden-io/garden/issues/3989#issuecomment-1672955747
One of the side effects of the escape bug is that some of the template strings in the manifest files might not be resolved.gifted-addition-77467
11/02/2023, 3:24 PM---
apiVersion: apps/v1
kind: Deployment metadata:
name: web
replicas: 1
spec:
selector:
matchLabels:
app: web template:
metadata:
labels:
app: web
namespace: web-${environment.namespace} #works
spec:
containers:
- name: web
image: ${actions.web.outputs.deployment-image-id} #doesn't expand
#image: ${variables.DOCKER_IMAGE} #works
ports:
- containerPort: 3000
name: http
envFrom:
- secretRef:
name: web-externalsecret
livenessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 30
periodSeconds: 10
astonishing-tomato-18259
11/02/2023, 3:26 PM${actions.web.outputs.deployment-image-id} #doesn't expand
Can you please try replacing that line with
${actions.<action-kind-of-web>.web.outputs.deployment-image-id} #doesn't expand
${actions.<action-kind>.<action-name>.outputs.<output-name>}
gifted-addition-77467
11/02/2023, 3:28 PMastonishing-tomato-18259
11/02/2023, 3:37 PM