Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 6 additions & 1 deletion .claude/settings.local.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
"Bash(gh pr:*)",
"WebFetch(domain:github.com)",
"WebFetch(domain:raw.githubusercontent.com)",
"Bash(curl:*)"
"Bash(curl:*)",
"Bash(go build *)",
"Bash(golangci-lint run *)",
"Bash(go test *)",
"Bash(gofmt *)",
"Bash(gmake *)"
]
}
}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.DS_Store
build/.claude/
build/

.idea
3 changes: 3 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

[default.extend-words]

[default]
extend-ignore-identifiers-re = ["ANDed"]

[files]
extend-exclude = [
"go.mod",
Expand Down
14 changes: 12 additions & 2 deletions api/v1alpha1/groupversion_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,27 @@
package v1alpha1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"sigs.k8s.io/controller-runtime/pkg/scheme"
)

var (
// GroupVersion is group version used to register these objects.
GroupVersion = schema.GroupVersion{Group: "cloudprofilesync.cobaltcore.dev", Version: "v1alpha1"}

// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)

// AddToScheme adds the types in this group-version to the given scheme.
AddToScheme = SchemeBuilder.AddToScheme
)

func addKnownTypes(s *runtime.Scheme) error {
s.AddKnownTypes(GroupVersion,
&ManagedCloudProfile{},
&ManagedCloudProfileList{},
)
metav1.AddToGroupVersion(s, GroupVersion)
return nil
}
4 changes: 0 additions & 4 deletions api/v1alpha1/managedcloudprofile.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ import (
runtime "k8s.io/apimachinery/pkg/runtime"
)

func init() {
SchemeBuilder.Register(&ManagedCloudProfile{}, &ManagedCloudProfileList{})
}

type ManagedCloudProfileSpec struct {
// CloudProfile contains the base spec of the CloudProfile.
CloudProfile CloudProfileSpec `json:"cloudProfile"`
Expand Down
93 changes: 81 additions & 12 deletions crd/cloudprofilesync.cobaltcore.dev_managedcloudprofiles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.20.0
controller-gen.kubebuilder.io/version: v0.21.0
name: managedcloudprofiles.cloudprofilesync.cobaltcore.dev
spec:
group: cloudprofilesync.cobaltcore.dev
Expand Down Expand Up @@ -85,19 +85,48 @@ spec:
description: Versions is the list of allowed Kubernetes versions
with optional expiration dates for Shoot clusters.
items:
description: ExpirableVersion contains a version and an
expiration date.
description: ExpirableVersion contains a version with associated
lifecycle information.
properties:
classification:
description: |-
Classification defines the state of a version (preview, supported, deprecated).
To get the currently valid classification, use CurrentLifecycleClassification().

Deprecated: Is replaced by Lifecycle. mutually exclusive with it.
type: string
expirationDate:
description: ExpirationDate defines the time at which
this version expires.
description: |-
ExpirationDate defines the time at which this version expires.

Deprecated: Is replaced by Lifecycle; mutually exclusive with it.
format: date-time
type: string
lifecycle:
description: |-
Lifecycle defines the lifecycle stages for this version.
Mutually exclusive with Classification and ExpirationDate.
This can only be used when the VersionClassificationLifecycle feature gate is enabled.
items:
description: |-
LifecycleStage describes a stage in the versions lifecycle.
Each stage defines the classification of the version (e.g. unavailable, preview, supported, deprecated, expired)
and the time at which this classification becomes effective.
properties:
classification:
description: Classification is the category of
this lifecycle stage (unavailable, preview,
supported, deprecated, expired).
type: string
startTime:
description: |-
StartTime defines when this lifecycle stage becomes active.
StartTime can be omitted for the first lifecycle stage, implying a start time in the past.
format: date-time
type: string
required:
- classification
type: object
type: array
version:
description: Version is the version identifier.
type: string
Expand Down Expand Up @@ -184,7 +213,8 @@ spec:
classification:
description: |-
Classification defines the state of a version (preview, supported, deprecated).
To get the currently valid classification, use CurrentLifecycleClassification().

Deprecated: Is replaced by Lifecycle. mutually exclusive with it.
type: string
cri:
description: CRI list of supported container runtime
Expand Down Expand Up @@ -223,8 +253,10 @@ spec:
type: object
type: array
expirationDate:
description: ExpirationDate defines the time at which
this version expires.
description: |-
ExpirationDate defines the time at which this version expires.

Deprecated: Is replaced by Lifecycle; mutually exclusive with it.
format: date-time
type: string
inPlaceUpdates:
Expand Down Expand Up @@ -253,6 +285,32 @@ spec:
- '>= 1.26' - supports only kubelet versions greater than or equal to 1.26
- '< 1.26' - supports only kubelet versions less than 1.26
type: string
lifecycle:
description: |-
Lifecycle defines the lifecycle stages for this version.
Mutually exclusive with Classification and ExpirationDate.
This can only be used when the VersionClassificationLifecycle feature gate is enabled.
items:
description: |-
LifecycleStage describes a stage in the versions lifecycle.
Each stage defines the classification of the version (e.g. unavailable, preview, supported, deprecated, expired)
and the time at which this classification becomes effective.
properties:
classification:
description: Classification is the category
of this lifecycle stage (unavailable, preview,
supported, deprecated, expired).
type: string
startTime:
description: |-
StartTime defines when this lifecycle stage becomes active.
StartTime can be omitted for the first lifecycle stage, implying a start time in the past.
format: date-time
type: string
required:
- classification
type: object
type: array
version:
description: Version is the version identifier.
type: string
Expand Down Expand Up @@ -303,6 +361,17 @@ spec:
type.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
machineControllerManager:
description: MachineControllerManagerSettings contains a
subset of the MachineControllerManagerSettings which can
be defaulted for a machine type in a CloudProfile.
properties:
machineCreationTimeout:
description: MachineCreationTimeout is the period after
which creation of a machine of this machine type is
declared failed.
type: string
type: object
memory:
anyOf:
- type: integer
Expand Down Expand Up @@ -431,7 +500,7 @@ spec:
properties:
matchExpressions:
description: matchExpressions is a list of label selector
requirements. The requirements are ANDead.
requirements. The requirements are ANDed.
items:
description: |-
A label selector requirement is a selector that contains values, a key, and an operator that
Expand Down Expand Up @@ -468,7 +537,7 @@ spec:
description: |-
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions, whose key field is "key", the
operator is "In", and the values array contains only "value". The requirements are ANDead.
operator is "In", and the values array contains only "value". The requirements are ANDed.
type: object
providerTypes:
description: Providers is optional and can be used by restricting
Expand Down Expand Up @@ -521,7 +590,7 @@ spec:
garbage collection
properties:
enabled:
description: Enabled toggles garbage collection for this resource.
description: Enabled toggles garbage collection for this image.
type: boolean
maxAge:
description: |-
Expand Down
Loading
Loading