Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
3ecb5c0
docs: add comments
maximiliantech May 28, 2025
0c61f9e
chore: update generated files
maximiliantech May 28, 2025
f6182ab
feat: add environment variable to properly read kubeconfig
maximiliantech May 28, 2025
bb3a863
chore: update .gitignore
maximiliantech May 28, 2025
a9017a1
chore: update build repo
maximiliantech May 28, 2025
0a345a3
feat(fixme): use openmcp-operator/api
maximiliantech May 28, 2025
4c51ff2
docs: add code comments
maximiliantech Jun 16, 2025
0efc99f
chore: update build repo
maximiliantech Jun 16, 2025
a8caafd
Merge branch 'main' into feat/improvements
maximiliantech Jun 18, 2025
2edfb25
docs: add more comments
maximiliantech Jun 20, 2025
11bc79a
test: add context_test.go
maximiliantech Jun 20, 2025
f44b445
test: add more tests
maximiliantech Jun 20, 2025
8e986d3
refactor: code
maximiliantech Jun 20, 2025
3118a93
test: increase coverage
maximiliantech Jun 20, 2025
9156be6
test(smartrequeue): increase coverage to 90%
maximiliantech Jun 20, 2025
cc45273
fix(example): typo
maximiliantech Jun 20, 2025
542931d
fix: phase declaration
maximiliantech Jun 23, 2025
b206a94
chore: remove errors
maximiliantech Jul 16, 2025
46a61b6
chore: update PROJECT file
maximiliantech Jul 16, 2025
28f20e7
chore: register openmcp-operator v1alpha1 scheme
maximiliantech Jul 16, 2025
2dbc389
chore: update sample
maximiliantech Jul 16, 2025
60ba74b
docs: add todo
maximiliantech Jul 16, 2025
ce79040
fix: imports
maximiliantech Jul 16, 2025
1072ccb
Merge branch 'main' into feat/improvements
maximiliantech Jul 16, 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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@ go.work
*~

*.html

# VS Code Go debug binaries
bin/debug_bin*
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,7 @@ RUN apk add --no-cache docker-cli kind
WORKDIR /
COPY --from=builder /workspace/manager .
USER 65532:65532
# Set the default command to execute when running the container
ENV KIND_IN_CONTAINER=true

ENTRYPOINT ["/manager"]
8 changes: 0 additions & 8 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,4 @@ resources:
kind: Cluster
path: github.com/openmcp-project/cluster-provider-kind/api/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
namespaced: true
controller: true
domain: kind.clusters.openmcp.cloud
kind: AccessRequest
path: github.com/openmcp-project/cluster-provider-kind/api/v1alpha1
version: v1alpha1
version: "3"
72 changes: 0 additions & 72 deletions api/v1alpha1/accessrequest_types.go

This file was deleted.

32 changes: 32 additions & 0 deletions api/v1alpha1/cluster_types.go
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason we don't use the common definition from openmcp-operator instead of re-defining things here?

Copy link
Member Author

@maximiliantech maximiliantech Jul 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I will do that step by step with the next PRs. Right now, the Cluster resource in the openmcp-operator does not support Conditions from metav1.[]Condition yet. It is a temporary solution until the openmcp-operator fully incorporates our latest API decisions.

Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package v1alpha1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
)

// Phase is a custom type representing the phase of a cluster.
Expand Down Expand Up @@ -48,10 +49,32 @@ type ClusterSpec struct{}

// ClusterStatus defines the observed state of Cluster.
type ClusterStatus struct {
// Reason is expected to contain a CamelCased string that provides further information in a machine-readable format.
// +optional
Reason string `json:"reason,omitempty"`

// Message contains further details in a human-readable format.
// +optional
Message string `json:"message,omitempty"`

// Conditions is a list of conditions that apply to the cluster.
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`

// ObservedGeneration is the generation of this resource that was last reconciled by the controller.
ObservedGeneration int64 `json:"observedGeneration"`

// +kubebuilder:default=Unknown
Phase Phase `json:"phase"`

// APIServer is the API server endpoint of the cluster.
// +optional
APIServer string `json:"apiServer,omitempty"`

// ProviderStatus is the provider-specific status of the cluster.
// x-kubernetes-preserve-unknown-fields: true
// +optional
ProviderStatus *runtime.RawExtension `json:"providerStatus,omitempty"`
}

// Cluster is the Schema for the clusters API.
Expand Down Expand Up @@ -79,3 +102,12 @@ type ClusterList struct {
func init() {
SchemeBuilder.Register(&Cluster{}, &ClusterList{})
}

const (
// StatusPhaseReady indicates that the resource is ready. All conditions are met and are in status "True".
StatusPhaseReady = "Ready"
// StatusPhaseProgressing indicates that the resource is not ready and being created or updated. At least one condition is not met and is in status "False".
StatusPhaseProgressing = "Progressing"
// StatusPhaseTerminating indicates that the resource is not ready and in deletion. At least one condition is not met and is in status "False".
StatusPhaseTerminating = "Terminating"
)
147 changes: 8 additions & 139 deletions api/v1alpha1/zz_generated.deepcopy.go

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

6 changes: 5 additions & 1 deletion cmd/cluster-provider-kind/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ import (
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
"sigs.k8s.io/controller-runtime/pkg/webhook"

openv1alpha1 "github.com/openmcp-project/openmcp-operator/api/clusters/v1alpha1"

kindclustersopenmcpcloudv1alpha1 "github.com/openmcp-project/cluster-provider-kind/api/v1alpha1"
"github.com/openmcp-project/cluster-provider-kind/internal/controller"
"github.com/openmcp-project/cluster-provider-kind/pkg/kind"
Expand All @@ -54,6 +56,8 @@ func init() {
utilruntime.Must(clientgoscheme.AddToScheme(scheme))

utilruntime.Must(kindclustersopenmcpcloudv1alpha1.AddToScheme(scheme))
utilruntime.Must(openv1alpha1.AddToScheme(scheme))

// +kubebuilder:scaffold:scheme
}

Expand Down Expand Up @@ -181,7 +185,7 @@ func main() {
})
}

kindProvider := kind.NewDockerProvider()
kindProvider := kind.NewKindProvider()

mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
Scheme: scheme,
Expand Down
Loading