Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: nutanix csi driver 3.0 #531

Merged
merged 4 commits into from
Apr 18, 2024
Merged

feat: nutanix csi driver 3.0 #531

merged 4 commits into from
Apr 18, 2024

Conversation

faiq
Copy link
Contributor

@faiq faiq commented Apr 17, 2024

What problem does this PR solve?:

Which issue(s) this PR fixes:
https://jira.nutanix.com/browse/D2IQ-100510

How Has This Been Tested?:

Tested by creating a cluster like this

$ clusterctl generate cluster faiqcsi3-take4   --from examples/capi-quick-start/nutanix-cluster-cilium-helm-addon.yaml   --kubernetes-version ${KUBERNETES_VERSION}   --worker-machine-count 3 |   kubectl apply --server-side -f -

using the following info

export NUTANIX_USER="<REDACTED>"
export NUTANIX_PASSWORD="<REDACTED>
export NUTANIX_STORAGE_CONTAINER_NAME="default"
export DOCKER_HUB_USERNAME="<REDACTED>"
export DOCKER_HUB_PASSWORD="<REDACTED>"
export NUTANIX_ENDPOINT="prismcentral.dev.ntnxsherlock.com"
export NUTANIX_PORT="9440"

export NUTANIX_PRISM_ELEMENT_CLUSTER_NAME="ganon"
export NUTANIX_INSECURE=false
export NUTANIX_SUBNET_NAME="sherlock_net"
export NUTANIX_MACHINE_TEMPLATE_IMAGE_NAME="ubuntu-2204-kube-v1.28.7.qcow2"
export CONTROL_PLANE_ENDPOINT_IP="10.40.142.X"
export KUBERNETES_VERSION="v1.28.7"

next get the kubeconfig:

clusterctl get kubeconfig faiqcsi3-take4 >> faiqcsi3-take4.conf
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: my-pvc
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 3Gi
---
apiVersion: v1
kind: Pod
metadata:
  name: my-pod
spec:
  containers:
  - name: my-container
    image: nginx
    volumeMounts:
    - name: my-volume
      mountPath: /data
  volumes:
  - name: my-volume
    persistentVolumeClaim:
      claimName: my-pvc

apply that

$ kubectl --kubeconfig=faiqcsi3-take4.conf apply -f podpvc.yaml 
$ kubectl --kubeconfig=faiqcsi3-take4.conf get po 
NAME                                                 READY   STATUS              RESTARTS   AGE
cluster-autoscaler-faiqcsi3-take4-6ff4cbbd67-n2vdm   0/1     ContainerCreating   0          13m
my-pod                                               1/1     Running             0          11m

observe helmChartProxy

$ kubectl get helmchartproxy nutanix-csi-faiqcsi3-take4 -o yaml 
apiVersion: addons.cluster.x-k8s.io/v1alpha1
kind: HelmChartProxy
metadata:
  creationTimestamp: "2024-04-17T19:53:09Z"
  finalizers:
  - helmchartproxy.addons.cluster.x-k8s.io
  generation: 1
  name: nutanix-csi-faiqcsi3-take4
  namespace: default
  ownerReferences:
  - apiVersion: cluster.x-k8s.io/v1beta1
    kind: Cluster
    name: faiqcsi3-take4
    uid: f06bbe3b-0ed3-4bc6-8979-d7e368e0b6d2
  resourceVersion: "77210"
  uid: ae0956b0-c153-4c42-9186-24d1b37c617b
spec:
  chartName: nutanix-csi-storage
  clusterSelector:
    matchLabels:
      cluster.x-k8s.io/cluster-name: faiqcsi3-take4
  namespace: ntnx-system
  options:
    enableClientCache: false
    install:
      createNamespace: true
    timeout: 10m0s
    upgrade:
      maxHistory: 10
  releaseName: nutanix-csi-storage
  repoURL: https://nutanix.github.io/helm-releases/
  valuesTemplate: |-
    # The Secret containing the credentials will be created by the handler.
    createPrismCentralSecret: false
  version: v3.0.0-beta.1912

Notice the version

Special notes for your reviewer:

@faiq faiq self-assigned this Apr 17, 2024
@faiq
Copy link
Contributor Author

faiq commented Apr 17, 2024

For some reason the only storage container i'm able to access is called default

@faiq faiq requested a review from dkoshkin April 17, 2024 20:45
@faiq
Copy link
Contributor Author

faiq commented Apr 17, 2024

I see this from the controller logs

2024-04-17T20:23:25.063Z main.go:292: [WARN] Error getting the data from ConfigMap ntnx-cluster-configmap/ntnx-system : configmaps "ntnx-cluster-configmap" not found

