Skip to content

Commit 4272bb7

Browse files
authored
Merge pull request #168 from makhov/fix-k0s-config-crd-description
Fix k0s config CRD description
2 parents 4af27d9 + 44e9deb commit 4272bb7

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

api/k0smotron.io/v1beta1/k0smotroncluster_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ type ClusterSpec struct {
6868
// k0sConfig defines the k0s configuration. Note, that some fields will be overwritten by k0smotron.
6969
// If empty, will be used default configuration. @see https://docs.k0sproject.io/stable/configuration/
7070
//+kubebuilder:validation:Optional
71+
//+kubebuilder:pruning:PreserveUnknownFields
7172
K0sConfig *unstructured.Unstructured `json:"k0sConfig,omitempty"`
7273
// CertificateRefs defines the certificate references.
7374
CertificateRefs []CertificateRef `json:"certificateRefs,omitempty"`

config/crd/bases/controlplane.cluster.x-k8s.io_k0smotroncontrolplanes.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ spec:
6868
fields will be overwritten by k0smotron. If empty, will be used
6969
default configuration. @see https://docs.k0sproject.io/stable/configuration/
7070
type: object
71+
x-kubernetes-preserve-unknown-fields: true
7172
k0sImage:
7273
default: k0sproject/k0s
7374
description: K0sImage defines the k0s image to be deployed. If empty

config/crd/bases/k0smotron.io_clusters.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ spec:
7272
fields will be overwritten by k0smotron. If empty, will be used
7373
default configuration. @see https://docs.k0sproject.io/stable/configuration/
7474
type: object
75+
x-kubernetes-preserve-unknown-fields: true
7576
k0sImage:
7677
default: k0sproject/k0s
7778
description: K0sImage defines the k0s image to be deployed. If empty

inttest/basic/basic_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,12 @@ metadata:
157157
"name": "configmap",
158158
"configMap": { "name": "manifest-cm" }
159159
}
160-
]
160+
],
161+
"k0sConfig": {
162+
"apiVersion": "k0s.k0sproject.io/v1beta1",
163+
"kind": "ClusterConfig",
164+
"spec": {}
165+
}
161166
}
162167
}
163168
`)

0 commit comments

Comments
 (0)