Garden volume based on secret

Hi, previously when using Kubernetes I’ve done something like this:

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: aspnet-core-secrets-demo
spec:
  replicas: 3
  template:
    metadata:
      labels:
        app: aspnet-core-secrets-demo
    spec:
      containers:
      - name: aspnet-core-secrets-demo
        image: anthonychu/aspnet-core-secrets:latest
        ports:
        - containerPort: 80
        env:
        - name: "ASPNETCORE_ENVIRONMENT"
          value: "Kubernetes"
        volumeMounts:
        - name: secrets
          mountPath: /app/secrets
          readOnly: true
      volumes:
      - name: secrets
        secret:
          secretName: secret-appsettings

Where we create a volume based on a secret, does Garden support this at all? I’ve read through the documentation but could not see anything that resembled that functionality.

I’m managed to achieve this a slightly different way. Just using env vars.

I’m assuming you mean for the container module type, right?

As it happens I recently pushed this: feat(k8s): add `configmap` module type, mountable on container modules by edvald · Pull Request #2501 · garden-io/garden · GitHub
It would be feasible to do something akin to that for Kubernetes Secret resources if you find it’s an important addition, but sounds like you’re fine for now?

Honestly, at this point I don’t think it’s as useful as I did - I came at this based on my experience of Tutorials etc from .Net Core where they were just placing the whole configuration file into a secret.

Having worked on it now I think the configmap approach is better.