Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Support disabling CAPD load balancer #11412

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
bed7bca
support disabling load balancer creation for DockerCluster
phoban01 Nov 12, 2024
c50f809
Add v1beta2 available condition to KCP
fabriziopandini Nov 5, 2024
dfc9c79
🌱 Implement MS remediating conditions (#11382)
sbueringer Nov 8, 2024
bafbe83
Add machine UpToDate condition to KCP
fabriziopandini Nov 6, 2024
87540c9
🌱 Extend MS ScalingUp and Remediationg conditions to include prefligh…
sbueringer Nov 8, 2024
ac77507
Implement Cluster TopologyReconciled v1beta2 condition
sbueringer Nov 8, 2024
86a7403
Fix review findings
sbueringer Nov 8, 2024
9d45337
Extend test coverage
sbueringer Nov 8, 2024
02ff47a
Audit patch withOwnedConditions
fabriziopandini Nov 11, 2024
7157946
Add machine UpToDate condition to MachineSet
fabriziopandini Nov 8, 2024
f3d89fc
Fix TestControlPlane/MachinesUpToDate flake
sbueringer Nov 11, 2024
3a1a9b0
clustercache: add typed watcher
ykakarap Oct 28, 2024
5ed8d8c
:seedling: Bump the all-github-actions group with 2 updates
dependabot[bot] Nov 11, 2024
c40aace
:seedling: Bump the all-go-mod-patch-and-minor group across 3 directo…
dependabot[bot] Nov 11, 2024
d72e34b
Fix predicate logging
sbueringer Nov 12, 2024
5aeb304
Add MD/MP watches to Cluster controller
sbueringer Nov 12, 2024
9d0878d
Remove paused handling from reconcileExternal
sbueringer Nov 11, 2024
74a63d9
Uplift Go version to v1.22.9
Sunnatillo Nov 13, 2024
fe0aff2
Refine v1beta2 condition messages
fabriziopandini Nov 11, 2024
794de1f
🌱 clusterctl: add nutanix ipam & runtime extensions providers (#11135)
jimmidyson Nov 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@c3a1bb2c992d77180ae65be6ae6c166cf40f857c # tag=v45.0.3
uses: tj-actions/changed-files@4edd678ac3f81e2dc578756871e4d00c19191daf # tag=v45.0.4
- name: Get release version
id: release-version
run: |
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
curl -L "https://raw.githubusercontent.com/${{ github.repository }}/main/CHANGELOG/${{ env.RELEASE_TAG }}.md" \
-o "${{ env.RELEASE_TAG }}.md"
- name: Release
uses: softprops/action-gh-release@e7a8f85e1c67a31e6ed99a94b41bd0b71bbee6b8 # tag=v2.0.9
uses: softprops/action-gh-release@01570a1f39cb168c169c802c3bceb9e93fb10974 # tag=v2.1.0
with:
draft: true
files: out/*
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ SHELL:=/usr/bin/env bash
#
# Go.
#
GO_VERSION ?= 1.22.8
GO_VERSION ?= 1.22.9
GO_DIRECTIVE_VERSION ?= 1.22.0
GO_CONTAINER_IMAGE ?= docker.io/library/golang:$(GO_VERSION)

Expand Down
4 changes: 2 additions & 2 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def load_provider_tiltfiles():

tilt_helper_dockerfile_header = """
# Tilt image
FROM golang:1.22.8 as tilt-helper
FROM golang:1.22.9 as tilt-helper
# Install delve. Note this should be kept in step with the Go release minor version.
RUN go install github.com/go-delve/delve/cmd/[email protected]
# Support live reloading with Tilt
Expand All @@ -195,7 +195,7 @@ RUN wget --output-document /restart.sh --quiet https://raw.githubusercontent.com
"""

tilt_dockerfile_header = """
FROM golang:1.22.8 as tilt
FROM golang:1.22.9 as tilt
WORKDIR /
COPY --from=tilt-helper /process.txt .
COPY --from=tilt-helper /start.sh .
Expand Down
53 changes: 53 additions & 0 deletions api/v1beta1/cluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,59 @@ const (
// ClusterTopologyReconciledV1Beta2Condition is true if the topology controller is working properly.
// Note: This condition is added only if the Cluster is referencing a ClusterClass / defining a managed Topology.
ClusterTopologyReconciledV1Beta2Condition = "TopologyReconciled"

// ClusterTopologyReconcileSucceededV1Beta2Reason documents the reconciliation of a Cluster topology succeeded.
ClusterTopologyReconcileSucceededV1Beta2Reason = "TopologyReconcileSucceeded"

// ClusterTopologyReconciledFailedV1Beta2Reason documents the reconciliation of a Cluster topology
// failing due to an error.
ClusterTopologyReconciledFailedV1Beta2Reason = "TopologyReconcileFailed"

// ClusterTopologyReconciledControlPlaneUpgradePendingV1Beta2Reason documents reconciliation of a Cluster topology
// not yet completed because Control Plane is not yet updated to match the desired topology spec.
ClusterTopologyReconciledControlPlaneUpgradePendingV1Beta2Reason = "ControlPlaneUpgradePending"

// ClusterTopologyReconciledMachineDeploymentsCreatePendingV1Beta2Reason documents reconciliation of a Cluster topology
// not yet completed because at least one of the MachineDeployments is yet to be created.
// This generally happens because new MachineDeployment creations are held off while the ControlPlane is not stable.
ClusterTopologyReconciledMachineDeploymentsCreatePendingV1Beta2Reason = "MachineDeploymentsCreatePending"

// ClusterTopologyReconciledMachineDeploymentsUpgradePendingV1Beta2Reason documents reconciliation of a Cluster topology
// not yet completed because at least one of the MachineDeployments is not yet updated to match the desired topology spec.
ClusterTopologyReconciledMachineDeploymentsUpgradePendingV1Beta2Reason = "MachineDeploymentsUpgradePending"

// ClusterTopologyReconciledMachineDeploymentsUpgradeDeferredV1Beta2Reason documents reconciliation of a Cluster topology
// not yet completed because the upgrade for at least one of the MachineDeployments has been deferred.
ClusterTopologyReconciledMachineDeploymentsUpgradeDeferredV1Beta2Reason = "MachineDeploymentsUpgradeDeferred"

// ClusterTopologyReconciledMachinePoolsUpgradePendingV1Beta2Reason documents reconciliation of a Cluster topology
// not yet completed because at least one of the MachinePools is not yet updated to match the desired topology spec.
ClusterTopologyReconciledMachinePoolsUpgradePendingV1Beta2Reason = "MachinePoolsUpgradePending"

// ClusterTopologyReconciledMachinePoolsCreatePendingV1Beta2Reason documents reconciliation of a Cluster topology
// not yet completed because at least one of the MachinePools is yet to be created.
// This generally happens because new MachinePool creations are held off while the ControlPlane is not stable.
ClusterTopologyReconciledMachinePoolsCreatePendingV1Beta2Reason = "MachinePoolsCreatePending"

// ClusterTopologyReconciledMachinePoolsUpgradeDeferredV1Beta2Reason documents reconciliation of a Cluster topology
// not yet completed because the upgrade for at least one of the MachinePools has been deferred.
ClusterTopologyReconciledMachinePoolsUpgradeDeferredV1Beta2Reason = "MachinePoolsUpgradeDeferred"

// ClusterTopologyReconciledHookBlockingV1Beta2Reason documents reconciliation of a Cluster topology
// not yet completed because at least one of the lifecycle hooks is blocking.
ClusterTopologyReconciledHookBlockingV1Beta2Reason = "LifecycleHookBlocking"

// ClusterTopologyReconciledClusterClassNotReconciledV1Beta2Reason documents reconciliation of a Cluster topology not
// yet completed because the ClusterClass has not reconciled yet. If this condition persists there may be an issue
// with the ClusterClass surfaced in the ClusterClass status or controller logs.
ClusterTopologyReconciledClusterClassNotReconciledV1Beta2Reason = "ClusterClassNotReconciled"

// ClusterTopologyReconciledDeletionTimestampSetV1Beta2Reason surfaces when the Cluster is deleting because the
// DeletionTimestamp is set.
ClusterTopologyReconciledDeletionTimestampSetV1Beta2Reason = DeletionTimestampSetV1Beta2Reason

// ClusterTopologyReconcilePausedV1Beta2Reason surfaces when the Cluster is paused.
ClusterTopologyReconcilePausedV1Beta2Reason = PausedV1Beta2Reason
)

// Cluster's InfrastructureReady condition and corresponding reasons that will be used in v1Beta2 API version.
Expand Down
3 changes: 3 additions & 0 deletions api/v1beta1/condition_consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,9 @@ const (
// yet completed because the ClusterClass has not reconciled yet. If this condition persists there may be an issue
// with the ClusterClass surfaced in the ClusterClass status or controller logs.
TopologyReconciledClusterClassNotReconciledReason = "ClusterClassNotReconciled"

// TopologyReconciledPausedReason (Severity=Info) surfaces when the Cluster is paused.
TopologyReconciledPausedReason = "Paused"
)

// Conditions and condition reasons for ClusterClass.
Expand Down
8 changes: 8 additions & 0 deletions api/v1beta1/machine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,15 @@ const (
const (
// MachineUpToDateV1Beta2Condition is true if the Machine spec matches the spec of the Machine's owner resource, e.g. KubeadmControlPlane or MachineDeployment.
// The Machine's owner (e.g. MachineDeployment) is authoritative to set their owned Machine's UpToDate conditions based on its current spec.
// NOTE: The Machine's owner might use this condition to surface also other use cases when Machine is considered not up to date, e.g. when MachineDeployment spec.rolloutAfter
// is expired and the Machine needs to be rolled out.
MachineUpToDateV1Beta2Condition = "UpToDate"

// MachineUpToDateV1Beta2Reason surface when a Machine spec matches the spec of the Machine's owner resource, e.g. KubeadmControlPlane or MachineDeployment.
MachineUpToDateV1Beta2Reason = "UpToDate"

// MachineNotUpToDateV1Beta2Reason surface when a Machine spec does not match the spec of the Machine's owner resource, e.g. KubeadmControlPlane or MachineDeployment.
MachineNotUpToDateV1Beta2Reason = "NotUpToDate"
)

// Machine's BootstrapConfigReady condition and corresponding reasons that will be used in v1Beta2 API version.
Expand Down
29 changes: 28 additions & 1 deletion api/v1beta1/machineset_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,37 @@ const (
MachineSetMachinesUpToDateInternalErrorV1Beta2Reason = InternalErrorV1Beta2Reason
)

// Conditions that will be used for the MachineSet object in v1Beta2 API version.
// MachineSet's Remediating condition and corresponding reasons that will be used in v1Beta2 API version.
const (
// MachineSetRemediatingV1Beta2Condition surfaces details about ongoing remediation of the controlled machines, if any.
MachineSetRemediatingV1Beta2Condition = RemediatingV1Beta2Condition

// MachineSetRemediatingV1Beta2Reason surfaces when the MachineSet has at least one machine with HealthCheckSucceeded set to false
// and with the OwnerRemediated condition set to false.
MachineSetRemediatingV1Beta2Reason = RemediatingV1Beta2Reason

// MachineSetNotRemediatingV1Beta2Reason surfaces when the MachineSet does not have any machine with HealthCheckSucceeded set to false
// and with the OwnerRemediated condition set to false.
MachineSetNotRemediatingV1Beta2Reason = NotRemediatingV1Beta2Reason

// MachineSetRemediatingInternalErrorV1Beta2Reason surfaces unexpected failures when computing the Remediating condition.
MachineSetRemediatingInternalErrorV1Beta2Reason = InternalErrorV1Beta2Reason
)

// Reasons that will be used for the OwnerRemediated condition set by MachineHealthCheck on MachineSet controlled machines
// being remediated in v1Beta2 API version.
const (
// MachineSetMachineCannotBeRemediatedV1Beta2Reason surfaces when remediation of a MachineSet machine can't be started.
MachineSetMachineCannotBeRemediatedV1Beta2Reason = "CannotBeRemediated"

// MachineSetMachineRemediationDeferredV1Beta2Reason surfaces when remediation of a MachineSet machine must be deferred.
MachineSetMachineRemediationDeferredV1Beta2Reason = "RemediationDeferred"

// MachineSetMachineRemediationMachineDeletedV1Beta2Reason surfaces when remediation of a MachineSet machine
// has been completed by deleting the unhealthy machine.
// Note: After an unhealthy machine is deleted, a new one is created by the MachineSet as part of the
// regular reconcile loop that ensures the correct number of replicas exist.
MachineSetMachineRemediationMachineDeletedV1Beta2Reason = "MachineDeleted"
)

// MachineSet's Deleting condition and corresponding reasons that will be used in v1Beta2 API version.
Expand Down
18 changes: 18 additions & 0 deletions cmd/clusterctl/client/config/providers_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,19 @@ const (
// IPAM providers.
const (
InClusterIPAMProviderName = "in-cluster"
NutanixIPAMProviderName = "nutanix"
)

// Add-on providers.
const (
HelmAddonProviderName = "helm"
)

// Runtime extensions providers.
const (
NutanixRuntimeExtensionsProviderName = "nutanix"
)

// Other.
const (
// ProvidersConfigKey is a constant for finding provider configurations with the ProvidersClient.
Expand Down Expand Up @@ -422,13 +428,25 @@ func (p *providersClient) defaults() []Provider {
url: "https://github.com/kubernetes-sigs/cluster-api-ipam-provider-in-cluster/releases/latest/ipam-components.yaml",
providerType: clusterctlv1.IPAMProviderType,
},
&provider{
name: NutanixIPAMProviderName,
url: "https://github.com/nutanix-cloud-native/cluster-api-ipam-provider-nutanix/releases/latest/ipam-components.yaml",
providerType: clusterctlv1.IPAMProviderType,
},

// Add-on providers
&provider{
name: HelmAddonProviderName,
url: "https://github.com/kubernetes-sigs/cluster-api-addon-provider-helm/releases/latest/addon-components.yaml",
providerType: clusterctlv1.AddonProviderType,
},

// Runtime extensions providers
&provider{
name: NutanixRuntimeExtensionsProviderName,
url: "https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/releases/latest/runtime-extensions-components.yaml",
providerType: clusterctlv1.RuntimeExtensionProviderType,
},
}

return defaults
Expand Down
4 changes: 4 additions & 0 deletions cmd/clusterctl/client/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ func Test_clusterctlClient_GetProvidersConfig(t *testing.T) {
config.VSphereProviderName,
config.VultrProviderName,
config.InClusterIPAMProviderName,
config.NutanixIPAMProviderName,
config.NutanixRuntimeExtensionsProviderName,
config.HelmAddonProviderName,
},
wantErr: false,
Expand Down Expand Up @@ -174,6 +176,8 @@ func Test_clusterctlClient_GetProvidersConfig(t *testing.T) {
config.VSphereProviderName,
config.VultrProviderName,
config.InClusterIPAMProviderName,
config.NutanixIPAMProviderName,
config.NutanixRuntimeExtensionsProviderName,
config.HelmAddonProviderName,
},
wantErr: false,
Expand Down
Loading