fresh-yak-35965
11/22/2024, 8:31 PMspec.defaultTarget
also fails. Only the annotation fixes it. I will note that directly performing kubectl exec <podname> -c <containername> -- <test command
correctly executes the test.fresh-yak-35965
11/22/2024, 8:33 PMyaml
---
kind: Deploy
type: kubernetes
name: tunnel
description: Chisel tunnel server and tunnel manager deployment
variables:
apphost: ${environment.namespace}${var.baseHostName}
dependencies:
- build.tunnel
- build.tunnel-manager
- deploy.redis
spec:
defaultTarget:
kind: Deployment
name: tunnel-server
containerName: tunnel-manager
portForwards:
- name: tunnel-manager
resource: Deployment/tunnel-server
targetPort: 8000
localPort: 50001
sync:
paths:
- target:
kind: Deployment
name: tunnel-server
containerName: tunnel-manager
sourcePath: "./tunnel-manager"
containerPath: "/app"
mode: "one-way-replica"
files:
- secrets.yml
manifests:
# NOTE: These are DEV-ONLY Manifests
- apiVersion: v1
kind: ConfigMap
metadata:
name: tunnel-manager-config
namespace: kraken-${environment.namespace}
data:
TUNNEL_MANAGER_NAMESPACE: kraken-${environment.namespace}
...
- apiVersion: networking.k8s.io/v1
kind: Ingress
...
kustomize:
path: ssh://git@github.com/ScaleComputing/kraken-configuration/tunnel/tunnel-service/overlays/development
patchResources:
- kind: Deployment
name: tunnel-server
strategy: strategic
patch:
spec:
replicas: 1
template:
# metadata:
# annotations:
# kubectl.kubernetes.io/default-container: "tunnel-manager"
spec:
containers:
- name: chisel-server
image: ${actions.build.tunnel.outputs.deploymentImageId}
- name: tunnel-manager
image: ${actions.build.tunnel-manager.outputs.deploymentImageId}
command:
- "hatch"
args:
- "run"
- "api"
fresh-yak-35965
11/22/2024, 8:34 PMyaml
---
kind: Test
type: kubernetes-exec
name: tunnel-unit
build: tunnel
description: Run unit tests
dependencies:
- deploy.tunnel
spec:
resource:
kind: Deployment
name: tunnel-server
containerName: tunnel-manager
command:
- hatch
- run
- test
- --
- -m
- "unit"
freezing-pharmacist-34446
11/26/2024, 2:51 PMcontainerName
on from the test action. This PR fixes this https://github.com/garden-io/garden/pull/6682
With this fix it will be sufficient to specifiy the container name in your tunnel-unit
test action.fresh-yak-35965
12/03/2024, 7:19 PM