Skip to content

Commit

Permalink
feat: update Talos to v1.7.0-beta.1
Browse files Browse the repository at this point in the history
Update CAPI to v1.7.0.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
  • Loading branch information
smira committed Apr 17, 2024
1 parent f242a7d commit 171daf4
Show file tree
Hide file tree
Showing 9 changed files with 313 additions and 677 deletions.
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ NAME := cluster-api-talos-controller
ARTIFACTS := _out
TEST_RUN ?= ./...

TOOLS ?= ghcr.io/siderolabs/tools:v1.6.0-1-g336d248
PKGS ?= v1.6.0-3-g617d342
TALOS_VERSION ?= v1.6.0
K8S_VERSION ?= 1.28.4
TOOLS ?= ghcr.io/siderolabs/tools:v1.7.0-1-g10b2a69
PKGS ?= v1.7.0-5-gb7f1920
TALOS_VERSION ?= v1.7.0-beta.1
K8S_VERSION ?= 1.29.3

CONTROLLER_GEN_VERSION ?= v0.13.0
CONVERSION_GEN_VERSION ?= v0.28.4
CONTROLLER_GEN_VERSION ?= v0.14.0
CONVERSION_GEN_VERSION ?= v0.29.3

BUILD := docker buildx build
PLATFORM ?= linux/amd64
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,17 @@ This provider's versions are compatible with the following versions of Cluster A

This provider's versions are able to install and manage the following versions of Kubernetes:
| | v1.19 | v1.20 | v1.21 | v1.22 | v1.23 | v1.24 | v1.25 | v1.26 | v1.27 | v1.28 | v1.29 |
| -------------- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- |
| CABPT (v0.5.x) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | |
| CABPT (v0.6.x) | | | | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| | v1.19 | v1.20 | v1.21 | v1.22 | v1.23 | v1.24 | v1.25 | v1.26 | v1.27 | v1.28 | v1.29 | v1.30 |
| -------------- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- |
| CABPT (v0.5.x) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | |
| CABPT (v0.6.x) | | | | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
This provider's versions are compatible with the following versions of Talos:

| | v1.0 | v1.1 | v1.2 | v1.3 | v1.4 | v1.5 | v1.6 |
| ---------------- | ----- | ----- | ----- | ----- | ----- | ----- | ----- |
| CABPT (v0.5.x) ||||| | | |
| CABPT (v0.6.x) | | ||||||
| | v1.0 | v1.1 | v1.2 | v1.3 | v1.4 | v1.5 | v1.6 | v1.7 |
| ---------------- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- |
| CABPT (v0.5.x) ||||| | | | |
| CABPT (v0.6.x) | | |||||||

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

Expand Down
89 changes: 52 additions & 37 deletions config/crd/bases/bootstrap.cluster.x-k8s.io_talosconfigs.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.13.0
controller-gen.kubebuilder.io/version: v0.14.0
name: talosconfigs.bootstrap.cluster.x-k8s.io
spec:
group: bootstrap.cluster.x-k8s.io
Expand All @@ -22,14 +22,19 @@ spec:
description: TalosConfig is the Schema for the talosconfigs API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
Expand Down Expand Up @@ -76,14 +81,19 @@ spec:
description: TalosConfig is the Schema for the talosconfigs API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
Expand Down Expand Up @@ -112,8 +122,11 @@ spec:
description: Set hostname in the machine configuration to some value.
properties:
source:
description: "Source of the hostname. \n Allowed values: \"MachineName\"
(use linked Machine's Name)."
description: |-
Source of the hostname.
Allowed values: "MachineName" (use linked Machine's Name).
type: string
type: object
talosVersion:
Expand All @@ -131,37 +144,37 @@ spec:
operational state.
properties:
lastTransitionTime:
description: Last time the condition transitioned from one status
to another. This should be when the underlying condition changed.
If that is not known, then using the time when the API field
changed is acceptable.
description: |-
Last time the condition transitioned from one status to another.
This should be when the underlying condition changed. If that is not known, then using the time when
the API field changed is acceptable.
format: date-time
type: string
message:
description: A human readable message indicating details about
the transition. This field may be empty.
description: |-
A human readable message indicating details about the transition.
This field may be empty.
type: string
reason:
description: The reason for the condition's last transition
in CamelCase. The specific API may choose whether or not this
field is considered a guaranteed API. This field may not be
empty.
description: |-
The reason for the condition's last transition in CamelCase.
The specific API may choose whether or not this field is considered a guaranteed API.
This field may not be empty.
type: string
severity:
description: Severity provides an explicit classification of
Reason code, so the users or machines can immediately understand
the current situation and act accordingly. The Severity field
MUST be set only when Status=False.
description: |-
Severity provides an explicit classification of Reason code, so the users or machines can immediately
understand the current situation and act accordingly.
The Severity field MUST be set only when Status=False.
type: string
status:
description: Status of the condition, one of True, False, Unknown.
type: string
type:
description: Type of condition in CamelCase or in foo.example.com/CamelCase.
Many .condition.type values are consistent across resources
like Available, but because arbitrary conditions can be useful
(see .node.status.conditions), the ability to deconflict is
important.
description: |-
Type of condition in CamelCase or in foo.example.com/CamelCase.
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
can be useful (see .node.status.conditions), the ability to deconflict is important.
type: string
required:
- lastTransitionTime
Expand Down Expand Up @@ -189,9 +202,11 @@ spec:
consumed
type: boolean
talosConfig:
description: "Talos config will be a string containing the config
for download. \n Deprecated: please use `<cluster>-talosconfig`
secret."
description: |-
Talos config will be a string containing the config for download.
Deprecated: please use `<cluster>-talosconfig` secret.
type: string
type: object
type: object
Expand Down
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.13.0
controller-gen.kubebuilder.io/version: v0.14.0
name: talosconfigtemplates.bootstrap.cluster.x-k8s.io
spec:
group: bootstrap.cluster.x-k8s.io
Expand All @@ -23,14 +23,19 @@ spec:
API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
Expand Down Expand Up @@ -64,14 +69,19 @@ spec:
API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
Expand Down Expand Up @@ -107,8 +117,11 @@ spec:
some value.
properties:
source:
description: "Source of the hostname. \n Allowed values:
\"MachineName\" (use linked Machine's Name)."
description: |-
Source of the hostname.
Allowed values: "MachineName" (use linked Machine's Name).
type: string
type: object
talosVersion:
Expand Down
6 changes: 3 additions & 3 deletions controllers/talosconfig_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,8 @@ func (r *TalosConfigReconciler) userConfigs(ctx context.Context, scope *TalosCon

// Create the secret with kubernetes certs so a kubeconfig can be generated
// but do this only when machineconfig contains full Kubernetes CA secret (controlplane nodes)
if userConfig.Cluster().CA() != nil && len(userConfig.Cluster().CA().Crt) > 0 && len(userConfig.Cluster().CA().Key) > 0 {
if err = r.writeK8sCASecret(ctx, scope, userConfig.Cluster().CA()); err != nil {
if userConfig.Cluster().IssuingCA() != nil && len(userConfig.Cluster().IssuingCA().Crt) > 0 && len(userConfig.Cluster().IssuingCA().Key) > 0 {
if err = r.writeK8sCASecret(ctx, scope, userConfig.Cluster().IssuingCA()); err != nil {
return retBundle, err
}
}
Expand All @@ -403,7 +403,7 @@ func (r *TalosConfigReconciler) userConfigs(ctx context.Context, scope *TalosCon

retBundle.BootstrapData = userConfigStr

if userConfig.Machine().Security().CA() != nil && len(userConfig.Machine().Security().CA().Crt) > 0 && len(userConfig.Machine().Security().CA().Key) > 0 {
if userConfig.Machine().Security().IssuingCA() != nil && len(userConfig.Machine().Security().IssuingCA().Crt) > 0 && len(userConfig.Machine().Security().IssuingCA().Key) > 0 {
bundle := secrets.NewBundleFromConfig(secrets.NewFixedClock(time.Now()), userConfig)

retBundle.TalosConfig, err = genTalosConfigFile(userConfig.Cluster().Name(), bundle, nil)
Expand Down
Loading

0 comments on commit 171daf4

Please sign in to comment.