fresh-yak-35965
07/17/2024, 6:43 PMmicroscopic-river-74022
07/17/2024, 6:43 PMmicroscopic-river-74022
07/17/2024, 6:43 PMyaml
kind: Deploy
name: frontend
description: Frontend service container
type: container
dependencies:
- build.frontend
variables:
base-hostname: "${environment.name == 'ephemeral' ? providers.ephemeral-kubernetes.outputs.default-hostname : local.demo.garden}"
spec:
image: ${actions.build.frontend.outputs.deploymentImageId}
ports:
- name: http
containerPort: 8080
ingresses:
- path: /
port: http
hostname: frontend.${var.base-hostname}
In this example, the base-hostname
variable is set using a template string that checks the environment name and uses the appropriate hostname. The hostname
for the ingress is then set using another template string that references this base-hostname
variable.
Please note that the exact template string to use may depend on your specific configuration and setup. 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:
----------------------microscopic-river-74022
07/17/2024, 6:43 PM