it seems to configure something called categories https://github.com/nutanix-core/k8s-csi/blob/00151b610730c4e567cbee611891c9f4d03c4fee/cmd/init/main.go#L286. I'm not sure what is supposed to go in there.

@faiq faiq enabled auto-merge (squash) April 17, 2024 21:09
@faiq faiq merged commit c9497ff into main Apr 18, 2024
16 checks passed
@faiq faiq deleted the faiq/nutanix-csi-3 branch April 18, 2024 17:50
@github-actions github-actions bot mentioned this pull request Apr 18, 2024
faiq pushed a commit that referenced this pull request Apr 29, 2024
🤖 I have created a release *beep* *boop*
---


## 0.8.0 (2024-04-29)

<!-- Release notes generated using configuration in .github/release.yaml
at main -->

## What's Changed
### Exciting New Features 🎉
* feat: give mutators a clusterGetter function by @faiq in
https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pull/514it was unintelliga
* feat: get default sans via cluster object in patch handler for docker
by @faiq in
#519
* feat: adds nutanix SANs via patchHandler by @faiq in
#522
* feat: nutanix csi driver 3.0 by @faiq in
#531
* feat: Add additionalCategories field to Nutanix machine details patch
by @dlipovetsky in
#525
* feat: support setting Nutanix project on machines by @dkoshkin in
#535
* feat: Upgrade to CAPI v1.7.0 by @jimmidyson in
#555
* feat: CAPI v1.7.1 by @jimmidyson in
#560
* feat: Preserve user-managed fields when applying resources by
@dlipovetsky in
#556
* feat: Preserve user-managed fields when creating namespace by
@dlipovetsky in
#557
* feat: Added e2e test for capx cluster by @deepakm-ntnx in
#523
* feat: add kube-vip static Pod in a Nutanix handler by @dkoshkin in
#558
* feat: AWS CCM for Kubernetes v1.29 by @dkoshkin in
#564
### Fixes 🔧
* fix: updated the capx version used by @deepakm-ntnx in
#513
* fix: add omitempty to CCM Credentials struct by @dkoshkin in
#524
* fix: Add specific descriptions to Nutanix machine details fields by
@dlipovetsky in
#532
* refactor: setting ownership references to Nutanix CSI Helm Chart
Proxies by @dlipovetsky in
#565
### Other Changes
* build: Specify go1.22.2 as toolchain to fix govulncheck issues by
@jimmidyson in
#517
* build: Add metadata for latest v0.7.0 release by @jimmidyson in
#515
* refactor: Consistently import CAPI v1beta1 package as clusterv1 alias
by @jimmidyson in
#518
* build: Fix image tags in release manifests by @jimmidyson in
#516
* test(e2e): Use same versions of providers from module dependencies by
@jimmidyson in
#521
* build: update aws credentials on kind bootstrap cluster by @supershal
in
#507
* refactor: standardize the code for getting Helm values by @dkoshkin in
#500
* build: Use latest k8s for dev and test management cluster by
@jimmidyson in
#526
* docs: Add how to release doc by @jimmidyson in
#530
* build: adds a .envrc.local file for local development for dotenv by
@faiq in
#538
* refactor: create storage classes directly instead of using CRS by
@faiq in
#539
* refactor: Move API to caren.nutanix.com group by @jimmidyson in
#534
* build: Add Kubernetes v1.30.0 option for bootstrap and Docker provider
by @jimmidyson in
#541
* build: create .envrc.e2e file from caren e2e config by @supershal in
#540
* build: Only allow patch updates to k8s libs by @jimmidyson in
#551
* build: Generate CRD YAML by @jimmidyson in
#536
* build: Minor golangci-lint config updates for recent versions by
@jimmidyson in
#552
* build: generated CRDs yamls by @dkoshkin in
#553
* refactor: Use separate types for provider cluster configs by
@jimmidyson in
#537
* docs: Remove additionalCategories from required fields by @dlipovetsky
in
#543
* build: Upgrade tooling, notably go to v1.22.2 by @jimmidyson in
#561
* refactor: provider an entrypoint to the infra provider meta handlers
by @dkoshkin in
#554
* test(e2e): Add self-hosted e2e test by @jimmidyson in
#439
* build: Bundle k8s.io/* back in with sigs.k8s.io/* dependencies by
@jimmidyson in
#583
* build: Add envtest setup to e2e envrc by @jimmidyson in
#563

## New Contributors
* @deepakm-ntnx made their first contribution in
#513

**Full Changelog**:
v0.7.0...v0.8.0

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants