fresh-yak-35965
11/22/2024, 8:25 PMkubernetes-exec
began failing to target the specified containerName
, instead defaulting to a different container. I fixed this by setting a default container annotation on the Deployment, but this feels like a hack. Is this a known issue?microscopic-river-74022
11/22/2024, 8:25 PMmicroscopic-river-74022
11/22/2024, 8:25 PMcontainerName
for targeting specific containers in multi-container pods. This is supported in various contexts, including kubernetes-exec
tests, as evidenced by the kubernetes-exec Test reference ().
However, the switch from local manifests to a remote Kustomization shouldn't inherently change how Garden targets containers. It's possible that this change is affecting how Garden interprets or applies the container specifications.
A few points to consider:
1. Make sure your kubernetes-exec
test configuration correctly specifies the containerName
under the spec.resource
section.
2. Check if your Kustomization is modifying the pod or container specifications in a way that affects container naming or ordering.
3. The defaultTarget
configuration in Kubernetes Deploy actions can be used to specify a default container for various operations. You might want to review this setting in your Deploy action configuration. Reference: defaultTarget ()
4. Your workaround of setting a default container annotation on the Deployment is a valid approach recognized by Kubernetes, but you're right that it shouldn't be necessary if Garden is configured correctly.microscopic-river-74022
11/22/2024, 8:26 PMmicroscopic-river-74022
11/22/2024, 8:26 PM