Skip to content

Commit

Permalink
patches
Browse files Browse the repository at this point in the history
  • Loading branch information
deepakm-ntnx committed Feb 27, 2024
1 parent 25aeaf6 commit 69e75fa
Show file tree
Hide file tree
Showing 5 changed files with 129 additions and 233 deletions.
114 changes: 0 additions & 114 deletions examples/capi-quick-start/nutanix-cluster-calico-helm-addon.yaml
Original file line number Diff line number Diff line change
@@ -1,119 +1,5 @@
apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
labels:
ccm: nutanix
cluster.x-k8s.io/cluster-name: ${CLUSTER_NAME}
cluster.x-k8s.io/provider: infrastructure-nutanix
name: ${CLUSTER_NAME}
spec:
clusterNetwork:
pods:
cidrBlocks:
- ${POD_CIDR:-192.168.0.0/16}
serviceDomain: cluster.local
services:
cidrBlocks:
- ${SERVICE_CIDR:-10.128.0.0/12}
topology:
class: test-cre
controlPlane:
metadata: {}
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
variables:
- name: clusterConfig
value:
addons:
cni:
provider: Cilium
strategy: ClusterResourceSet
nutanix: {}
version: ${KUBERNETES_VERSION}
workers:
machineDeployments:
- class: ${CLUSTER_CLASS_NAME}-worker
metadata: {}
name: md-0
replicas: ${WORKER_MACHINE_COUNT}
---
apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
labels:
ccm: nutanix
cluster.x-k8s.io/cluster-name: ${CLUSTER_NAME}
cluster.x-k8s.io/provider: infrastructure-nutanix
name: ${CLUSTER_NAME}
spec:
clusterNetwork:
pods:
cidrBlocks:
- ${POD_CIDR:-192.168.0.0/16}
serviceDomain: cluster.local
services:
cidrBlocks:
- ${SERVICE_CIDR:-10.128.0.0/12}
topology:
class: test-cre
controlPlane:
metadata: {}
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
variables:
- name: clusterConfig
value:
addons:
cni:
provider: Cilium
strategy: HelmAddon
nutanix: {}
version: ${KUBERNETES_VERSION}
workers:
machineDeployments:
- class: ${CLUSTER_CLASS_NAME}-worker
metadata: {}
name: md-0
replicas: ${WORKER_MACHINE_COUNT}
---
apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
labels:
ccm: nutanix
cluster.x-k8s.io/cluster-name: ${CLUSTER_NAME}
cluster.x-k8s.io/provider: infrastructure-nutanix
name: ${CLUSTER_NAME}
spec:
clusterNetwork:
pods:
cidrBlocks:
- ${POD_CIDR:-192.168.0.0/16}
serviceDomain: cluster.local
services:
cidrBlocks:
- ${SERVICE_CIDR:-10.128.0.0/12}
topology:
class: test-cre
controlPlane:
metadata: {}
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
variables:
- name: clusterConfig
value:
addons:
cni:
provider: Calico
strategy: ClusterResourceSet
nutanix: {}
version: ${KUBERNETES_VERSION}
workers:
machineDeployments:
- class: ${CLUSTER_CLASS_NAME}-worker
metadata: {}
name: md-0
replicas: ${WORKER_MACHINE_COUNT}
---
apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
labels:
ccm: nutanix
Expand Down
114 changes: 0 additions & 114 deletions examples/capi-quick-start/nutanix-cluster-cilium-helm-addon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,120 +26,6 @@ spec:
addons:
cni:
provider: Cilium
strategy: ClusterResourceSet
nutanix: {}
version: ${KUBERNETES_VERSION}
workers:
machineDeployments:
- class: ${CLUSTER_CLASS_NAME}-worker
metadata: {}
name: md-0
replicas: ${WORKER_MACHINE_COUNT}
---
apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
labels:
ccm: nutanix
cluster.x-k8s.io/cluster-name: ${CLUSTER_NAME}
cluster.x-k8s.io/provider: infrastructure-nutanix
name: ${CLUSTER_NAME}
spec:
clusterNetwork:
pods:
cidrBlocks:
- ${POD_CIDR:-192.168.0.0/16}
serviceDomain: cluster.local
services:
cidrBlocks:
- ${SERVICE_CIDR:-10.128.0.0/12}
topology:
class: test-cre
controlPlane:
metadata: {}
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
variables:
- name: clusterConfig
value:
addons:
cni:
provider: Cilium
strategy: HelmAddon
nutanix: {}
version: ${KUBERNETES_VERSION}
workers:
machineDeployments:
- class: ${CLUSTER_CLASS_NAME}-worker
metadata: {}
name: md-0
replicas: ${WORKER_MACHINE_COUNT}
---
apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
labels:
ccm: nutanix
cluster.x-k8s.io/cluster-name: ${CLUSTER_NAME}
cluster.x-k8s.io/provider: infrastructure-nutanix
name: ${CLUSTER_NAME}
spec:
clusterNetwork:
pods:
cidrBlocks:
- ${POD_CIDR:-192.168.0.0/16}
serviceDomain: cluster.local
services:
cidrBlocks:
- ${SERVICE_CIDR:-10.128.0.0/12}
topology:
class: test-cre
controlPlane:
metadata: {}
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
variables:
- name: clusterConfig
value:
addons:
cni:
provider: Calico
strategy: ClusterResourceSet
nutanix: {}
version: ${KUBERNETES_VERSION}
workers:
machineDeployments:
- class: ${CLUSTER_CLASS_NAME}-worker
metadata: {}
name: md-0
replicas: ${WORKER_MACHINE_COUNT}
---
apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
labels:
ccm: nutanix
cluster.x-k8s.io/cluster-name: ${CLUSTER_NAME}
cluster.x-k8s.io/provider: infrastructure-nutanix
name: ${CLUSTER_NAME}
spec:
clusterNetwork:
pods:
cidrBlocks:
- ${POD_CIDR:-192.168.0.0/16}
serviceDomain: cluster.local
services:
cidrBlocks:
- ${SERVICE_CIDR:-10.128.0.0/12}
topology:
class: test-cre
controlPlane:
metadata: {}
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
variables:
- name: clusterConfig
value:
addons:
cni:
provider: Calico
strategy: HelmAddon
nutanix: {}
version: ${KUBERNETES_VERSION}
Expand Down
124 changes: 124 additions & 0 deletions examples/capi-quick-start/nutanix-final-example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
labels:
ccm: nutanix
cluster.x-k8s.io/cluster-name: ${CLUSTER_NAME}
cluster.x-k8s.io/provider: infrastructure-nutanix
name: ${CLUSTER_NAME}
spec:
clusterNetwork:
pods:
cidrBlocks:
- ${POD_CIDR:-192.168.0.0/16}
serviceDomain: cluster.local
services:
cidrBlocks:
- ${SERVICE_CIDR:-10.128.0.0/12}
topology:
class: test-cre
controlPlane:
metadata: {}
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
variables:
- name: clusterConfig
value:
etcd:
image:
repository: my-registry.io/my-org/my-repo
tag: "v3.5.99_custom.0"
extraAPIServerCertSANs:
- a.b.c.example.com
- d.e.f.example.com
globalImageRegistryMirror:
url: https://example.com
credentials:
secretRef:
name: my-mirror-ca-cert
proxy:
http: http://example.com
https: http://example.com
additionalNo:
- no-proxy-1.example.com
- no-proxy-2.example.com
imageRegistries:
- url: https://my-registry.io
credentials:
secretRef:
name: my-registry-credentials
kubernetesImageRepository: "my-registry.io/my-org/my-repo"
prismCentralEndpoint:
address: "PC-ip-fqdn"
port: 9440
insecure: false
additionalTrustBundle: "trust-bundle-root-ca"
controlPlane:
nutanix:
endpoint:
host: "api-server-ip-fqdn"
port: 6443
users:
- name: capxuser
sshKey: ssh-key-expample-1
bootType: legacy
cluster:
name: PE1
type: name
image:
name: image1
type: name
memorySize: 4Gi
systemDiskSize: 40Gi
vcpuSockets: 2
vcpusPerSocket: 1
subnet:
name: subnet1
type: name
project: prj1
additionalCategories:
- key1: value1
- key2: value2
gpus:
- type: name
name: gpu1
- type: name
name: gpu2
addons:
cni:
provider: Cilium
strategy: HelmAddon
csi: {}
nfd: {}
- name: workerConfig
value:
nutanix:
bootType: legacy
cluster:
name: PE1
type: name
image:
name: image1
type: name
memorySize: 4Gi
systemDiskSize: 40Gi
vcpuSockets: 2
vcpusPerSocket: 1
subnet:
name: subnet1
type: name
project: prj1
additionalCategories:
- key1: value1
- key2: value2
gpus:
- type: name
name: gpu1
- type: name
name: gpu2
version: ${KUBERNETES_VERSION}
workers:
machineDeployments:
- class: ${CLUSTER_CLASS_NAME}-worker
metadata: {}
name: md-0
replicas: ${WORKER_MACHINE_COUNT}
8 changes: 4 additions & 4 deletions hack/examples/sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ kustomize build ./hack/examples |
>(
gojq --yaml-input --yaml-output 'select(.metadata.labels["cluster.x-k8s.io/provider"] == "infrastructure-nutanix"
and .kind == "Cluster"
# and .spec.topology.variables[0].value.addons.cni.provider == "Calico"
# and .spec.topology.variables[0].value.addons.cni.strategy == "HelmAddon"
and .spec.topology.variables[0].value.addons.cni.provider == "Calico"
and .spec.topology.variables[0].value.addons.cni.strategy == "HelmAddon"
)' >"${EXAMPLE_CLUSTERS_DIR}/nutanix-cluster-calico-helm-addon.yaml"
) \
>(
Expand All @@ -126,8 +126,8 @@ kustomize build ./hack/examples |
>(
gojq --yaml-input --yaml-output 'select(.metadata.labels["cluster.x-k8s.io/provider"] == "infrastructure-nutanix"
and .kind == "Cluster"
# and .spec.topology.variables[0].value.addons.cni.provider == "Cilium"
# and .spec.topology.variables[0].value.addons.cni.strategy == "HelmAddon"
and .spec.topology.variables[0].value.addons.cni.provider == "Cilium"
and .spec.topology.variables[0].value.addons.cni.strategy == "HelmAddon"
)' >"${EXAMPLE_CLUSTERS_DIR}/nutanix-cluster-cilium-helm-addon.yaml"
) \
>/dev/null
Expand Down
2 changes: 1 addition & 1 deletion make/clusterctl.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ clusterctl.init:
AWS_B64ENCODED_CREDENTIALS= \
clusterctl init \
--kubeconfig=$(KIND_KUBECONFIG) \
--infrastructure docker,aws \
--infrastructure docker,aws,nutanix \
--addon helm \
--wait-providers

Expand Down

0 comments on commit 69e75fa

Please sign in to comment.