Skip to content

Commit

Permalink
chore: prepare for Talos 1.8
Browse files Browse the repository at this point in the history
Fork docs, introduce version contract for 1.8.

Clean up old version contracts 0.8-0.14.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
  • Loading branch information
smira committed Apr 19, 2024
1 parent d6c8067 commit bac1d00
Show file tree
Hide file tree
Showing 183 changed files with 40,851 additions and 459 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -1027,10 +1027,10 @@ RUN protoc \
/protos/time/*.proto

FROM scratch AS docs
COPY --from=docs-build /tmp/configuration/ /website/content/v1.7/reference/configuration/
COPY --from=docs-build /tmp/cli.md /website/content/v1.7/reference/
COPY --from=docs-build /tmp/schemas /website/content/v1.7/schemas/
COPY --from=proto-docs-build /tmp/api.md /website/content/v1.7/reference/
COPY --from=docs-build /tmp/configuration/ /website/content/v1.8/reference/configuration/
COPY --from=docs-build /tmp/cli.md /website/content/v1.8/reference/
COPY --from=docs-build /tmp/schemas /website/content/v1.8/schemas/
COPY --from=proto-docs-build /tmp/api.md /website/content/v1.8/reference/

# The talosctl-cni-bundle builds the CNI bundle for talosctl.

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ HELM_URL ?= https://get.helm.sh/helm-$(HELM_VERSION)-linux-amd64.tar.gz
CLUSTERCTL_URL ?= https://github.com/kubernetes-sigs/cluster-api/releases/download/v$(CLUSTERCTL_VERSION)/clusterctl-$(OPERATING_SYSTEM)-amd64
CILIUM_CLI_URL ?= https://github.com/cilium/cilium-cli/releases/download/$(CILIUM_CLI_VERSION)/cilium-$(OPERATING_SYSTEM)-amd64.tar.gz
TESTPKGS ?= github.com/siderolabs/talos/...
RELEASES ?= v1.5.5 v1.6.3
RELEASES ?= v1.6.7 v1.7.0
SHORT_INTEGRATION_TEST ?=
CUSTOM_CNI_URL ?=
INSTALLER_ARCH ?= all
Expand Down
8 changes: 4 additions & 4 deletions internal/integration/provision/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ type upgradeSpec struct {

const (
// These versions should be kept in sync with Makefile variable RELEASES.
previousRelease = "v1.5.5"
stableRelease = "v1.6.3" // or soon-to-be-stable
previousRelease = "v1.6.7"
stableRelease = "v1.7.0" // or soon-to-be-stable
// The current version (the one being built on CI) is DefaultSettings.CurrentVersion.

// Command to find Kubernetes version for past releases:
//
// git show ${TAG}:pkg/machinery/constants/constants.go | grep KubernetesVersion
previousK8sVersion = "1.28.3" // constants.DefaultKubernetesVersion in the previousRelease
stableK8sVersion = "1.29.1" // constants.DefaultKubernetesVersion in the stableRelease
previousK8sVersion = "1.29.3" // constants.DefaultKubernetesVersion in the previousRelease
stableK8sVersion = "1.30.0" // constants.DefaultKubernetesVersion in the stableRelease
currentK8sVersion = constants.DefaultKubernetesVersion
)

Expand Down
48 changes: 1 addition & 47 deletions pkg/machinery/config/contract.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ type VersionContract struct {
// Well-known Talos version contracts.
var (
TalosVersionCurrent = (*VersionContract)(nil)
TalosVersion1_8 = &VersionContract{1, 8}
TalosVersion1_7 = &VersionContract{1, 7}
TalosVersion1_6 = &VersionContract{1, 6}
TalosVersion1_5 = &VersionContract{1, 5}
Expand All @@ -32,13 +33,6 @@ var (
TalosVersion1_2 = &VersionContract{1, 2}
TalosVersion1_1 = &VersionContract{1, 1}
TalosVersion1_0 = &VersionContract{1, 0}
TalosVersion0_14 = &VersionContract{0, 14}
TalosVersion0_13 = &VersionContract{0, 13}
TalosVersion0_12 = &VersionContract{0, 12}
TalosVersion0_11 = &VersionContract{0, 11}
TalosVersion0_10 = &VersionContract{0, 10}
TalosVersion0_9 = &VersionContract{0, 9}
TalosVersion0_8 = &VersionContract{0, 8}
)

var versionRegexp = regexp.MustCompile(`^v(\d+)\.(\d+)($|\.)`)
Expand Down Expand Up @@ -80,46 +74,6 @@ func (contract *VersionContract) Greater(other *VersionContract) bool {
return contract.Major > other.Major || (contract.Major == other.Major && contract.Minor > other.Minor)
}

// SupportsECDSAKeys returns true if version of Talos supports ECDSA keys (vs. RSA keys).
func (contract *VersionContract) SupportsECDSAKeys() bool {
return contract.Greater(TalosVersion0_8)
}

// SupportsAggregatorCA returns true if version of Talos supports AggregatorCA in the config.
func (contract *VersionContract) SupportsAggregatorCA() bool {
return contract.Greater(TalosVersion0_8)
}

// SupportsServiceAccount returns true if version of Talos supports ServiceAccount in the config.
func (contract *VersionContract) SupportsServiceAccount() bool {
return contract.Greater(TalosVersion0_8)
}

// SupportsRBACFeature returns true if version of Talos supports RBAC feature gate.
func (contract *VersionContract) SupportsRBACFeature() bool {
return contract.Greater(TalosVersion0_10)
}

// SupportsDynamicCertSANs returns true if version of Talos supports dynamic certificate generation with SANs provided from resources.
func (contract *VersionContract) SupportsDynamicCertSANs() bool {
return contract.Greater(TalosVersion0_12)
}

// SupportsECDSASHA256 returns true if version of Talos supports ECDSA-SHA256 for Kubernetes certificates.
func (contract *VersionContract) SupportsECDSASHA256() bool {
return contract.Greater(TalosVersion0_12)
}

// ClusterDiscoveryEnabled returns true if cluster discovery should be enabled by default.
func (contract *VersionContract) ClusterDiscoveryEnabled() bool {
return contract.Greater(TalosVersion0_13)
}

// PodSecurityPolicyEnabled returns true if pod security policy should be enabled by default.
func (contract *VersionContract) PodSecurityPolicyEnabled() bool {
return !contract.Greater(TalosVersion0_14)
}

// PodSecurityAdmissionEnabled returns true if pod security admission should be enabled by default.
func (contract *VersionContract) PodSecurityAdmissionEnabled() bool {
return contract.Greater(TalosVersion1_0)
Expand Down
Loading

0 comments on commit bac1d00

Please sign in to comment.