spinkube / containerd-shim-spin

A ContainerD shim for running Spin Applications.
Apache License 2.0
61 stars 13 forks source link

Which `spin up` flags to support in the shim? #130

Open kate-goldenring opened 4 months ago

kate-goldenring commented 4 months ago

This issue https://github.com/spinkube/containerd-shim-spin/issues/52 starts a conversation about supporting spin up flags in the shim. We can ingest these flags from the Container spec args array as follows:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: spin-todo
spec:
  replicas: 1
  selector:
    matchLabels:
      app: spin-todo
  template:
    metadata:
      labels:
        app: spin-todo
    spec:
      runtimeClassName: wasmtime-spin-v2
      containers:
      - name: spin-todo
        image: ttl.sh/spin-kv-checklist:48h
        command: ["/"]
        ports:
        - containerPort: 80
        args: ["--key-value", "foo=true"]

These args can then be processed from the RuntimeContext passed into run_trigger.

My question is which of the flags we want to support. Some such as --listen address are clearly important as noted in https://github.com/spinkube/containerd-shim-spin/issues/52 . The ones that preseed data, --key-value and --sqlite, could be argued as being uneccessary, especially given that these data sources are likely managed separately of the app lifecycle.

matsbror commented 4 months ago

I had a reason to use --disable-pooling recently on ARM64 and RISCV64 devices with smaller virtual memory address sizes so that would be nice (although this particular issue has been resolved automatically in spin now).

matsbror commented 4 months ago

Is the --listen flag supported in the current implementation?

kate-goldenring commented 4 months ago

@matsbror, no. None of the flags are currently supported.