stack-orchestrator/stack_orchestrator
Thomas E Lackey b22c72e715 For k8s, use provisioner-managed volumes when an absolute host path is not specified. (#741)
In kind, when we bind-mount a host directory it is first mounted into the kind container at /mnt, then into the pod at the desired location.

We accidentally picked this up for full-blown k8s, and were creating volumes at /mnt.  This changes the behavior for both kind and regular k8s so that bind mounts are only allowed if a fully-qualified path is specified.  If no path is specified at all, a default storageClass is assumed to be present, and the volume managed by a provisioner.

Eg, for kind, the default provisioner is: https://github.com/rancher/local-path-provisioner

```
stack: test
deploy-to: k8s-kind
config:
  test-variable-1: test-value-1
network:
  ports:
    test:
     - '80'
volumes:
  # this will be bind-mounted to a host-path
  test-data-bind: /srv/data
  # this will be managed by the k8s node
  test-data-auto:
configmaps:
  test-config: ./configmap/test-config
```

Reviewed-on: cerc-io/stack-orchestrator#741
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
2024-02-14 21:45:01 +00:00
..
build Support other webapp types (react, static). (#721) 2024-02-02 18:04:06 -06:00
data For k8s, use provisioner-managed volumes when an absolute host path is not specified. (#741) 2024-02-14 21:45:01 +00:00
deploy For k8s, use provisioner-managed volumes when an absolute host path is not specified. (#741) 2024-02-14 21:45:01 +00:00
repos Support external stack file (#650) 2023-11-14 20:59:48 -07:00
__init__.py Rename app -> stack_orchestrator (#625) 2023-11-07 00:06:55 -07:00
__main__.py Rename app -> stack_orchestrator (#625) 2023-11-07 00:06:55 -07:00
base.py Rename app -> stack_orchestrator (#625) 2023-11-07 00:06:55 -07:00
command_types.py Rename app -> stack_orchestrator (#625) 2023-11-07 00:06:55 -07:00
constants.py For k8s, use provisioner-managed volumes when an absolute host path is not specified. (#741) 2024-02-14 21:45:01 +00:00
main.py Support application removal requests. (#697) 2023-12-21 18:05:40 -06:00
opts.py Rename app -> stack_orchestrator (#625) 2023-11-07 00:06:55 -07:00
update.py Rename app -> stack_orchestrator (#625) 2023-11-07 00:06:55 -07:00
util.py Volume processing fixes (#729) 2024-02-06 12:32:10 -07:00
version.py Rename app -> stack_orchestrator (#625) 2023-11-07 00:06:55 -07:00