Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Cluster API v1.11.3#96

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
simcod wants to merge25 commits intomain
base:main
Choose a base branch
Loading
fromcapi-v1.11.2
Open
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
25 commits
Select commitHold shift + click to select a range
312e42a
Cluster API v1.11.2
simcodOct 14, 2025
f58e62b
Fix linter and use go 1.25
simcodOct 14, 2025
d2ed5d1
Use go 1.25
simcodOct 14, 2025
853e0b1
Fix linter
simcodOct 14, 2025
57e1723
Implement review
simcodOct 16, 2025
66453ef
Move to new API for testing framework
simcodOct 27, 2025
fccba6b
golangci-lint v2.5.0
simcodOct 27, 2025
31f2490
Add go.sum
simcodOct 27, 2025
f99dc93
Use v1beta2
simcodNov 5, 2025
9b4162f
Fix import
simcodNov 5, 2025
2c12b87
Update dependencies
simcodNov 5, 2025
42231f3
Test import
simcodNov 5, 2025
8ab1dc6
Remove named import
simcodNov 5, 2025
2b206c8
Add v1.11 to e2e config
simcodNov 5, 2025
e84d93a
Fix module mismatch
simcodNov 5, 2025
87fc4e3
Use capi v1.11.3
simcodNov 5, 2025
de7456e
Adapt to api changes
simcodNov 6, 2025
4e7dc4a
chore: upgrade ginkgo
vknabelNov 6, 2025
218a22c
chore: add new contract version
vknabelNov 6, 2025
f53a968
test: config fixes
vknabelNov 6, 2025
1084333
fix: missing kind in metadata
vknabelNov 6, 2025
c73bf20
fix: deprecated addons and outdated images
vknabelNov 6, 2025
63eaed4
fix: new contract: status.initialization.provisioned
vknabelNov 6, 2025
350d15d
fix: condition messages required
vknabelNov 6, 2025
ea3ddfc
fix: use new status
vknabelNov 7, 2025
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
2 changes: 1 addition & 1 deletion.devcontainer/devcontainer.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
{
"name": "Kubebuilder DevContainer",
"image": "golang:1.23",
"image": "golang:1.25",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/git:1": {}
Expand Down
2 changes: 1 addition & 1 deletionDockerfile
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.23 AS builder
FROM golang:1.25 AS builder
ARG TARGETOS
ARG TARGETARCH

Expand Down
6 changes: 3 additions & 3 deletionsMakefile
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -268,8 +268,8 @@ GOLANGCI_LINT = $(LOCALBIN)/golangci-lint
KUSTOMIZE_VERSION ?= v5.4.3
CONTROLLER_TOOLS_VERSION ?= v0.16.4
ENVTEST_VERSION ?= release-0.19
GOLANGCI_LINT_VERSION ?=v1.61.0
GINKGO_VERSION ?= v2.23.3
GOLANGCI_LINT_VERSION ?=v2.5.0
GINKGO_VERSION ?= v2.23.4

.PHONY: kustomize
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary.
Expand All@@ -289,7 +289,7 @@ $(ENVTEST): $(LOCALBIN)
.PHONY: golangci-lint
golangci-lint: $(GOLANGCI_LINT) ## Download golangci-lint locally if necessary.
$(GOLANGCI_LINT): $(LOCALBIN)
$(call go-install-tool,$(GOLANGCI_LINT),github.com/golangci/golangci-lint/cmd/golangci-lint,$(GOLANGCI_LINT_VERSION))
$(call go-install-tool,$(GOLANGCI_LINT),github.com/golangci/golangci-lint/v2/cmd/golangci-lint,$(GOLANGCI_LINT_VERSION))

.PHONY: ginkgo
ginkgo: $(GINKGO) ## Download setup-envtest locally if necessary.
Expand Down
26 changes: 19 additions & 7 deletionsapi/v1alpha1/metalstackcluster_types.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -21,7 +21,6 @@ import (

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
capierrors "sigs.k8s.io/cluster-api/errors" //nolint:staticcheck

"github.com/metal-stack/metal-lib/pkg/tag"
Expand All@@ -35,8 +34,7 @@ const (

ClusterControlPlaneEndpointDefaultPort = 443

ClusterControlPlaneIPEnsured clusterv1.ConditionType = "ClusterControlPlaneIPEnsured"
ClusterPaused clusterv1.ConditionType = clusterv1.PausedV1Beta2Condition
ClusterControlPlaneIPEnsured = "ClusterControlPlaneIPEnsured"
)

var (
Expand DownExpand Up@@ -80,9 +78,14 @@ type APIEndpoint struct {
// MetalStackClusterStatus defines the observed state of MetalStackCluster.
type MetalStackClusterStatus struct {
// Ready denotes that the cluster is ready.
// NOTE: this field is part of the Cluster API v1beta1 contract.
// +kubebuilder:default=false
Ready bool `json:"ready"`

// Initialization provides information about the initialization status of the MetalStackCluster.
// +optional
Initialization MetalStackClusterInitializationStatus `json:"initialization,omitzero"`

// FailureReason indicates that there is a fatal problem reconciling the
// state, and will be set to a token value suitable for
// programmatic interpretation.
Expand All@@ -96,7 +99,16 @@ type MetalStackClusterStatus struct {

// Conditions defines current service state of the MetalStackCluster.
// +optional
Conditions clusterv1.Conditions `json:"conditions,omitempty"`
Conditions []metav1.Condition `json:"conditions,omitempty"`
}

// MetalStackClusterInitializationStatus defines the observed initialization status of the MetalStackCluster.
// +kubebuilder:validation:MinProperties=1
type MetalStackClusterInitializationStatus struct {
// Provisioned indicates that the initial provisioning has been completed.
// NOTE: this field is part of the Cluster API v1beta2 contract, and it is used to orchestrate initial Cluster provisioning.
// +optional
Provisioned *bool `json:"provisioned,omitempty"`
}

// +kubebuilder:object:root=true
Expand All@@ -106,7 +118,7 @@ type MetalStackClusterStatus struct {
// +kubebuilder:printcolumn:name="Partition",type="string",priority=1,JSONPath=".spec.partition",description="The partition within metal-stack"
// +kubebuilder:printcolumn:name="Project",type="string",priority=1,JSONPath=".spec.projectID",description="The project within metal-stack"
// +kubebuilder:printcolumn:name="Network",type="string",priority=1,JSONPath=".spec.nodeNetworkID",description="The network within metal-stack"
// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.ready",description="MetalStackCluster is ready"
// +kubebuilder:printcolumn:name="Provisioned",type="string",JSONPath=".status.initialization.provisioned",description="MetalStackCluster is ready"
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Uptime of the cluster"

// MetalStackCluster is the Schema for the metalstackclusters API.
Expand All@@ -132,12 +144,12 @@ func init() {
}

// GetConditions returns the list of conditions.
func (c *MetalStackCluster) GetConditions()clusterv1.Conditions {
func (c *MetalStackCluster) GetConditions()[]metav1.Condition {
return c.Status.Conditions
}

// SetConditions will set the given conditions.
func (c *MetalStackCluster) SetConditions(conditionsclusterv1.Conditions) {
func (c *MetalStackCluster) SetConditions(conditions[]metav1.Condition) {
c.Status.Conditions = conditions
}

Expand Down
31 changes: 22 additions & 9 deletionsapi/v1alpha1/metalstackmachine_types.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -18,7 +18,7 @@ package v1alpha1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
capierrors "sigs.k8s.io/cluster-api/errors" //nolint:staticcheck
)

Expand All@@ -28,10 +28,9 @@ const (

TagInfraMachineResource = "metal-stack.infrastructure.cluster.x-k8s.io/machine-resource"

ProviderMachineCreated clusterv1.ConditionType = "MachineCreated"
ProviderMachineReady clusterv1.ConditionType = "MachineReady"
ProviderMachineHealthy clusterv1.ConditionType = "MachineHealthy"
ProviderMachinePaused clusterv1.ConditionType = clusterv1.PausedV1Beta2Condition
ProviderMachineCreated = "MachineCreated"
ProviderMachineReady = "MachineReady"
ProviderMachineHealthy = "MachineHealthy"
)

// MetalStackMachineSpec defines the desired state of MetalStackMachine.
Expand All@@ -50,9 +49,14 @@ type MetalStackMachineSpec struct {
// MetalStackMachineStatus defines the observed state of MetalStackMachine.
type MetalStackMachineStatus struct {
// Ready denotes that the machine is ready.
// NOTE: this field is part of the Cluster API v1beta1 contract.
// +kubebuilder:default=false
Ready bool `json:"ready"`

// Initialization provides information about the initialization status of the MetalStackMachine.
// +optional
Initialization MetalStackMachineInitializationStatus `json:"initialization,omitzero"`

// FailureReason indicates that there is a fatal problem reconciling the
// state, and will be set to a token value suitable for
// programmatic interpretation.
Expand All@@ -66,19 +70,28 @@ type MetalStackMachineStatus struct {

// Conditions defines current service state of the MetalStackMachine.
// +optional
Conditionsclusterv1.Conditions `json:"conditions,omitempty"`
Conditions[]metav1.Condition `json:"conditions,omitempty"`

// MachineAddresses contains all host names, external or internal IP addresses and external or internal DNS names.
Addresses clusterv1.MachineAddresses `json:"addresses,omitempty"`
}

// MetalStackMachineInitializationStatus defines the observed initialization status of the MetalStackMachine.
// +kubebuilder:validation:MinProperties=1
type MetalStackMachineInitializationStatus struct {
// Provisioned indicates that the initial provisioning has been completed.
// NOTE: this field is part of the Cluster API v1beta2 contract, and it is used to orchestrate initial Cluster provisioning.
// +optional
Provisioned *bool `json:"provisioned,omitempty"`
}

// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels.cluster\\.x-k8s\\.io/cluster-name",description="Cluster to which this MetalStackMachine belongs"
// +kubebuilder:printcolumn:name="ProviderID",type="string",JSONPath=".spec.providerID",description="ProviderID reference for the MetalStackMachine"
// +kubebuilder:printcolumn:name="Size",type="string",JSONPath=".spec.size",priority=1,description="Size of the MetalStackMachine"
// +kubebuilder:printcolumn:name="Image",type="string",JSONPath=".spec.image",description="OS image of the MetalStackMachine"
// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.ready",description="MetalStackMachine is ready for worker nodes"
// +kubebuilder:printcolumn:name="Provisioned",type="string",JSONPath=".status.initialization.provisioned",description="MetalStackCluster is ready"
// +kubebuilder:printcolumn:name="Healthy",type="string",JSONPath=".status.conditions[1].status",description="Health of the provider machine"
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

Expand All@@ -105,11 +118,11 @@ func init() {
}

// GetConditions returns the list of conditions.
func (c *MetalStackMachine) GetConditions()clusterv1.Conditions {
func (c *MetalStackMachine) GetConditions()[]metav1.Condition {
return c.Status.Conditions
}

// SetConditions will set the given conditions.
func (c *MetalStackMachine) SetConditions(conditionsclusterv1.Conditions) {
func (c *MetalStackMachine) SetConditions(conditions[]metav1.Condition) {
c.Status.Conditions = conditions
}
51 changes: 47 additions & 4 deletionsapi/v1alpha1/zz_generated.deepcopy.go
View file
Open in desktop

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

2 changes: 1 addition & 1 deletioncmd/main.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -38,7 +38,7 @@ import (
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
"sigs.k8s.io/controller-runtime/pkg/webhook"

clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"

infrastructurev1alpha1 "github.com/metal-stack/cluster-api-provider-metal-stack/api/v1alpha1"
"github.com/metal-stack/cluster-api-provider-metal-stack/internal/controller"
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp