Skip to content

Commit c0a6152

Browse files
committed
feat: update Talos to 1.8.0-beta.0
Bump CAPI, Kubernetes versions. Due to the conflict with K8s 1.30.x CEL library version (very old), go straight to Kubernetes 1.31.0 and newer controller-runtime. Signed-off-by: Andrey Smirnov <[email protected]>
1 parent d466f5a commit c0a6152

17 files changed

+330
-419
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ COPY --from=manifests-build /src/config /config
4747

4848
FROM build AS generate-build
4949
RUN --mount=type=cache,target=/.cache controller-gen object:headerFile=./hack/boilerplate.go.txt paths="./..."
50-
RUN --mount=type=cache,target=/.cache conversion-gen --input-dirs=./api/v1alpha2 --output-base ./ --output-file-base=zz_generated.conversion --go-header-file=./hack/boilerplate.go.txt
50+
RUN --mount=type=cache,target=/.cache conversion-gen --output-file=zz_generated.conversion.go --go-header-file=./hack/boilerplate.go.txt -v 9 ./api/v1alpha2
5151

5252
FROM scratch AS generate
5353
COPY --from=generate-build /src/api /api

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ NAME := cluster-api-talos-controller
99
ARTIFACTS := _out
1010
TEST_RUN ?= ./...
1111

12-
TOOLS ?= ghcr.io/siderolabs/tools:v1.7.0-1-g10b2a69
13-
PKGS ?= v1.7.0-5-gb7f1920
14-
TALOS_VERSION ?= v1.7.0
15-
K8S_VERSION ?= 1.29.3
12+
TOOLS ?= ghcr.io/siderolabs/tools:v1.8.0-1-ga0c06c6
13+
PKGS ?= v1.8.0
14+
TALOS_VERSION ?= v1.8.0-beta.0
15+
K8S_VERSION ?= 1.30.0
1616

17-
CONTROLLER_GEN_VERSION ?= v0.14.0
18-
CONVERSION_GEN_VERSION ?= v0.29.3
17+
CONTROLLER_GEN_VERSION ?= v0.16.2
18+
CONVERSION_GEN_VERSION ?= v0.31.0
1919

2020
BUILD := docker buildx build
2121
PLATFORM ?= linux/amd64

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,17 @@ This provider's versions are compatible with the following versions of Cluster A
5454

5555
This provider's versions are able to install and manage the following versions of Kubernetes:
5656
57-
| | v1.19 | v1.20 | v1.21 | v1.22 | v1.23 | v1.24 | v1.25 | v1.26 | v1.27 | v1.28 | v1.29 | v1.30 |
58-
| -------------- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- |
59-
| CABPT (v0.5.x) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | |
60-
| CABPT (v0.6.x) | | | | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
57+
| | v1.19 | v1.20 | v1.21 | v1.22 | v1.23 | v1.24 | v1.25 | v1.26 | v1.27 | v1.28 | v1.29 | v1.30 | v1.31 |
58+
| -------------- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- |
59+
| CABPT (v0.5.x) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | |
60+
| CABPT (v0.6.x) | | | | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
6161
6262
This provider's versions are compatible with the following versions of Talos:
6363

64-
| | v1.0 | v1.1 | v1.2 | v1.3 | v1.4 | v1.5 | v1.6 | v1.7 |
65-
| ---------------- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- |
66-
| CABPT (v0.5.x) ||||| | | | |
67-
| CABPT (v0.6.x) | | |||||||
64+
| | v1.0 | v1.1 | v1.2 | v1.3 | v1.4 | v1.5 | v1.6 | v1.7 | v1.8 |
65+
| ---------------- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- |
66+
| CABPT (v0.5.x) ||||| | | | | |
67+
| CABPT (v0.6.x) | | ||||||||
6868

6969
> Note: CABPT is not compatible with multi-document Talos Linux machine configuration, as it relies on JSON patch to apply configuration patches.
7070

api/v1alpha2/doc.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// This Source Code Form is subject to the terms of the Mozilla Public
2+
// License, v. 2.0. If a copy of the MPL was not distributed with this
3+
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
4+
5+
// +k8s:conversion-gen=github.com/siderolabs/cluster-api-bootstrap-provider-talos/api/v1alpha3
6+
package v1alpha2

api/v1alpha2/types.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
package v1alpha2
66

7-
// +k8s:conversion-gen=github.com/siderolabs/cluster-api-bootstrap-provider-talos/api/v1alpha3
8-
97
// TalosConfigTemplateResource defines the Template structure
108
type TalosConfigTemplateResource struct {
119
Spec TalosConfigSpec `json:"spec,omitempty"`

api/v1alpha2/zz_generated.conversion.go

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/bootstrap.cluster.x-k8s.io_talosconfigs.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.14.0
6+
controller-gen.kubebuilder.io/version: v0.16.2
77
name: talosconfigs.bootstrap.cluster.x-k8s.io
88
spec:
99
group: bootstrap.cluster.x-k8s.io
@@ -125,7 +125,6 @@ spec:
125125
description: |-
126126
Source of the hostname.
127127
128-
129128
Allowed values: "MachineName" (use linked Machine's Name).
130129
type: string
131130
type: object
@@ -211,7 +210,6 @@ spec:
211210
description: |-
212211
Talos config will be a string containing the config for download.
213212
214-
215213
Deprecated: please use `<cluster>-talosconfig` secret.
216214
type: string
217215
type: object

config/crd/bases/bootstrap.cluster.x-k8s.io_talosconfigtemplates.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.14.0
6+
controller-gen.kubebuilder.io/version: v0.16.2
77
name: talosconfigtemplates.bootstrap.cluster.x-k8s.io
88
spec:
99
group: bootstrap.cluster.x-k8s.io
@@ -120,7 +120,6 @@ spec:
120120
description: |-
121121
Source of the hostname.
122122
123-
124123
Allowed values: "MachineName" (use linked Machine's Name).
125124
type: string
126125
type: object

config/manager/manager.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,13 @@ spec:
4848
requests:
4949
cpu: 100m
5050
memory: 128Mi
51+
securityContext:
52+
allowPrivilegeEscalation: false
53+
capabilities:
54+
drop:
55+
- ALL
56+
privileged: false
57+
runAsUser: 65532
58+
runAsGroup: 65532
59+
terminationMessagePolicy: FallbackToLogsOnError
5160
terminationGracePeriodSeconds: 10

controllers/secrets.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ func (r *TalosConfigReconciler) writeBootstrapData(ctx context.Context, scope *T
178178
return dataSecretName, nil
179179
}
180180

181-
if err != nil && !k8serrors.IsNotFound(err) {
181+
if !k8serrors.IsNotFound(err) {
182182
return dataSecretName, err
183183
}
184184

0 commit comments

Comments
 (0)