cosi-driver-nutanix

by joaquinito2051

Helm chartv0.6.0App v0.6.0

A Helm chart to deploy Nutanix COSI driver

About this chart

Nutanix COSI driver for provisioning and consuming Nutanix object storage in Kubernetes

Nutanix cosi driver is Nutanix specific component that receives requests from the COSI sidecar and calls the appropriate APIs to create buckets, manage their lifecycle and manage access to them.

COSI driver supports these operations:

  1. Creation/Deletion of buckets
  2. Granting/Revoking bucket access to individual users

Pre-requisites

  1. Install Helm v3.0.0.
  2. Install a Kubernetes cluster.

Installation and running on the cluster

Deploy the cosi-driver on the cluster:

Clone this repo, get into the charts directory and run the below command:

helm install cosi-driver -n cosi-driver-nutanix --create-namespace .

Uninstalling the chart

To uninstall/delete the cosi-driver-nutanix chart:

helm uninstall cosi-driver -n cosi-driver-nutanix

NOTE: The CRDs installed via helm will not be deleted from the above command. Those have to manually deleted.

Upgrading the chart

Upgrade the cosi-driver-nutanix chart to a particular version can be achieved via the helm upgrade command with the following syntax: helm upgrade [RELEASE] [CHART] [flags]

Example:

helm upgrade cosi-driver -n cosi-driver-nutanix .

To know more about the various flag options used with upgrade command check out the helm_upgrade official document.

Configuration

The following table lists the configurable parameters of the cosi-driver-nutanix chart and their default values.

ParameterDescriptionDefault
nameOverrideTo override the name of the cosi-driver chart""
fullnameOverrideTo override the full name of the cosi-driver chart""
image.registryImage registry for cosi-driver-nutanix sidecarghcr.io/
image.repositoryImage repository for cosi-driver-nutanix sidecarnutanix-cloud-native/cosi-driver-nutanix
image.tagImage tag for cosi-driver-nutanix sidecar""
image.pullPolicyImage registry for cosi-driver-nutanix sidecarIfNotPresent
secret.enabledEnables K8s secret deployment for Nutanix Object Storetrue
secret.endpointNutanix Object Store instance endpoint""
secret.access_keyAdmin IAM Access key to be used for Nutanix Objects""
secret.secret_keyAdmin IAM Secret key to be used for Nutanix Objects""
secret.pc_ipPC ip""
secret.pc_portPC port""
secret.pc_usernamePC username""
secret.pc_passwordPC password""
secret.account_nameAccount Name is a displayName identifier Prefix for Nutanix"ntnx-cosi-iam-user"
cosiController.enabledWhether to create the COSI central controller deployment and its resourcestrue
cosiController.logLevelVerbosity of logs for COSI central controller deployment5
cosiController.image.registeryImage registry for COSI central controller deploymentgcr.io/
cosiController.image.repositoryImage repository for COSI central controller deploymentk8s-staging-sig-storage/objectstorage-controller
cosiController.image.tagImage tag for COSI central controller deploymentv20250110-a29e5f6
cosiController.image.pullPolicyImage pull policy for COSI central controller deploymentAlways
objectstorageProvisionerSidecar.logLevelVerbosity of logs for COSI sidecar5
objectstorageProvisionerSidecar.image.registeryImage registry for COSI sidecargcr.io/
objectstorageProvisionerSidecar.image.repositoryImage repository for COSI sidecark8s-staging-sig-storage/objectstorage-sidecar/objectstorage-sidecar@sha256
objectstorageProvisionerSidecar.image.tagImage tag for COSI sidecar589c0ad4ef5d0855fe487440e634d01315bc3d883f91c44cb72577ea6e12c890
objectstorageProvisionerSidecar.image.pullPolicyImage pull policy for COSI sidecarAlways

Configuration examples:

Install the driver in the cosi-driver-nutanix namespace (add the --create-namespace flag if the namespace does not exist):

helm install cosi-driver -n cosi-driver-nutanix .

Individual configurations can be set by using --set key=value[,key=value] like:

helm install cosi-driver -n cosi-driver-nutanix . --set cosiController.logLevel=2

In the above command cosiController.logLevel refers to one of the variables defined in the values.yaml file.

All the options can also be specified in a values.yaml file:

helm install cosi-driver -n cosi-driver-nutanix -f values.yaml .

Steps to update the Nutanix Object store details while installing COSI:

  1. Open Prism Central UI in any browser and go the objects page. In the below screenshot, already an object store called cosi is deployed which is ready for use. On the right side of the object store, you will see the objects Public IPs which you can use as the endpoint in the format: http:<objects public ip>:80.

  2. On the side navigation bar click the Access Keys tab and then click on Add People.

  3. Add a new email address and name and click Next.

  4. Now click the Generate Keys button.

  5. After the keys are generated download the generated keys.

  6. Now, in the Access Key tab you will be able to see the person you just added.

  7. The keys file that you downloaded will be a text file which will contain the Access Key and Secret Key that you need to update in helm values.

Keep the endpoint details collected in step#1, the keys details mentioned in step#7 and Nutanix Prism-Central(PC) details in the format <prism-ip>:<prism-port>:<user>:<password> handy.

To update the secret details use the below helm command to deploy Nutanix cosi driver:

helm install cosi-driver -n cosi-driver-nutanix . --set secret.enabled=true --set secret.endpoint=<object-store-endpoint> secret.access_key=<object-store-access-key> --set secret.secret_key=<object-store-secret-key>  --set secret.pc_secret=<nutanix-pc-details>

Support

Community Plus

This code is developed in the open with input from the community through issues and PRs. A Nutanix engineering team serves as the maintainer. Documentation is available in the project repository.

Issues and enhancement requests can be submitted in the Issues tab of this repository. Please search for and review the existing open issues before submitting a new issue.

License

Copyright 2021-2022 Nutanix, Inc.

The project is released under version 2.0 of the Apache license.

Deploy cosi-driver-nutanix with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has cosi-driver-nutanix on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartcosi-driver-nutanix is pinned at v0.6.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply