Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

feat: Add support for CAPX #6

Merged
merged 18 commits into from
Apr 3, 2024
Merged

feat: Add support for CAPX #6

merged 18 commits into from
Apr 3, 2024

Conversation

deepakm-ntnx
Copy link

@deepakm-ntnx deepakm-ntnx commented Mar 21, 2024

pushed from nutanix-cloud-native#384 to this repo
Also patches from #5 are required

to get latest nutanix apis from capx repo

make apis.sync

to regenerate example Cluster with topology yamls

 make examples.sync

To run unit tests

make lint
 make test

To deploy cre controller as well as nutanix provider and cluster class of nutanix

make dev.run-on-kind 
make make dev.update-webhook-image-on-kind

To deploy nutanix cluster with topology with cre annotations

export KUBECONFIG=/go/src/github.com/deepakm-ntnx/capi-runtime-extensions/.local/kind/capi-runtime-extensions-dev/kubeconfig
clusterctl generate cluster nutanix-quick-start-helm-addon-cilium \
  --from examples/capi-quick-start/nutanix-cluster-cilium-helm-addon.yaml \
  --kubernetes-version v1.29.1 \
  --worker-machine-count 1 | \
  kubectl apply --server-side -f -

@deepakm-ntnx deepakm-ntnx changed the title Krbn 8015 feat: Add support for CAPX Mar 21, 2024
@github-actions github-actions bot added feature and removed feature labels Mar 21, 2024
@dkoshkin
Copy link
Collaborator

dkoshkin commented Apr 1, 2024

@deepakm-ntnx the commits need to have the conventional commits format fix/feat/build/refactor etc.

Can you please squash the commits here that make sense to be together, I think that will also make it simpler to review.

@deepakm-ntnx deepakm-ntnx force-pushed the KRBN-8015 branch 2 times, most recently from c00bb82 to 53a057f Compare April 1, 2024 21:16
dkoshkin
dkoshkin previously approved these changes Apr 2, 2024
Copy link
Collaborator

@dkoshkin dkoshkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy with this, thanks @deepakm-ntnx!

Tested locally with both Calico and Cilium, everything looks great.

CONTROL_PLANE_ENDPOINT_IP=<>
CONTROL_PLANE_ENDPOINT_PORT=6443

NUTANIX_ENDPOINT=<>
NUTANIX_USER=<>
NUTANIX_PASSWORD=<>
NUTANIX_PRISM_ELEMENT_CLUSTER_NAME=<>
NUTANIX_INSECURE=false
NUTANIX_SUBNET_NAME=<>
NUTANIX_MACHINE_TEMPLATE_IMAGE_NAME=ubuntu-2204-kube-v1.28.7.qcow2

CLUSTER_NAME=dkoshkin-nutanix-caren-1 
CLUSTER_FILE=examples/capi-quick-start/nutanix-cluster-calico-crs.yaml
KUBERNETES_VERSION=v1.28.7 

clusterctl generate cluster ${CLUSTER_NAME} \
  --from ${CLUSTER_FILE} \
  --kubernetes-version ${KUBERNETES_VERSION} \
  --worker-machine-count 1 | \
  kubectl apply --server-side -f -

Nodes came up:

$ kubectl get nodes
NAME                                              STATUS   ROLES           AGE     VERSION
dkoshkin-nutanix-caren-1-drvx2-tk7c5              Ready    control-plane   3m13s   v1.28.7
dkoshkin-nutanix-caren-1-md-0-9pmr9-bj6rx-gx982   Ready    <none>          2m15s   v1.28.7

@deepakm-ntnx deepakm-ntnx merged commit aa6feca into main Apr 3, 2024
16 checks passed
@deepakm-ntnx deepakm-ntnx deleted the KRBN-8015 branch April 3, 2024 15:40
@github-actions github-actions bot mentioned this pull request Apr 2, 2024
jimmidyson pushed a commit that referenced this pull request Apr 11, 2024
* fix: added support for capx

* refactor: reuse existing CAPX types

* fix: set allowed enums for Nutanix resource types

* fix: set required for Nutanix node type

* fix: reuse resource.Quantity types

* fix: set defaults and validation

* fix: rename field to subnets

* refactor: fix handlers after API changes

* test: add new unit tests

* refactor: bring back host instead of address

* fix: examples with updated APIs

* fix: using latest capx private brach to test kube-vip fix

* fix: set namespace for credentialRef

The patch failed with the following error:
got failure response with message failed to apply JSON patches to input:
replace operation does not apply:
doc is missing key:
/spec/template/spec/prismCentral/credentialRef/namespace: missing value.

* docs: fix users example

* docs: deploying Calico for Nutanix

* fix: added basic docs for nutanix mutations

* fix: lint related fixes

* docs: minor changes

---------

Co-authored-by: Dimitri Koshkin <dimitri.koshkin@nutanix.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants