https://garden.io logo
#🤖|ask-kapa
Hey can you please convert this Helm Deploy action to a Container deploy action?```kin
# 🤖|ask-kapa
b

bright-policeman-43626

07/05/2023, 2:49 PM
Hey @microscopic-river-74022 can you please convert this Helm Deploy action to a Container deploy action?
Copy code
kind: Deploy
description: Helm deploy for the worker container
type: helm
name: api
dependencies: [build.api-build]
spec:
  # Sync configuration
  defaultTarget:
    kind: Deployment
    name: api
  sync:
    paths:
      - containerPath: /app
        sourcePath: ${actions.build.api-build.sourcePath}/.
        mode: one-way-replica
  # Configuring chart.
  chart:
    path: ./my-chart # Garden only support charts to be a sub-path, if you desire you can host this in Github and use repositoryUrl instead.
  values: # Override default values with Go container config, see all config available at https://github.com/companyinfo/helm-charts/tree/main
    image:
      repository: ${actions.build.api-build.outputs.deployment-image-name}
      tag: ${actions.build.api-build.version}
      pullPolicy: IfNotPresent
    ingress:
      enabled: true
      path: /
      hostname: api.${variables.base-hostname}
    ports:
      - name: http
        containerPort: 80
        protocol: TCP
    nameOverride: api
    fullnameOverride: api
m

microscopic-river-74022

07/05/2023, 2:49 PM
Please stand by @bright-policeman-43626 as I search the knowledge base. We are experiencing especially high traffic right now and might take longer than usual. :wave:
---------------------- Sure, I can help you convert the Helm Deploy action to a Container Deploy action. Here's how you can do it:
Copy code
yaml
kind: Deploy
name: api
type: container
dependencies:
  - deploy.api-build
spec:
  ports:
    - name: http
      containerPort: 80
  healthCheck:
    httpGet:
      path: /
      port: http
  ingresses:
    - path: /
      port: http
Please note that the
container
deploy action is a simplified abstraction and has limited features compared to more platform-specific types like
helm
or
kubernetes
. For example, you cannot specify replicas for redundancy, and various platform-specific options are not included. For more flexibility, you might want to consider using
helm
or
kubernetes
deploy actions. Also, the
container
deploy action does not support the
sync
configuration that you have in your
helm
deploy action. If you need to use the
sync
configuration, you might need to stick with the
helm
deploy action. For more information, you can refer to the Garden's documentation on Container Deploy action () and Helm Deploy action (). ----------------------
Note: you can ask me a follow up question by @ mentioning me again
:speech_balloon: ----------------------
b

bright-policeman-43626

07/05/2023, 2:53 PM
@microscopic-river-74022 give me the sync too please
m

microscopic-river-74022

07/05/2023, 2:53 PM
Let me check the knowledge base for you. One moment! :books:
---------------------- I'm sorry for the confusion, but the
container
deploy action in Garden does not support the
sync
configuration. The
sync
configuration is only available in the
helm
and
kubernetes
deploy actions. If you need to use the
sync
configuration for rapid iteration on a running
Deploy
action, you might need to stick with the
helm
deploy action. You can refer to the Code synchronization guide () for more information on how to configure and use syncing for rapid iteration on `Deploy`s. If you still want to convert your
helm
deploy action to a
container
deploy action, you might need to find another way to handle the code synchronization outside of the Garden configuration. ----------------------
Note: you can ask me a follow up question by @ mentioning me again
:speech_balloon: ----------------------
2 Views