Skip to content

Commit c9e2b36

Browse files
build(deps): Upgrade CAPX version to v1.4.0 (#707)
Update version of CAPX to latest CAPX release v1.4.0
1 parent 2cb6ec5 commit c9e2b36

File tree

11 files changed

+56
-718
lines changed

11 files changed

+56
-718
lines changed

api/external/github.com/nutanix-cloud-native/cluster-api-provider-nutanix/api/v1beta1/conditions.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,7 @@ const (
7474
// CredentialRefSecretOwnerSetCondition shows the status of setting the Owner
7575
CredentialRefSecretOwnerSetCondition capiv1.ConditionType = "CredentialRefSecretOwnerSet"
7676

77-
CredentialRefSecretOwnerSetFailed = "CredentialRefSecretOwnerSetFailed"
77+
CredentialRefSecretOwnerSetFailed = "CredentialRefSecretOwnerSetFailed"
78+
TrustBundleSecretOwnerSetCondition = "TrustBundleSecretOwnerSet"
79+
TrustBundleSecretOwnerSetFailed = "TrustBundleSecretOwnerSetFailed"
7880
)

api/external/github.com/nutanix-cloud-native/cluster-api-provider-nutanix/api/v1beta1/nutanixcluster_types.go

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ limitations under the License.
1717
package v1beta1
1818

1919
import (
20+
"cmp"
2021
"fmt"
2122

2223
credentialTypes "github.com/nutanix-cloud-native/prism-go-client/environment/credentials"
24+
corev1 "k8s.io/api/core/v1"
2325
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2426
capiv1 "sigs.k8s.io/cluster-api/api/v1beta1"
2527
"sigs.k8s.io/cluster-api/errors"
@@ -128,8 +130,6 @@ type NutanixFailureDomain struct {
128130
// obtained from the Prism Central console or using the prism_central API.
129131
// +kubebuilder:validation:Required
130132
// +kubebuilder:validation:MinItems=1
131-
// +listType=map
132-
// +listMapKey=type
133133
Subnets []NutanixResourceIdentifier `json:"subnets"`
134134

135135
// indicates if a failure domain is suited for control plane nodes
@@ -162,6 +162,24 @@ func (ncl *NutanixCluster) GetPrismCentralCredentialRef() (*credentialTypes.Nuta
162162
return prismCentralInfo.CredentialRef, nil
163163
}
164164

165+
// GetPrismCentralTrustBundle returns the trust bundle reference for the Nutanix Prism Central.
166+
func (ncl *NutanixCluster) GetPrismCentralTrustBundle() *credentialTypes.NutanixTrustBundleReference {
167+
prismCentralInfo := ncl.Spec.PrismCentral
168+
if prismCentralInfo == nil ||
169+
prismCentralInfo.AdditionalTrustBundle == nil ||
170+
prismCentralInfo.AdditionalTrustBundle.Kind == credentialTypes.NutanixTrustBundleKindString {
171+
return nil
172+
}
173+
174+
return prismCentralInfo.AdditionalTrustBundle
175+
}
176+
177+
// GetNamespacedName returns the namespaced name of the NutanixCluster.
178+
func (ncl *NutanixCluster) GetNamespacedName() string {
179+
namespace := cmp.Or(ncl.Namespace, corev1.NamespaceDefault)
180+
return fmt.Sprintf("%s/%s", namespace, ncl.Name)
181+
}
182+
165183
// +kubebuilder:object:root=true
166184

167185
// NutanixClusterList contains a list of NutanixCluster

api/external/github.com/nutanix-cloud-native/cluster-api-provider-nutanix/api/v1beta1/nutanixmachine_types.go

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,26 @@ const (
3535
// resources associated with NutanixMachine before removing it from the
3636
// API Server.
3737
NutanixMachineFinalizer = "nutanixmachine.infrastructure.cluster.x-k8s.io"
38+
39+
// NutanixMachineBootstrapRefKindSecret represents the Kind of Secret
40+
// referenced by NutanixMachine's BootstrapRef.
41+
NutanixMachineBootstrapRefKindSecret = "Secret"
42+
43+
// NutanixMachineBootstrapRefKindImage represents the Kind of Image
44+
// referenced by NutanixMachine's BootstrapRef. If the BootstrapRef.Kind is set
45+
// to Image, the NutanixMachine will be created with the image mounted
46+
// as a CD-ROM.
47+
NutanixMachineBootstrapRefKindImage = "Image"
3848
)
3949

4050
// NutanixMachineSpec defines the desired state of NutanixMachine
4151
type NutanixMachineSpec struct {
4252
// SPEC FIELDS - desired state of NutanixMachine
4353
// Important: Run "make" to regenerate code after modifying this file
4454

45-
ProviderID string `json:"providerID"`
55+
// ProviderID is the unique identifier as specified by the cloud provider.
56+
// +optional
57+
ProviderID string `json:"providerID,omitempty"`
4658
// vcpusPerSocket is the number of vCPUs per socket of the VM
4759
// +kubebuilder:validation:Required
4860
// +kubebuilder:validation:Minimum=1

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

charts/cluster-api-runtime-extensions-nutanix/defaultclusterclasses/nutanix-cluster-class.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ spec:
196196
name: ""
197197
type: name
198198
memorySize: 4Gi
199-
providerID: nutanix://vm-uuid
200199
subnet:
201200
- name: ""
202201
type: name
@@ -221,7 +220,6 @@ spec:
221220
name: ""
222221
type: name
223222
memorySize: 4Gi
224-
providerID: nutanix://vm-uuid
225223
subnet:
226224
- name: ""
227225
type: name

docs/content/getting-started/deployment/via-clusterctl.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ env CLUSTER_TOPOLOGY=true \
2626
NUTANIX_ENDPOINT= NUTANIX_PASSWORD= NUTANIX_USER= \
2727
AWS_B64ENCODED_CREDENTIALS= \
2828
clusterctl init \
29-
--infrastructure docker,nutanix:v1.4.0-alpha.2,aws \
29+
--infrastructure docker,nutanix:v1.4.0,aws \
3030
--addon helm \
3131
--runtime-extension caren:v{{< param "version" >}} \
3232
--wait-providers

docs/content/getting-started/deployment/via-helm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ env CLUSTER_TOPOLOGY=true \
1414
NUTANIX_ENDPOINT= NUTANIX_PASSWORD= NUTANIX_USER= \
1515
AWS_B64ENCODED_CREDENTIALS= \
1616
clusterctl init \
17-
--infrastructure docker,nutanix:v1.4.0-alpha.2,aws \
17+
--infrastructure docker,nutanix:v1.4.0,aws \
1818
--addon helm \
1919
--wait-providers
2020
```

hack/third-party/capx/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ go 1.22.1
77

88
toolchain go1.22.2
99

10-
require github.com/nutanix-cloud-native/cluster-api-provider-nutanix v1.4.0-alpha.2
10+
require github.com/nutanix-cloud-native/cluster-api-provider-nutanix v1.4.0
1111

1212
require (
1313
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
@@ -24,7 +24,7 @@ require (
2424
github.com/mailru/easyjson v0.7.7 // indirect
2525
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
2626
github.com/modern-go/reflect2 v1.0.2 // indirect
27-
github.com/nutanix-cloud-native/prism-go-client v0.3.4 // indirect
27+
github.com/nutanix-cloud-native/prism-go-client v0.4.0 // indirect
2828
github.com/pkg/errors v0.9.1 // indirect
2929
golang.org/x/net v0.24.0 // indirect
3030
golang.org/x/text v0.14.0 // indirect

0 commit comments

Comments
 (0)