NetApp / trident

Storage orchestrator for containers
Apache License 2.0
759 stars 221 forks source link

Allow Helm Chart to create Backends and Storage Classes #603

Open JosephGJ opened 3 years ago

JosephGJ commented 3 years ago

Hi!

As of the v21.04.0 of trident, its now possible to configure trident backends through kubernetes yaml manifests. If possible, could this be added as an option to configure backends through the helm chart? It might be best to configure it such that, if the helm chart is uninstalled, the backends with volumes still in are "orphaned" instead of being removed.

I'd like to ask if the option to configure trident-based storage classes could also be added to the helm chart.

balaramesh commented 3 years ago

Hello @JosephGJ! Thanks for reaching out. As you have identified, Trident backends and storageClasses can be created natively on Kubernetes using YAML manifests. While the ask here is clear, can you provide some background on why this is required? Both objects can be created/managed directly through Kubernetes and are today handled as post-install steps. The process would look something like this:

  1. Install Trident (using Helm/Trident operator/tridentctl
  2. Create backends and storageClasses
  3. Create PVCs and specify them in application pods.
JosephGJ commented 3 years ago

Hi @balaramesh Sorry for the late response. Currently, our deployment pipelines utilise terraform/helm to deploy kubernetes services into our clusters.

Currently, due to how terraform performs its resource plan, if we were to use terraform to manage both the helm chart for the trident operator / orchestrator CRD and the trident backend through a kubernetes_manifest tf resource, the plan would fail due to a circular dependency. Terraform cannot be applied as the TridentBackendConfig resource does not exist.

If the helm chart could be configured to allow for the configuration of trident backends, this would not be an issue and we would not have to rely on a bespoke / snowflake deployment pipeline, away from our existing deployment automation. Storage Classes being included would just be a nice bonus + one less thing to manage :)

darthVikes commented 2 years ago

I like this idea to also create the backend / storageclass also through helm install chart if possible.

dc232 commented 2 years ago

@JosephGJ

I tried creating a templated backend through kubectl_manifest in terraform but this results in netapp/nett-app-backend failed to create kubernetes rest client for update of resource: resource [trident.netapp.io/v1/TridentBackendConfig] isn't valid for cluster, check the APIVersion and Kind fields are valid

despite working through the circular dependency issue