microscopic-river-74022
04/05/2024, 12:44 AMmicroscopic-river-74022
04/05/2024, 12:45 AMspec.env field of Run, Deploy, and Test Actions. But they cannot be used as buildArgs for Docker builds. Also, secrets have to be in the same namespace as the project (source ()).
For more specific instructions, I would recommend referring to the official Kubernetes and Docker documentation or the Garden documentation that is not included in the provided knowledge sources.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------stocky-hair-84003
04/05/2024, 12:48 AMmicroscopic-river-74022
04/05/2024, 12:48 AMmicroscopic-river-74022
04/05/2024, 12:49 AMcluster-buildkit build in a remote Kubernetes cluster, you would typically use Kubernetes secrets. However, the provided knowledge sources do not contain specific information on how to pass a secret to a cluster-buildkit build.
In general, to use secrets in Garden and Kubernetes, you can reference them at runtime in the spec.env field of Run, Deploy, and Test Actions. Also, secrets have to be in the same namespace as the project (source ()).
For deploying a built image to a remote Kubernetes cluster, the image first needs to be pushed to a container registry that is accessible to the cluster. This requires specifying the deploymentRegistry field on your kubernetes provider, and in many cases, you also need to provide a Secret in order to authenticate with the registry via the imagePullSecrets field (source ()).
Here's an example of how to configure a deployment registry and imagePullSecrets:
yaml
apiVersion: garden.io/v1
kind: Project
name: my-project
...
providers:
- name: kubernetes
...
deploymentRegistry:
hostname: my-private-registry.com # <--- the hostname of your registry
namespace: my-project # <--- the namespace to use within your registry
imagePullSecrets:
- name: my-deployment-registry-secret # <--- the name and namespace of a valid Kubernetes imagePullSecret
namespace: defaultmicroscopic-river-74022
04/05/2024, 12:49 AMmicroscopic-river-74022
04/05/2024, 12:55 AMstocky-hair-84003
04/05/2024, 12:55 AMmicroscopic-river-74022
04/05/2024, 12:55 AMcluster-buildkit in a remote Kubernetes cluster for the purpose of accessing a private repository during a Dockerfile run.
In general, to use secrets in Garden and Kubernetes, you can reference them at runtime in the spec.env field of Run, Deploy, and Test Actions. Also, secrets have to be in the same namespace as the project (source ()).
For more specific instructions, I would recommend referring to the official Kubernetes and Docker documentation or the Garden documentation that is not included in the provided knowledge sources.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------stocky-hair-84003
04/05/2024, 12:56 AM