Skip to content

Commit 607ce9e

Browse files
committed
review comments fixes
1 parent 46db67e commit 607ce9e

File tree

10 files changed

+238
-9
lines changed

10 files changed

+238
-9
lines changed

api/v1alpha1/nutanix_clusterconfig_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ func (NutanixControlPlaneEndpointSpec) VariableSchema() clusterv1.VariableSchema
3535
Type: "object",
3636
Properties: map[string]clusterv1.JSONSchemaProps{
3737
"host": {
38-
Description: "host ip/fqdn for control plane api server",
38+
Description: "host ip/fqdn for control plane API Server",
3939
Type: "string",
4040
},
4141
"port": {
42-
Description: "port for control plane api server",
42+
Description: "port for control plane API Server",
4343
Type: "integer",
4444
},
4545
},

cmd/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ func main() {
135135
dockermutation.MetaWorkerPatchHandler(),
136136
}
137137

138-
// dnutanixMetaHandlers combines all Nutanix patch and variable handlers under a single handler.
138+
// nutanixMetaHandlers combines all Nutanix patch and variable handlers under a single handler.
139139
// It allows to specify configuration under a single variable.
140140
nutanixMetaHandlers := []handlers.Named{
141141
nutanixclusterconfig.NewVariable(),

examples/capi-quick-start/nutanix-cluster-calico-helm-addon.yaml

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,119 @@
11
apiVersion: cluster.x-k8s.io/v1beta1
22
kind: Cluster
3+
metadata:
4+
labels:
5+
ccm: nutanix
6+
cluster.x-k8s.io/cluster-name: ${CLUSTER_NAME}
7+
cluster.x-k8s.io/provider: infrastructure-nutanix
8+
name: ${CLUSTER_NAME}
9+
spec:
10+
clusterNetwork:
11+
pods:
12+
cidrBlocks:
13+
- ${POD_CIDR:-192.168.0.0/16}
14+
serviceDomain: cluster.local
15+
services:
16+
cidrBlocks:
17+
- ${SERVICE_CIDR:-10.128.0.0/12}
18+
topology:
19+
class: test-cre
20+
controlPlane:
21+
metadata: {}
22+
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
23+
variables:
24+
- name: clusterConfig
25+
value:
26+
addons:
27+
cni:
28+
provider: Cilium
29+
strategy: ClusterResourceSet
30+
nutanix: {}
31+
version: ${KUBERNETES_VERSION}
32+
workers:
33+
machineDeployments:
34+
- class: ${CLUSTER_CLASS_NAME}-worker
35+
metadata: {}
36+
name: md-0
37+
replicas: ${WORKER_MACHINE_COUNT}
38+
---
39+
apiVersion: cluster.x-k8s.io/v1beta1
40+
kind: Cluster
41+
metadata:
42+
labels:
43+
ccm: nutanix
44+
cluster.x-k8s.io/cluster-name: ${CLUSTER_NAME}
45+
cluster.x-k8s.io/provider: infrastructure-nutanix
46+
name: ${CLUSTER_NAME}
47+
spec:
48+
clusterNetwork:
49+
pods:
50+
cidrBlocks:
51+
- ${POD_CIDR:-192.168.0.0/16}
52+
serviceDomain: cluster.local
53+
services:
54+
cidrBlocks:
55+
- ${SERVICE_CIDR:-10.128.0.0/12}
56+
topology:
57+
class: test-cre
58+
controlPlane:
59+
metadata: {}
60+
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
61+
variables:
62+
- name: clusterConfig
63+
value:
64+
addons:
65+
cni:
66+
provider: Cilium
67+
strategy: HelmAddon
68+
nutanix: {}
69+
version: ${KUBERNETES_VERSION}
70+
workers:
71+
machineDeployments:
72+
- class: ${CLUSTER_CLASS_NAME}-worker
73+
metadata: {}
74+
name: md-0
75+
replicas: ${WORKER_MACHINE_COUNT}
76+
---
77+
apiVersion: cluster.x-k8s.io/v1beta1
78+
kind: Cluster
79+
metadata:
80+
labels:
81+
ccm: nutanix
82+
cluster.x-k8s.io/cluster-name: ${CLUSTER_NAME}
83+
cluster.x-k8s.io/provider: infrastructure-nutanix
84+
name: ${CLUSTER_NAME}
85+
spec:
86+
clusterNetwork:
87+
pods:
88+
cidrBlocks:
89+
- ${POD_CIDR:-192.168.0.0/16}
90+
serviceDomain: cluster.local
91+
services:
92+
cidrBlocks:
93+
- ${SERVICE_CIDR:-10.128.0.0/12}
94+
topology:
95+
class: test-cre
96+
controlPlane:
97+
metadata: {}
98+
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
99+
variables:
100+
- name: clusterConfig
101+
value:
102+
addons:
103+
cni:
104+
provider: Calico
105+
strategy: ClusterResourceSet
106+
nutanix: {}
107+
version: ${KUBERNETES_VERSION}
108+
workers:
109+
machineDeployments:
110+
- class: ${CLUSTER_CLASS_NAME}-worker
111+
metadata: {}
112+
name: md-0
113+
replicas: ${WORKER_MACHINE_COUNT}
114+
---
115+
apiVersion: cluster.x-k8s.io/v1beta1
116+
kind: Cluster
3117
metadata:
4118
labels:
5119
ccm: nutanix

examples/capi-quick-start/nutanix-cluster-cilium-helm-addon.yaml

Lines changed: 115 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,120 @@ spec:
2626
addons:
2727
cni:
2828
provider: Cilium
29+
strategy: ClusterResourceSet
30+
nutanix: {}
31+
version: ${KUBERNETES_VERSION}
32+
workers:
33+
machineDeployments:
34+
- class: ${CLUSTER_CLASS_NAME}-worker
35+
metadata: {}
36+
name: md-0
37+
replicas: ${WORKER_MACHINE_COUNT}
38+
---
39+
apiVersion: cluster.x-k8s.io/v1beta1
40+
kind: Cluster
41+
metadata:
42+
labels:
43+
ccm: nutanix
44+
cluster.x-k8s.io/cluster-name: ${CLUSTER_NAME}
45+
cluster.x-k8s.io/provider: infrastructure-nutanix
46+
name: ${CLUSTER_NAME}
47+
spec:
48+
clusterNetwork:
49+
pods:
50+
cidrBlocks:
51+
- ${POD_CIDR:-192.168.0.0/16}
52+
serviceDomain: cluster.local
53+
services:
54+
cidrBlocks:
55+
- ${SERVICE_CIDR:-10.128.0.0/12}
56+
topology:
57+
class: test-cre
58+
controlPlane:
59+
metadata: {}
60+
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
61+
variables:
62+
- name: clusterConfig
63+
value:
64+
addons:
65+
cni:
66+
provider: Cilium
67+
strategy: HelmAddon
68+
nutanix: {}
69+
version: ${KUBERNETES_VERSION}
70+
workers:
71+
machineDeployments:
72+
- class: ${CLUSTER_CLASS_NAME}-worker
73+
metadata: {}
74+
name: md-0
75+
replicas: ${WORKER_MACHINE_COUNT}
76+
---
77+
apiVersion: cluster.x-k8s.io/v1beta1
78+
kind: Cluster
79+
metadata:
80+
labels:
81+
ccm: nutanix
82+
cluster.x-k8s.io/cluster-name: ${CLUSTER_NAME}
83+
cluster.x-k8s.io/provider: infrastructure-nutanix
84+
name: ${CLUSTER_NAME}
85+
spec:
86+
clusterNetwork:
87+
pods:
88+
cidrBlocks:
89+
- ${POD_CIDR:-192.168.0.0/16}
90+
serviceDomain: cluster.local
91+
services:
92+
cidrBlocks:
93+
- ${SERVICE_CIDR:-10.128.0.0/12}
94+
topology:
95+
class: test-cre
96+
controlPlane:
97+
metadata: {}
98+
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
99+
variables:
100+
- name: clusterConfig
101+
value:
102+
addons:
103+
cni:
104+
provider: Calico
105+
strategy: ClusterResourceSet
106+
nutanix: {}
107+
version: ${KUBERNETES_VERSION}
108+
workers:
109+
machineDeployments:
110+
- class: ${CLUSTER_CLASS_NAME}-worker
111+
metadata: {}
112+
name: md-0
113+
replicas: ${WORKER_MACHINE_COUNT}
114+
---
115+
apiVersion: cluster.x-k8s.io/v1beta1
116+
kind: Cluster
117+
metadata:
118+
labels:
119+
ccm: nutanix
120+
cluster.x-k8s.io/cluster-name: ${CLUSTER_NAME}
121+
cluster.x-k8s.io/provider: infrastructure-nutanix
122+
name: ${CLUSTER_NAME}
123+
spec:
124+
clusterNetwork:
125+
pods:
126+
cidrBlocks:
127+
- ${POD_CIDR:-192.168.0.0/16}
128+
serviceDomain: cluster.local
129+
services:
130+
cidrBlocks:
131+
- ${SERVICE_CIDR:-10.128.0.0/12}
132+
topology:
133+
class: test-cre
134+
controlPlane:
135+
metadata: {}
136+
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
137+
variables:
138+
- name: clusterConfig
139+
value:
140+
addons:
141+
cni:
142+
provider: Calico
29143
strategy: HelmAddon
30144
nutanix: {}
31145
version: ${KUBERNETES_VERSION}
@@ -34,4 +148,4 @@ spec:
34148
- class: ${CLUSTER_CLASS_NAME}-worker
35149
metadata: {}
36150
name: md-0
37-
replicas: ${WORKER_MACHINE_COUNT}
151+
replicas: ${WORKER_MACHINE_COUNT}

hack/examples/bases/nutanix/calico/crs/kustomization.yaml.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
55
kind: Kustomization
66

77
resources:
8-
- https://github.com/nutanix-cloud-native/cluster-api-provider-nutanix/releases/download/v1.4.0-alpha.1/cluster-template-topology.yaml
8+
- https://github.com/nutanix-cloud-native/cluster-api-provider-nutanix/releases/download/${CAPX_VERSION}/cluster-template-topology.yaml
99

1010
patches:
1111
- target:

hack/examples/bases/nutanix/calico/helm-addon/kustomization.yaml.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
55
kind: Kustomization
66

77
resources:
8-
- https://github.com/nutanix-cloud-native/cluster-api-provider-nutanix/releases/download/v1.4.0-alpha.1/cluster-template-topology.yaml
8+
- https://github.com/nutanix-cloud-native/cluster-api-provider-nutanix/releases/download/${CAPX_VERSION}/cluster-template-topology.yaml
99

1010
patches:
1111
- target:

hack/examples/bases/nutanix/cilium/crs/kustomization.yaml.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
55
kind: Kustomization
66

77
resources:
8-
- https://github.com/nutanix-cloud-native/cluster-api-provider-nutanix/releases/download/v1.4.0-alpha.1/cluster-template-topology.yaml
8+
- https://github.com/nutanix-cloud-native/cluster-api-provider-nutanix/releases/download/${CAPX_VERSION}/cluster-template-topology.yaml
99

1010
patches:
1111
- target:

hack/examples/bases/nutanix/cilium/helm-addon/kustomization.yaml.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
55
kind: Kustomization
66

77
resources:
8-
- https://github.com/nutanix-cloud-native/cluster-api-provider-nutanix/releases/download/v1.4.0-alpha.1/cluster-template-topology.yaml
8+
- https://github.com/nutanix-cloud-native/cluster-api-provider-nutanix/releases/download/${CAPX_VERSION}/cluster-template-topology.yaml
99

1010
patches:
1111
- target:

hack/examples/bases/nutanix/kustomization.yaml.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ resources:
99
- ./cilium/helm-addon
1010
- ./calico/crs
1111
- ./calico/helm-addon
12-
- https://github.com/nutanix-cloud-native/cluster-api-provider-nutanix/releases/download/v1.4.0-alpha.1/cluster-template-clusterclass.yaml
12+
- https://github.com/nutanix-cloud-native/cluster-api-provider-nutanix/releases/download/${CAPX_VERSION}/cluster-template-clusterclass.yaml
1313

1414
namePrefix:
1515

make/examples.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export KUBERNETES_VERSION := v1.27.5
55

66
export CLUSTERCTL_VERSION := $(shell clusterctl version -o short 2>/dev/null)
77
export CAPA_VERSION := $(shell cd hack/third-party/capa && go list -m -f '{{ .Version }}' sigs.k8s.io/cluster-api-provider-aws/v2)
8+
export CAPX_VERSION := $(shell cd hack/third-party/capx && go list -m -f '{{ .Version }}' github.com/nutanix-cloud-native/cluster-api-provider-nutanix)
89

910
.PHONY: examples.sync
1011
examples.sync: ## Syncs the examples by fetching upstream examples and applying kustomize patches

0 commit comments

Comments
 (0)