Skip to content

Commit

Permalink
build(deps): Upgrade CAPX version to v1.4.0 (#707)
Browse files Browse the repository at this point in the history
Update version of CAPX to latest CAPX release v1.4.0
  • Loading branch information
thunderboltsid authored Jun 10, 2024
1 parent 2cb6ec5 commit c9e2b36
Show file tree
Hide file tree
Showing 11 changed files with 56 additions and 718 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,7 @@ const (
// CredentialRefSecretOwnerSetCondition shows the status of setting the Owner
CredentialRefSecretOwnerSetCondition capiv1.ConditionType = "CredentialRefSecretOwnerSet"

CredentialRefSecretOwnerSetFailed = "CredentialRefSecretOwnerSetFailed"
CredentialRefSecretOwnerSetFailed = "CredentialRefSecretOwnerSetFailed"
TrustBundleSecretOwnerSetCondition = "TrustBundleSecretOwnerSet"
TrustBundleSecretOwnerSetFailed = "TrustBundleSecretOwnerSetFailed"
)
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ limitations under the License.
package v1beta1

import (
"cmp"
"fmt"

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

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

// GetPrismCentralTrustBundle returns the trust bundle reference for the Nutanix Prism Central.
func (ncl *NutanixCluster) GetPrismCentralTrustBundle() *credentialTypes.NutanixTrustBundleReference {
prismCentralInfo := ncl.Spec.PrismCentral
if prismCentralInfo == nil ||
prismCentralInfo.AdditionalTrustBundle == nil ||
prismCentralInfo.AdditionalTrustBundle.Kind == credentialTypes.NutanixTrustBundleKindString {
return nil
}

return prismCentralInfo.AdditionalTrustBundle
}

// GetNamespacedName returns the namespaced name of the NutanixCluster.
func (ncl *NutanixCluster) GetNamespacedName() string {
namespace := cmp.Or(ncl.Namespace, corev1.NamespaceDefault)
return fmt.Sprintf("%s/%s", namespace, ncl.Name)
}

// +kubebuilder:object:root=true

// NutanixClusterList contains a list of NutanixCluster
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,26 @@ const (
// resources associated with NutanixMachine before removing it from the
// API Server.
NutanixMachineFinalizer = "nutanixmachine.infrastructure.cluster.x-k8s.io"

// NutanixMachineBootstrapRefKindSecret represents the Kind of Secret
// referenced by NutanixMachine's BootstrapRef.
NutanixMachineBootstrapRefKindSecret = "Secret"

// NutanixMachineBootstrapRefKindImage represents the Kind of Image
// referenced by NutanixMachine's BootstrapRef. If the BootstrapRef.Kind is set
// to Image, the NutanixMachine will be created with the image mounted
// as a CD-ROM.
NutanixMachineBootstrapRefKindImage = "Image"
)

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

ProviderID string `json:"providerID"`
// ProviderID is the unique identifier as specified by the cloud provider.
// +optional
ProviderID string `json:"providerID,omitempty"`
// vcpusPerSocket is the number of vCPUs per socket of the VM
// +kubebuilder:validation:Required
// +kubebuilder:validation:Minimum=1
Expand Down
4 changes: 3 additions & 1 deletion api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ spec:
name: ""
type: name
memorySize: 4Gi
providerID: nutanix://vm-uuid
subnet:
- name: ""
type: name
Expand All @@ -221,7 +220,6 @@ spec:
name: ""
type: name
memorySize: 4Gi
providerID: nutanix://vm-uuid
subnet:
- name: ""
type: name
Expand Down
2 changes: 1 addition & 1 deletion docs/content/getting-started/deployment/via-clusterctl.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ env CLUSTER_TOPOLOGY=true \
NUTANIX_ENDPOINT= NUTANIX_PASSWORD= NUTANIX_USER= \
AWS_B64ENCODED_CREDENTIALS= \
clusterctl init \
--infrastructure docker,nutanix:v1.4.0-alpha.2,aws \
--infrastructure docker,nutanix:v1.4.0,aws \
--addon helm \
--runtime-extension caren:v{{< param "version" >}} \
--wait-providers
Expand Down
2 changes: 1 addition & 1 deletion docs/content/getting-started/deployment/via-helm.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env CLUSTER_TOPOLOGY=true \
NUTANIX_ENDPOINT= NUTANIX_PASSWORD= NUTANIX_USER= \
AWS_B64ENCODED_CREDENTIALS= \
clusterctl init \
--infrastructure docker,nutanix:v1.4.0-alpha.2,aws \
--infrastructure docker,nutanix:v1.4.0,aws \
--addon helm \
--wait-providers
```
Expand Down
4 changes: 2 additions & 2 deletions hack/third-party/capx/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ go 1.22.1

toolchain go1.22.2

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

require (
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
Expand All @@ -24,7 +24,7 @@ require (
github.com/mailru/easyjson v0.7.7 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/nutanix-cloud-native/prism-go-client v0.3.4 // indirect
github.com/nutanix-cloud-native/prism-go-client v0.4.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
golang.org/x/net v0.24.0 // indirect
golang.org/x/text v0.14.0 // indirect
Expand Down
Loading

0 comments on commit c9e2b36

Please sign in to comment.