NetApp / trident

Storage orchestrator for containers
Apache License 2.0
762 stars 222 forks source link

import legacy volumes with kubectl instead of tridentctl? #637

Open vrmerlin opened 3 years ago

vrmerlin commented 3 years ago

We have a number of Kubernetes clusters and their configuration and setup is entirely "reproducible" through script and Helm chart deployments.

Trident is "so" close to being a part of that. I realize I will need to initially deploy Trident with the installer, but after that, I'd like to deploy any configurations with a custom Helm script (i.e. basic Kubernetes YAML files through kubectl).

I've deployed Trident 21.07.1 successfully.

I've developed a custom Helm chart that successfully deploys a backend, and a StorageClass.

But, I'd like that Helm chart to ALSO configure an imported volume for our existing NetAPP data. The documentation says that I run this command, giving it a PersistentVolumeClaim file:

~/trident-installer/tridentctl import volume data-archive-backend data-archive -f data-archive-pvc.yaml -n trident --no-manage

I can do that, and it works fine -- i can run my application in a Pod and see the mounted volume.

But, I REALLY want to deploy the data-archive-pvc.yaml file with kubectl instead of tridentctl, so I can simply added the file to my custom Helm chart. Then, with one command, I can deploy or undeploy the entire Trident configuration that I need.

You've switched TridentBackendConfig and StorageClass objects from tridentctl to kubectl. Will you be doing the same for import volumes? Or is that possible already, and I'm missing something?

dc232 commented 2 years ago

@vrmerlin Can I ask how did you manage to install the backend with kubectl? I tried with the TridentBackendConfig but it doesn't seem to be found when installing the Helm chart with the included CRD?

tgoetheyn commented 2 years ago

This would be a great feature! thumbs up from my end.

my kubernetes clusters are entirely configured through ArgoCD. Everything works splendid, but the 'tridentctl import' is indeed the missing puzzle piece