swift-spring-8620
05/09/2024, 5:16 AMmicroscopic-river-74022
05/09/2024, 5:16 AMmicroscopic-river-74022
05/09/2024, 5:17 AMspec.values
field in your Garden configuration file. This field accepts a map of values that will be passed to Helm when rendering the templates. These values can include arrays and nested objects. If specified, these values take precedence over the values in the values.yaml
file or the files specified in valueFiles
.
Here's an example of how you can set it up in your Garden configuration file:
yaml
kind: Deploy
type: helm
name: vault
spec:
chart:
url: "oci://ghcr.io/bank-vaults/helm-charts/vault"
values:
vault:
config:
storage:
cockroachdb:
connection_url: "postgres://roach:fake-password@localhost:26257/database?sslmode=verify-full"
In this example, the spec.values
field is used to pass the connection URL to the Helm chart. The spec.chart.url
field is used to specify the URL to the OCI repository where the Helm chart is located.
Please note that the spec.values
field is an object and its default value is {}
. It is not required to be specified in the configuration.
For more information, you can refer to the Garden documentation on Deploy Action () and Helm Module ().
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------microscopic-river-74022
05/09/2024, 5:17 AMswift-spring-8620
05/09/2024, 5:55 AMmicroscopic-river-74022
05/09/2024, 5:55 AMmicroscopic-river-74022
05/09/2024, 5:55 AMconfigmap
action type. Here's an example of how you can set it up in your Garden configuration file:
yaml
kind: Deploy
type: configmap
name: my-configmap
spec:
data:
config.properties: |
some: data
or: something
In this example, a ConfigMap named my-configmap
is created with the data some: data
and or: something
under the key config.properties
.
You can then reference and mount this ConfigMap in a container
deploy action like so:
yaml
kind: Deploy
name: my-app
type: container
spec:
volumes:
- name: configuration
containerPath: /config
# The reference to the configmap Deploy
action: deploy.my-configmap
This mounts all the keys in the data
field on the my-configmap
action under the /config
directory in the container. In this case, you'll find the file /config/config.properties
there, with the value above (some: data ...
) as the file contents.
For more information, you can refer to the Garden documentation on ConfigMap Deploy Action () and Mounting Kubernetes ConfigMaps ().
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------microscopic-river-74022
05/09/2024, 5:55 AMswift-spring-8620
05/09/2024, 5:56 AMmicroscopic-river-74022
05/09/2024, 5:56 AMmicroscopic-river-74022
05/09/2024, 5:56 AMhelm
deploy action as well. ConfigMaps created using the configmap
action type in Garden are deployed as standard Kubernetes ConfigMap resources. Therefore, they can be referenced in helm
actions just like any other Kubernetes ConfigMap.
In your Helm chart, you would reference the ConfigMap in the appropriate Kubernetes objects that need to use it. For example, if you want to mount the ConfigMap as a volume in a Pod, you would do so in the Pod's spec in your Helm chart.
Here's an example of how you might reference a ConfigMap in a Pod spec in a Helm chart:
yaml
apiVersion: v1
kind: Pod
metadata:
name: my-pod
spec:
containers:
- name: my-container
image: my-image
volumeMounts:
- name: config-volume
mountPath: /config
volumes:
- name: config-volume
configMap:
# The name of the ConfigMap to mount.
# This is the name you specified in your Garden config.
name: my-configmap
In this example, the ConfigMap my-configmap
is mounted as a volume in the Pod. The contents of the ConfigMap are available in the /config
directory in the container.
For more information, you can refer to the Garden documentation on ConfigMap Deploy Action () and Mounting Kubernetes ConfigMaps ().
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------microscopic-river-74022
05/09/2024, 5:57 AM